| | |
| | | } |
| | | |
| | | clear = () => { |
| | | let _this = this |
| | | let that = this |
| | | confirm({ |
| | | title: '确定清除历史记录吗?', |
| | | content: '', |
| | | onOk() { |
| | | localStorage.removeItem('replaceRecord') |
| | | _this.setState({fields: [], labels: []}) |
| | | that.setState({fields: [], labels: []}) |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | |
| | | {getFieldDecorator('resource', { |
| | | initialValue: 'custom' |
| | | })( |
| | | <Radio.Group onChange={(e) => this.setState({resource: e.target.value})}> |
| | | <Radio.Group onChange={(e) => {this.setState({resource: e.target.value});this.props.form.setFieldsValue({reType: 'field'})}}> |
| | | <Radio value="dict">数据字典</Radio> |
| | | <Radio value="custom">自定义</Radio> |
| | | </Radio.Group> |
| | |
| | | })( |
| | | <Radio.Group onChange={(e) => this.setState({reType: e.target.value})}> |
| | | <Radio value="field">字段 <SwapRightOutlined /> 名称</Radio> |
| | | <Radio value="name">原字段 <SwapRightOutlined /> 新字段</Radio> |
| | | <Radio disabled={resource === 'dict'} value="name">原字段 <SwapRightOutlined /> 新字段</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |