| | |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | 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 ( |
| | |
| | | [ |
| | | { |
| | | 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" />, |
| | | }, |