From 7c32ab19d3bf4c601212314a1617bbb51c5fdd2a Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 29 三月 2024 16:01:36 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx |   51 +++++++++++++++++++++++++++------------------------
 1 files changed, 27 insertions(+), 24 deletions(-)

diff --git a/zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx b/zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx
index e296144..c08d937 100644
--- a/zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx
@@ -4,7 +4,8 @@
 import { createStyles } from 'antd-style';
 import * as Utils from '../../utils'
 import Http from '@/utils/http';
-import JSON from './json';
+import ShowJson from '../showJson';
+import ShelfView from './view'
 
 const useStyles = createStyles(({ token, css }) => {
 
@@ -13,47 +14,46 @@
 const ShelfDrawer = (props) => {
     const intl = useIntl();
     const { styles } = useStyles();
-    const [activeTabKey, setActiveTabKey] = useState('json');
+    const { curSprite, curFloor } = props;
 
-    const [jsonForm] = Form.useForm();
+    const [activeTabKey, setActiveTabKey] = useState('view');
+
+    const locNo = curSprite.data.no + '-' + curFloor;
+
+    useEffect(() => {
+        props.setDrawerTitle(intl.formatMessage({ id: 'map.loc.no', defaultMessage: '搴撲綅鍙�' }) + ': ' + locNo);
+    }, [curSprite]);
 
     const contentList = {
+        view: (
+            <ShelfView
+                locNo={locNo}
+                data={curSprite.data}
+                curFloor={curFloor}
+            />
+        ),
         json: (
-            <JSON
-                refCurr={props.refCurr}
-                curSprite={props.curSprite}
-                setSpriteBySettings={props.setSpriteBySettings}
-                setDidClickSprite={props.setDidClickSprite}
-                onSubmit={props.onSubmit}
-                jsonForm={jsonForm}
+            <ShowJson
+                data={curSprite.data}
             />
         ),
     };
 
-    const handleCancel = () => {
-        props.onCancel();
-    };
-
-    const handleOk = () => {
-    }
-
     return (
         <>
             <Card
+                className='drawer-card'
                 hoverable
                 bordered={false}
                 type='inner'
                 tabList={[
                     {
-                        key: 'json',
-                        tab: intl.formatMessage({ id: 'map.drawer.json', defaultMessage: 'JSON' }),
-                        // icon: <BorderOuterOutlined />
-
+                        key: 'view',
+                        tab: intl.formatMessage({ id: 'map.drawer.shelf.view.title', defaultMessage: '搴撲綅淇℃伅' }),
                     },
                     {
-                        key: 'config',
-                        tab: intl.formatMessage({ id: 'map.settings.config.param', defaultMessage: '绯荤粺鍙傛暟' }),
-                        // icon: <BranchesOutlined />
+                        key: 'json',
+                        tab: intl.formatMessage({ id: 'map.drawer.json', defaultMessage: 'JSON' }),
                     },
                 ]}
                 activeTabKey={activeTabKey}
@@ -67,6 +67,9 @@
                     style: {
                     }
                 }}
+                style={{
+                    height: '100%'
+                }}
             >
                 {contentList[activeTabKey]}
             </Card>

--
Gitblit v1.9.1