From 83820ff6205f8a4502576f5cec48c911eb5f48a1 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 10 四月 2024 13:35:45 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx b/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx
index efbcb78..f3c5508 100644
--- a/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx
@@ -27,20 +27,26 @@
}
})
+
+
const ShuttleView = (props) => {
const intl = useIntl();
const { styles } = useStyles();
const { data } = props;
const [loading, setLoading] = React.useState(false);
+ const [info, setInfo] = React.useState(null);
useEffect(() => {
setLoading(true);
-
- setTimeout(() => {
-
+ const fetchShuttleInfo = async (shuttleNo) => {
+ const res = await Http.doGet('/api/map/shuttle/info', { shuttleNo: shuttleNo });
+ if (res?.data) {
+ setInfo(res.data);
+ }
setLoading(false);
- }, 300)
+ }
+ fetchShuttleInfo(data.no);
}, [data]);
return (
@@ -60,6 +66,11 @@
[
{
key: '1',
+ label: intl.formatMessage({ id: 'map.conveyor.no', defaultMessage: '绌挎杞︾紪鍙�' }),
+ children: info?.shuttleNo,
+ },
+ {
+ key: '1',
label: intl.formatMessage({ id: 'map.loc.no', defaultMessage: '搴撲綅鍙�' }),
children: <Badge status="processing" text="Running" />,
},
--
Gitblit v1.9.1