| | |
| | | import * as Utils from '../../utils' |
| | | import Http from '@/utils/http'; |
| | | import BoolValueIcon from '@/components/BoolValueIcon'; |
| | | import ShuttleHandle from './handle'; |
| | | |
| | | const useStyles = createStyles(({ token, css }) => { |
| | | return { |
| | |
| | | }) |
| | | |
| | | const updateEnable = async (deviceNo, enable) => { |
| | | const resp = await Http.doPost('api/dict/update', {val}); |
| | | const resp = await Http.doPost('api/dict/update', { val }); |
| | | if (resp.code === 200) { |
| | | message.success(intl.formatMessage({ id: 'page.update.success', defaultMessage: '更新成功' })); |
| | | return true; |
| | |
| | | |
| | | const { data } = props; |
| | | const [loading, setLoading] = React.useState(false); |
| | | const [childrenDrawer, setChildrenDrawer] = useState(false); |
| | | const [info, setInfo] = React.useState(null); |
| | | |
| | | useEffect(() => { |
| | |
| | | label: intl.formatMessage({ id: 'map.dest.loc', defaultMessage: '目标库位' }), |
| | | children: info?.destLocNo, |
| | | }, |
| | | |
| | | |
| | | { |
| | | label: intl.formatMessage({ id: 'map.shuttle.batter.power', defaultMessage: '电池电量' }), |
| | | children: info?.batteryPower, |
| | |
| | | <Button className={styles.tableButton} size='default' disabled> |
| | | <FormattedMessage id='map.enable' defaultMessage='启用' /> |
| | | </Button> |
| | | <Button className={styles.tableButton} size='default'> |
| | | <Button |
| | | className={styles.tableButton} |
| | | size='default' |
| | | onClick={() => { |
| | | setChildrenDrawer(true); |
| | | }} |
| | | > |
| | | <FormattedMessage id='map.handle' defaultMessage='手动操作' /> |
| | | </Button> |
| | | </> |
| | |
| | | ] |
| | | } |
| | | /> |
| | | <ShuttleHandle |
| | | open={childrenDrawer} |
| | | refCurr={props.refCurr} |
| | | shuttleNo={data.no} |
| | | onClose={() => { |
| | | setChildrenDrawer(false) |
| | | }} |
| | | /> |
| | | </div> |
| | | )} |
| | | </div> |