| | |
| | | form.resetFields(); |
| | | if (curSprite) { |
| | | form.setFieldsValue({ |
| | | shelfType: Utils.SHELF_TYPE.STORE, |
| | | ...curSprite.data |
| | | }) |
| | | } |
| | |
| | | // execute where the form was finished |
| | | const confirmSettings = () => { |
| | | if (curSprite && curSprite?.data?.type) { |
| | | curSprite.data = { ...curSprite.data, ...values } |
| | | curSprite.data = { ...curSprite.data, ...values }; |
| | | Utils.showSheflType(curSprite); |
| | | } |
| | | message.success(intl.formatMessage({ id: 'common.success', defaultMessage: '操作成功' })); |
| | | } |
| | |
| | | <span>{curSprite?.data?.type}</span> |
| | | </Form.Item> |
| | | <Form.Item |
| | | label={intl.formatMessage({ id: 'map.settings.uuid', defaultMessage: '地图号' })} |
| | | label={intl.formatMessage({ id: 'map.settings.uuid', defaultMessage: '图号' })} |
| | | > |
| | | <span>{curSprite?.data?.uuid}</span> |
| | | </Form.Item> |
| | | |
| | | {curSprite?.data?.type === Utils.SENSOR_TYPE.AGV && ( |
| | | <> |
| | | |
| | | </> |
| | | )} |
| | | |
| | | {curSprite?.data?.type === Utils.SENSOR_TYPE.SHUTTLE && ( |
| | | <> |
| | | |
| | | </> |
| | |
| | | label={intl.formatMessage({ id: 'map.settings.shelf.type', defaultMessage: '类型' })} |
| | | rules={[ |
| | | { |
| | | required: false, |
| | | required: true, |
| | | }, |
| | | ]} |
| | | > |
| | |
| | | style={{ width: 120 }} |
| | | options={[ |
| | | { |
| | | label: '库位', |
| | | value: 'loc' |
| | | label: intl.formatMessage({ id: 'map.settings.shelf.store', defaultMessage: '库位' }), |
| | | value: Utils.SHELF_TYPE.STORE |
| | | }, |
| | | { |
| | | label: '轨道', |
| | | value: 'track' |
| | | label: intl.formatMessage({ id: 'map.settings.shelf.track', defaultMessage: '轨道' }), |
| | | value: Utils.SHELF_TYPE.TRACK |
| | | }, |
| | | { |
| | | label: '禁用', |
| | | value: 'disable' |
| | | label: intl.formatMessage({ id: 'map.settings.shelf.diable', defaultMessage: '禁用' }), |
| | | value: Utils.SHELF_TYPE.DISABLE |
| | | }, |
| | | ]} |
| | | /> |
| | | </Form.Item> |
| | | <Form.Item |
| | | name='top' |
| | | label={intl.formatMessage({ id: 'map.settings.shelf.top', defaultMessage: '上' })} |
| | | rules={[ |
| | | { |
| | | required: false, |
| | | }, |
| | | ]} |
| | | label={intl.formatMessage({ id: 'map.settings.shelf.space', defaultMessage: '间距' })} |
| | | > |
| | | <InputNumber |
| | | style={{ |
| | | width: '50%', |
| | | }} |
| | | /> |
| | | <Space.Compact> |
| | | <Form.Item |
| | | name='top' |
| | | noStyle |
| | | > |
| | | <InputNumber |
| | | addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.top' defaultMessage='上' /></Space.Compact>} |
| | | style={{ |
| | | width: '50%', |
| | | }} |
| | | /> |
| | | </Form.Item> |
| | | <Form.Item |
| | | name='bottom' |
| | | noStyle |
| | | > |
| | | <InputNumber |
| | | addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.bottom' defaultMessage='下' /></Space.Compact>} |
| | | style={{ |
| | | width: '50%', |
| | | }} |
| | | /> |
| | | </Form.Item> |
| | | </Space.Compact> |
| | | </Form.Item> |
| | | <Form.Item |
| | | name='right' |
| | | label={intl.formatMessage({ id: 'map.settings.shelf.right', defaultMessage: '右' })} |
| | | rules={[ |
| | | { |
| | | required: false, |
| | | }, |
| | | ]} |
| | | label={' '} |
| | | > |
| | | <InputNumber |
| | | style={{ |
| | | width: '50%', |
| | | }} |
| | | /> |
| | | </Form.Item> |
| | | <Form.Item |
| | | name='bottom' |
| | | label={intl.formatMessage({ id: 'map.settings.shelf.bottom', defaultMessage: '下' })} |
| | | rules={[ |
| | | { |
| | | required: false, |
| | | }, |
| | | ]} |
| | | > |
| | | <InputNumber |
| | | style={{ |
| | | width: '50%', |
| | | }} |
| | | /> |
| | | </Form.Item> |
| | | <Form.Item |
| | | name='left' |
| | | label={intl.formatMessage({ id: 'map.settings.shelf.left', defaultMessage: '左' })} |
| | | rules={[ |
| | | { |
| | | required: false, |
| | | }, |
| | | ]} |
| | | > |
| | | <InputNumber |
| | | style={{ |
| | | width: '50%', |
| | | }} |
| | | /> |
| | | <Space.Compact> |
| | | <Form.Item |
| | | name='left' |
| | | noStyle |
| | | > |
| | | <InputNumber |
| | | addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.left' defaultMessage='左' /></Space.Compact>} |
| | | style={{ |
| | | width: '50%', |
| | | }} |
| | | /> |
| | | </Form.Item> |
| | | <Form.Item |
| | | name='right' |
| | | noStyle |
| | | > |
| | | <InputNumber |
| | | addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.right' defaultMessage='右' /></Space.Compact>} |
| | | style={{ |
| | | width: '50%', |
| | | }} |
| | | /> |
| | | </Form.Item> |
| | | </Space.Compact> |
| | | </Form.Item> |
| | | <Form.Item |
| | | name='value' |
| | | label={intl.formatMessage({ id: 'map.settings.shelf.value', defaultMessage: '地图值' })} |
| | | rules={[ |
| | | { |
| | | required: false, |
| | | }, |
| | | ]} |
| | | > |
| | | <Input |
| | | style={{ |