diff --git a/frontend/src/layouts/MainLayout.tsx b/frontend/src/layouts/MainLayout.tsx index ca009b0..c02b143 100644 --- a/frontend/src/layouts/MainLayout.tsx +++ b/frontend/src/layouts/MainLayout.tsx @@ -5,7 +5,7 @@ import { FileTextOutlined, CloudOutlined, SettingOutlined, UserOutlined, MenuFoldOutlined, MenuUnfoldOutlined, LogoutOutlined, BellOutlined, ThunderboltOutlined, AppstoreOutlined, WarningOutlined, CloseCircleOutlined, - InfoCircleOutlined, + InfoCircleOutlined, FundProjectionScreenOutlined, GlobalOutlined, } from '@ant-design/icons'; import { Outlet, useNavigate, useLocation } from 'react-router-dom'; import { getUser, removeToken } from '../utils/auth'; @@ -22,6 +22,12 @@ const menuItems = [ { key: '/alarms', icon: , label: '告警管理' }, { key: '/carbon', icon: , label: '碳排放管理' }, { key: '/reports', icon: , label: '报表管理' }, + { key: 'bigscreen-group', icon: , label: '可视化大屏', + children: [ + { key: '/bigscreen', icon: , label: '2D 能源大屏' }, + { key: '/bigscreen-3d', icon: , label: '3D 园区大屏' }, + ], + }, { key: '/system', icon: , label: '系统管理', children: [ { key: '/system/users', label: '用户管理' }, @@ -103,7 +109,13 @@ export default function MainLayout() { selectedKeys={[location.pathname]} defaultOpenKeys={['/system']} items={menuItems} - onClick={({ key }) => navigate(key)} + onClick={({ key }) => { + if (key === '/bigscreen' || key === '/bigscreen-3d') { + window.open(key, '_blank'); + } else { + navigate(key); + } + }} />