| | |
| | | import * as React from 'react' |
| | | import * as TWEEDLE from 'tweedle.js'; |
| | | import { FormattedMessage, useIntl, useModel } from '@umijs/max'; |
| | | import { Layout, Button, Flex, Row, Col, FloatButton, Select, notification, Segmented, message } from 'antd'; |
| | | import { Layout, Button, Flex, Row, Col, FloatButton, Select, notification, Segmented, message, Popconfirm } from 'antd'; |
| | | const { Header, Content } = Layout; |
| | | import { |
| | | AppstoreAddOutlined, |
| | |
| | | }, [curSprite]); |
| | | const prevCurSprite = prevCurSpriteRef.current; |
| | | |
| | | const clearLockPathConfirm = (e) => { |
| | | clearLockPath(curFloor); |
| | | }; |
| | | |
| | | const clearLockPath = async (floor) => { |
| | | const hide = message.loading(intl.formatMessage({ id: 'page.clearing', defaultMessage: '正在清空' })); |
| | | try { |
| | |
| | | |
| | | {model === MapModel.OBSERVER_MODEL && ( |
| | | <> |
| | | <Button |
| | | className='map-header-button' |
| | | size={'large'} |
| | | onClick={() => { |
| | | clearLockPath(curFloor) |
| | | }} |
| | | <Popconfirm |
| | | title="清空路径" |
| | | description="此操作可能导致小车碰撞,确认清空路径吗?" |
| | | onConfirm={clearLockPathConfirm} |
| | | okText="确认" |
| | | cancelText="取消" |
| | | > |
| | | <FormattedMessage id='map.clearLockPath' defaultMessage='清空路径' /> |
| | | </Button> |
| | | <Button |
| | | className='map-header-button' |
| | | size={'large'} |
| | | > |
| | | <FormattedMessage id='map.clearLockPath' defaultMessage='清空路径' /> |
| | | </Button> |
| | | </Popconfirm> |
| | | |
| | | |
| | | <Button |
| | | className='map-header-button' |