| | |
| | | import { FormattedMessage, useIntl, useModel } from '@umijs/max'; |
| | | import { createStyles } from 'antd-style'; |
| | | import * as Utils from '../utils' |
| | | import Http from '@/utils/http'; |
| | | import ShelfDrawer from './shelf'; |
| | | import AgvDrawer from './agv'; |
| | | import PointDrawer from './point' |
| | | |
| | | const useStyles = createStyles(({ token, css }) => { |
| | | |
| | |
| | | const MapDrawer = (props) => { |
| | | const intl = useIntl(); |
| | | const { styles } = useStyles(); |
| | | const { curSprite } = props; |
| | | |
| | | const handleCancel = () => { |
| | | props.onCancel(); |
| | | }; |
| | | |
| | | const handleOk = () => { |
| | | } |
| | | |
| | | return ( |
| | | <> |
| | |
| | | rootStyle={{ position: "absolute" }} |
| | | mask={false} |
| | | width={600} |
| | | style={{ |
| | | opacity: .8 |
| | | }} |
| | | extra={ |
| | | <Space> |
| | | <Button onClick={handleCancel}> |
| | | <FormattedMessage id='common.cancel' defaultMessage='取消' /> |
| | | </Button> |
| | | <Button onClick={handleOk} type="primary"> |
| | | <FormattedMessage id='common.submit' defaultMessage='保存' /> |
| | | </Button> |
| | | </Space> |
| | | } |
| | | /> |
| | | > |
| | | {props.curSprite?.data?.type === Utils.SENSOR_TYPE.SHELF && ( |
| | | <> |
| | | <ShelfDrawer |
| | | curSprite={curSprite} |
| | | /> |
| | | </> |
| | | )} |
| | | {props.curSprite?.data?.type === Utils.SENSOR_TYPE.POINT && ( |
| | | <> |
| | | <PointDrawer |
| | | curSprite={curSprite} |
| | | /> |
| | | </> |
| | | )} |
| | | {props.curSprite?.data?.type === Utils.SENSOR_TYPE.AGV && ( |
| | | <> |
| | | <AgvDrawer |
| | | curSprite={curSprite} |
| | | /> |
| | | </> |
| | | )} |
| | | </Drawer> |
| | | </> |
| | | ) |
| | | } |