添加管理员登陆,添加nginx反向代理配置,
This commit is contained in:
@@ -212,8 +212,25 @@ export function Sidebar({ onToggle, collapsed, userRole, selectedApp = '' }: Sid
|
||||
// const visibleMenuIds = APP_MENU_MAP[currentApp as keyof typeof APP_MENU_MAP]
|
||||
// console.log('当前应用模式:', currentApp, '可见菜单ID:', visibleMenuIds);
|
||||
|
||||
// 检查是否通过51708端口访问
|
||||
// const isPort51708 = typeof window !== 'undefined' && window.location.port === '51708';
|
||||
const isPort51708 = typeof window !== 'undefined' && window.location.port === '5178';
|
||||
|
||||
// 根据当前应用模式过滤菜单项
|
||||
const filteredMenuItems = menuItems.filter(item => {
|
||||
// 如果是51708端口,只显示交叉评查相关菜单
|
||||
if (isPort51708) {
|
||||
// 如果当前应用是智慧法务大模型,只显示AI对话菜单
|
||||
if (currentApp === 'model') {
|
||||
return item.id === 'chat-with-llm' ||
|
||||
(item.path && item.path.startsWith('/chat-with-llm'));
|
||||
}else{
|
||||
return item.id === 'cross-checking' ||
|
||||
(item.path && item.path.startsWith('/cross-checking'))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 检查当前菜单是否在所选应用模式中显示
|
||||
if (!visibleMenuIds.includes(item.id)) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user