From dc31d8c4e1e45d6f932050a0da4e18a09d8dfd07 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 16 十月 2024 15:55:27 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/map/insight/shelf/index.jsx |   51 +++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 47 insertions(+), 4 deletions(-)

diff --git a/zy-acs-flow/src/map/insight/shelf/index.jsx b/zy-acs-flow/src/map/insight/shelf/index.jsx
index 49465ba..7dd73bb 100644
--- a/zy-acs-flow/src/map/insight/shelf/index.jsx
+++ b/zy-acs-flow/src/map/insight/shelf/index.jsx
@@ -1,11 +1,54 @@
-
+import React, { useState, useRef, useEffect } from 'react';
+import { useTranslate } from "react-admin";
+import { Box, Typography, Tabs, Tab, Stack, useTheme, Divider } from '@mui/material';
+import ShelfMain from './ShelfMain';
+import JsonShow from '../../JsonShow';
 
 const ShelfInsight = (props) => {
+    const { sprite } = props;
+    const theme = useTheme();
+    const themeMode = theme.palette.mode;
+    const translate = useTranslate();
+
+    const [activeTab, setActiveTab] = useState(0);
+    const [curLocNo, setCurLocNo] = useState(null);
+
+    const handleTabChange = (event, newValue) => {
+        setActiveTab(newValue);
+    };
 
     return (
-        <>
-            <h1>SHleft</h1>
-        </>
+        <Box sx={{ height: '100%', display: 'flex', flexDirection: 'column' }}>
+            <Tabs
+                value={activeTab}
+                onChange={handleTabChange}
+                indicatorColor="primary"
+                textColor="primary"
+                centered
+                sx={{ mb: 0 }}
+            >
+                <Tab label={translate('page.map.settings.map.title')} />
+                <Tab label={translate('page.map.settings.config.title')} />
+            </Tabs>
+
+            <Divider />
+
+            <Box flex={1} pt={2}>
+                {activeTab === 0 && (
+                    <ShelfMain
+                        data={sprite?.data}
+                        curLocNo={curLocNo}
+                        setCurLocNo={setCurLocNo}
+                    />
+                )}
+                {activeTab === 1 && (
+                    <JsonShow
+                        data={sprite?.data}
+                        height={550}
+                    />
+                )}
+            </Box>
+        </Box>
     )
 }
 

--
Gitblit v1.9.1