| | |
| | | 'map.settings.sub.copy.count': 'Count', |
| | | 'map.settings.sub.copy.gap': 'Gap', |
| | | 'map.settings.sub.copy.id': 'ID', |
| | | 'map.settings.sub.copy.shelf.auto-increment-value': 'Increment Value', |
| | | 'map.settings.sub.copy.increment.mode': 'Increment Mode', |
| | | 'map.settings.sub.copy.ascend': 'Ascending', |
| | | 'map.settings.sub.copy.descend': 'Descending', |
| | | '': '', |
| | | '': '', |
| | | '': '', |
| | |
| | | import React, { useState, useRef, useEffect } from 'react'; |
| | | import { Col, Form, Input, Row, Checkbox, Slider, Select, Drawer, Space, Button, InputNumber, Switch } from 'antd'; |
| | | import { Col, Form, Input, Row, Checkbox, Slider, Select, Drawer, Space, Button, InputNumber, Segmented } from 'antd'; |
| | | import { FormattedMessage, useIntl, useModel } from '@umijs/max'; |
| | | import { createStyles } from 'antd-style'; |
| | | import * as Utils from '../utils' |
| | |
| | | style={{ |
| | | width: '60%', |
| | | }} |
| | | // min={0} |
| | | // min={0} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | {curSprite?.data?.type === 'AGV' && ( |
| | | <Col span={24}> |
| | | <Form.Item |
| | | name='id' |
| | | label={intl.formatMessage({ id: 'map.settings.sub.copy.id', defaultMessage: '序号' })} |
| | | labelCol={{ span: 8 }} |
| | | > |
| | | <InputNumber |
| | | style={{ |
| | | width: '60%', |
| | | }} |
| | | min={0} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | {curSprite?.data?.type === Utils.SENSOR_TYPE.AGV && ( |
| | | <> |
| | | <Col span={24}> |
| | | <Form.Item |
| | | name='id' |
| | | label={intl.formatMessage({ id: 'map.settings.sub.copy.id', defaultMessage: '序号' })} |
| | | labelCol={{ span: 8 }} |
| | | > |
| | | <InputNumber |
| | | style={{ |
| | | width: '60%', |
| | | }} |
| | | min={0} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | </> |
| | | )} |
| | | |
| | | {curSprite?.data?.type === Utils.SENSOR_TYPE.SHELF && ( |
| | | <> |
| | | <Col span={24}> |
| | | <Form.Item |
| | | label={intl.formatMessage({ id: 'map.settings.sub.copy.shelf.auto-increment-value', defaultMessage: '自增长值' })} |
| | | labelCol={{ span: 8 }} |
| | | > |
| | | <Segmented |
| | | block |
| | | options={[ |
| | | { |
| | | label: intl.formatMessage({ id: 'map.settings.shelf.row', defaultMessage: '排' }), |
| | | value: 'row' |
| | | }, |
| | | { |
| | | label: intl.formatMessage({ id: 'map.settings.shelf.bay', defaultMessage: '列' }), |
| | | value: 'bay' |
| | | }, |
| | | ]} |
| | | onChange={(value) => { |
| | | }} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item |
| | | label={intl.formatMessage({ id: 'map.settings.sub.copy.increment.mode', defaultMessage: '增长方式' })} |
| | | labelCol={{ span: 8 }} |
| | | > |
| | | <Segmented |
| | | block |
| | | options={[ |
| | | { |
| | | label: intl.formatMessage({ id: 'map.settings.sub.copy.ascend', defaultMessage: '升序' }), |
| | | value: 'Ascending' |
| | | }, |
| | | { |
| | | label: intl.formatMessage({ id: 'map.settings.sub.copy.descend', defaultMessage: '降序' }), |
| | | value: 'Descending' |
| | | }, |
| | | ]} |
| | | onChange={(value) => { |
| | | }} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | </> |
| | | )} |
| | | |
| | | </Row> |
| | |
| | | </Form.Item> |
| | | <Form.Item> |
| | | <Button |
| | | type="dashed" |
| | | type="link" |
| | | onClick={() => { |
| | | if (lastCopiedSprites) { |
| | | lastCopiedSprites.forEach(copiedSprite => { |