From a1e5cd1c6a7377ad796222a017eec550c4a8323a Mon Sep 17 00:00:00 2001 From: mmc <1556375442@qq.com> Date: Mon, 3 Aug 2026 13:29:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=BA=E5=99=A8=E4=BA=BA=E7=9A=84=20?= =?UTF-8?q?=E8=B7=AF=E7=94=B1ok=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Layout.tsx | 44 ++++++++++++++++++++++++--------------- src/router/index.tsx | 18 ++++++++++++++++ 2 files changed, 45 insertions(+), 17 deletions(-) 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: (