From 0d04bc5d8080b82338302fba0a59fccff2eaedfc Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期日, 06 七月 2025 11:28:29 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/drawer/conveyor/index.jsx | 28 +++++++++++++++++++++++-----
1 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/drawer/conveyor/index.jsx b/zy-asrs-flow/src/pages/map/drawer/conveyor/index.jsx
index 4fa72cc..70daece 100644
--- a/zy-asrs-flow/src/pages/map/drawer/conveyor/index.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/conveyor/index.jsx
@@ -5,17 +5,31 @@
import * as Utils from '../../utils'
import Http from '@/utils/http';
import ShowJson from '../showJson';
+import ConveyorView from './view'
-const useStyles = createStyles(({ token, css }) => {
-
-})
const ConveyorDrawer = (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.conveyor.no', defaultMessage: '杈撻�佺嚎绔欏彿' }) + ': ' + curNo);
+ }, [curNo]);
const contentList = {
+ view: (
+ <ConveyorView
+ curNo={curNo}
+ data={curSprite.data}
+ curFloor={curFloor}
+ />
+ ),
json: (
<ShowJson
data={props.curSprite.data}
@@ -32,6 +46,10 @@
type='inner'
tabList={[
{
+ key: 'view',
+ tab: intl.formatMessage({ id: 'map.drawer.conveyor.view.title', defaultMessage: '杈撻�佺嚎淇℃伅' }),
+ },
+ {
key: 'json',
tab: intl.formatMessage({ id: 'map.drawer.json', defaultMessage: 'JSON' }),
},
--
Gitblit v1.9.1