From 7e5973a3061989a976e2c19ef588bb2f34f29cf4 Mon Sep 17 00:00:00 2001
From: chen.lin <1442464845@qq.com>
Date: 星期三, 11 二月 2026 10:26:53 +0800
Subject: [PATCH] 下发任务校验

---
 rsf-admin/src/layout/index.jsx |   63 +++++++++++++++++++++++++++----
 1 files changed, 54 insertions(+), 9 deletions(-)

diff --git a/rsf-admin/src/layout/index.jsx b/rsf-admin/src/layout/index.jsx
index 40f6657..68e420c 100644
--- a/rsf-admin/src/layout/index.jsx
+++ b/rsf-admin/src/layout/index.jsx
@@ -1,13 +1,58 @@
-import { Layout as RALayout, CheckForApplicationUpdate } from "react-admin";
+import { createPortal } from 'react-dom';
+import { Layout as RALayout, CheckForApplicationUpdate, useSidebarState } from "react-admin";
 import AppBar from './AppBar';
-import { MyMenu } from './MyMenu'
+import { MyMenu } from './MyMenu';
+import TabsBar from './TabsBar';
+import { Box } from '@mui/material';
+
+const LayoutContent = ({ children }) => {
+  const [sidebarIsOpen] = useSidebarState();
+  const sidebarWidth = sidebarIsOpen ? 200 : 50;
+
+  const tabsBarEl = (
+    <Box sx={{
+      position: 'fixed',
+      top: 48,
+      left: sidebarWidth + 5,
+      right: 0,
+      zIndex: 1400, // 楂樹簬 Dialog/Modal(1300)锛岄�氳繃 Portal 鎸傚埌 body 鎵嶈兘鐩栦綇寮圭獥
+      transition: (theme) =>
+        theme.transitions.create('left', {
+          easing: theme.transitions.easing.sharp,
+          duration: theme.transitions.duration.leavingScreen,
+        }),
+    }}>
+      <TabsBar />
+    </Box>
+  );
+
+  return (
+    <RALayout
+      appBar={AppBar}
+      menu={MyMenu}
+      sx={{
+        '& .RaLayout-content': {
+          position: 'absolute',
+          left: `${sidebarWidth}px`,
+          overflowY: 'auto',
+          width: `calc(100% - ${sidebarWidth}px)`,
+          height: 'calc(100% - 86px)', // 鍑忓幓TabsBar鐨勯珮搴� (50px AppBar + 36px TabsBar)
+          top: '86px',
+          transition: (theme) =>
+            theme.transitions.create(['left', 'width'], {
+              easing: theme.transitions.easing.sharp,
+              duration: theme.transitions.duration.leavingScreen,
+            }),
+        }
+      }}
+    >
+      {createPortal(tabsBarEl, document.body)}
+      {children}
+      <CheckForApplicationUpdate />
+    </RALayout>
+  );
+};
 
 export const Layout = ({ children }) => (
-  <RALayout
-    appBar={AppBar}
-    menu={MyMenu}
-  >
-    {children}
-    <CheckForApplicationUpdate />
-  </RALayout>
+  <LayoutContent>{children}</LayoutContent>
 );

--
Gitblit v1.9.1