| | |
| | | 'map.enable': 'Enable', |
| | | 'map.diable': 'Disable', |
| | | 'map.handle': 'Handle', |
| | | 'map.command': 'Command', |
| | | 'map.loc.sts': 'Location Status', |
| | | 'map.loc.operation': 'Location Operation', |
| | | 'map.loc.lock': 'Lock', |
| | |
| | | curFloor={curFloor} |
| | | setDrawerTitle={setDrawerTitle} |
| | | setDrawerWidth={setDrawerWidth} |
| | | refCurr={props.refCurr} |
| | | /> |
| | | </> |
| | | )} |
New file |
| | |
| | | import React, { useState, useRef, useEffect } from 'react'; |
| | | import { Col, Form, Input, Row, Switch, Slider, message, Drawer, Space, Button, InputNumber, Segmented } from 'antd'; |
| | | import { FormattedMessage, useIntl, useModel } from '@umijs/max'; |
| | | import { createStyles } from 'antd-style'; |
| | | import Http from '@/utils/http'; |
| | | |
| | | const useStyles = createStyles(({ token, css }) => { |
| | | |
| | | }) |
| | | |
| | | const ShuttleHandle = (props) => { |
| | | const intl = useIntl(); |
| | | const { styles } = useStyles(); |
| | | |
| | | useEffect(() => { |
| | | |
| | | }, []); |
| | | |
| | | const handleCancel = () => { |
| | | props.onClose(); |
| | | } |
| | | |
| | | |
| | | return ( |
| | | <> |
| | | <Drawer |
| | | title={intl.formatMessage({ id: 'map.command', defaultMessage: '命令' })} |
| | | width={350} |
| | | closable={false} |
| | | open={props.open} |
| | | getContainer={props.refCurr} |
| | | rootStyle={{ position: "absolute" }} |
| | | onClose={handleCancel} |
| | | extra={ |
| | | <Space> |
| | | <Button onClick={handleCancel}> |
| | | <FormattedMessage id='common.cancel' defaultMessage='取消' /> |
| | | </Button> |
| | | {/* <Button onClick={handleOk} type="primary"> |
| | | <FormattedMessage id='common.submit' defaultMessage='确定' /> |
| | | </Button> */} |
| | | </Space> |
| | | } |
| | | > |
| | | <h1>asds</h1> |
| | | |
| | | </Drawer> |
| | | </> |
| | | ) |
| | | |
| | | } |
| | | |
| | | export default ShuttleHandle; |
| | |
| | | curNo={curNo} |
| | | data={curSprite.data} |
| | | curFloor={curFloor} |
| | | refCurr={props.refCurr} |
| | | /> |
| | | ), |
| | | json: ( |
| | |
| | | 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> |