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/shuttle/index.jsx | 27 +++++++++++++++++++--------
1 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/drawer/shuttle/index.jsx b/zy-asrs-flow/src/pages/map/drawer/shuttle/index.jsx
index a32ca8b..34b7a6b 100644
--- a/zy-asrs-flow/src/pages/map/drawer/shuttle/index.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/shuttle/index.jsx
@@ -5,23 +5,30 @@
import * as Utils from '../../utils'
import Http from '@/utils/http';
import ShowJson from '../showJson';
-
-const useStyles = createStyles(({ token, css }) => {
-
-})
+import ShuttleView from './view'
const ShuttleDrawer = (props) => {
const intl = useIntl();
- const { styles } = useStyles();
const { curSprite, curFloor } = props;
- const [activeTabKey, setActiveTabKey] = useState('json');
+ const [activeTabKey, setActiveTabKey] = useState('view');
+ const [curNo, setCurNo] = React.useState(''); // just used to modify the drawer title
useEffect(() => {
- props.setDrawerTitle(curSprite.data.no);
- }, [curSprite]);
+ if (!curSprite) {
+ return
+ }
+ props.setDrawerTitle(intl.formatMessage({ id: 'map.loc.no', defaultMessage: '搴撲綅鍙�' }) + ': ' + curNo);
+ }, [curNo]);
const contentList = {
+ view: (
+ <ShuttleView
+ curNo={curNo}
+ data={curSprite.data}
+ curFloor={curFloor}
+ />
+ ),
json: (
<ShowJson
data={curSprite.data}
@@ -38,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