diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index c8157af..257f618 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -296,25 +296,35 @@ export default function AppLayout() { theme="light" style={{ borderRight: '1px solid #e5e7eb' }} > - {/* 关键:用Layout实现上下分布 */} - - navigate(key)} - /> - {/* 场站信息卡片:仅在侧边栏展开时显示 */} + + {/* 菜单滚动区域:弹性占满剩余空间,超出滚动 */} +
+ navigate(key)} + style={{ borderRight: 0 }} + /> +
+ + {/* 底部场站卡片,固定在底部,不被菜单挤压 */} {!collapsed && currentStation && ( @@ -322,12 +332,11 @@ export default function AppLayout() {
{currentStation.siteName || '1MW 光伏电站'}
- - - {/* 电站 */} +
- {/*
装机容量:{currentStation.capacity || '1.00'} MWp
-
并网时间:{currentStation.gridTime || '2024-01-15'}
*/}
电站地址:{currentStation.address || '河南省林州'}
电站类型:{currentStation.type || '地面电站'}
@@ -342,6 +351,7 @@ export default function AppLayout() { + diff --git a/src/router/index.tsx b/src/router/index.tsx index ee4f356..adfcc6a 100644 --- a/src/router/index.tsx +++ b/src/router/index.tsx @@ -28,6 +28,8 @@ const StationManage = lazy(() => import('../components/SystemSetting/StationMana const SystemSetting = lazy(() => import('../pages/SystemSetting')); const Profile = lazy(() => import('../pages/Profile')); const DeviceStatus = lazy(() => import('../components/devices/DeviceStatusPage')); +const WayLineTask = lazy(() => import('../components/devices/WayLinePage')); +const RobotTask = lazy(() => import('../components/devices/RobotTaskPage')); // 加载中动画 function PageFallback() { @@ -120,6 +122,22 @@ const routes: RouteObject[] = [ ) }, + { + path: 'devices/wayLineTask', + element: ( + }> + + + ) + }, + { + path: 'devices/robotTask', + element: ( + }> + + + ) + }, { path: 'video', element: (