From 9d0acfb65c80c4948c305ca01338f894b87346a0 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 08 四月 2024 09:44:37 +0800
Subject: [PATCH] Merge branch 'Four-Way-Rack' of http://47.97.1.152:5880/r/zy-asrs-master into Four-Way-Rack

---
 zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 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 a8e8458..8321440 100644
--- a/zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx
@@ -3,27 +3,22 @@
 import { FormattedMessage, useIntl, useModel } from '@umijs/max';
 import { createStyles } from 'antd-style';
 import * as Utils from '../../utils'
-import Http from '@/utils/http';
 import ShowJson from '../showJson';
 import ShelfView from './view'
 
-const useStyles = createStyles(({ token, css }) => {
-
-})
-
 const ShelfDrawer = (props) => {
     const intl = useIntl();
-    const { styles } = useStyles();
     const { curSprite, curFloor } = props;
 
     const [activeTabKey, setActiveTabKey] = useState('view');
-    const [curLocNo, setCurLocNo] = React.useState(curSprite.data.no + '-' + curFloor);
+    const [curLocNo, setCurLocNo] = React.useState(''); // just used to modify the drawer title
 
     useEffect(() => {
-        const locNo = curSprite.data.no + '-' + curFloor;
-        props.setDrawerTitle(intl.formatMessage({ id: 'map.loc.no', defaultMessage: '搴撲綅鍙�' }) + ': ' + locNo);
-        setCurLocNo(locNo);
-    }, [curSprite]);
+        if (!curSprite) {
+            return
+        }
+        props.setDrawerTitle(intl.formatMessage({ id: 'map.loc.no', defaultMessage: '搴撲綅鍙�' }) + ': ' + curLocNo);
+    }, [curLocNo]);
 
     const contentList = {
         view: (

--
Gitblit v1.9.1