From 2ec33de134bb69ede62df6ae2c119d03906c8f15 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 10 四月 2024 10:00:53 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/pages/map/drawer/lift/index.jsx |   29 +++++++++++++++++++++++------
 1 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/zy-asrs-flow/src/pages/map/drawer/lift/index.jsx b/zy-asrs-flow/src/pages/map/drawer/lift/index.jsx
index 53d39b0..9e43797 100644
--- a/zy-asrs-flow/src/pages/map/drawer/lift/index.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/lift/index.jsx
@@ -5,17 +5,30 @@
 import * as Utils from '../../utils'
 import Http from '@/utils/http';
 import ShowJson from '../showJson';
-
-const useStyles = createStyles(({ token, css }) => {
-
-})
+import LiftView from './view'
 
 const LiftDrawer = (props) => {
     const intl = useIntl();
-    const { styles } = useStyles();
-    const [activeTabKey, setActiveTabKey] = useState('json');
+    const { curSprite, curFloor } = props;
+
+    const [activeTabKey, setActiveTabKey] = useState('view');
+    const [curNo, setCurNo] = React.useState(''); // just used to modify the drawer title
+
+    useEffect(() => {
+        if (!curSprite) {
+            return
+        }
+        props.setDrawerTitle(intl.formatMessage({ id: 'map.loc.no', defaultMessage: '搴撲綅鍙�' }) + ': ' + curNo);
+    }, [curNo]);
 
     const contentList = {
+        view: (
+            <LiftView
+                curNo={curNo}
+                data={curSprite.data}
+                curFloor={curFloor}
+            />
+        ),
         json: (
             <ShowJson
                 data={props.curSprite.data}
@@ -32,6 +45,10 @@
                 type='inner'
                 tabList={[
                     {
+                        key: 'view',
+                        tab: intl.formatMessage({ id: 'map.drawer.shelf.view.title', defaultMessage: '搴撲綅淇℃伅' }),
+                    },
+                    {
                         key: 'json',
                         tab: intl.formatMessage({ id: 'map.drawer.json', defaultMessage: 'JSON' }),
                     },

--
Gitblit v1.9.1