chen.lin
3 天以前 f679ac0947417416900ab28308dd3bf235336078
rsf-admin/src/layout/index.jsx
@@ -1,4 +1,5 @@
import { createPortal } from 'react-dom';
import { useLocation } from 'react-router-dom';
import { Layout as RALayout, CheckForApplicationUpdate, useSidebarState } from "react-admin";
import AppBar from './AppBar';
import { MyMenu } from './MyMenu';
@@ -6,10 +7,23 @@
import { Box } from '@mui/material';
import { TabDialogStateProvider } from '@/context/TabDialogStateContext';
/** RCS测试独立页路由:不显示侧边栏和标签栏,整页只显示RCS测试内容 */
const RCS_TEST_STANDALONE_PATH = '/rcsTest-page';
const LayoutContent = ({ children }) => {
  const location = useLocation();
  const [sidebarIsOpen] = useSidebarState();
  const sidebarWidth = sidebarIsOpen ? 200 : 50;
  if (location.pathname === RCS_TEST_STANDALONE_PATH) {
    return (
      <Box sx={{ width: '100%', height: '100vh', overflow: 'hidden' }}>
        {children}
        <CheckForApplicationUpdate />
      </Box>
    );
  }
  const tabsBarEl = (
    <Box sx={{
      position: 'fixed',