| | |
| | | |
| | | this.props.form.setFieldsValue({ |
| | | sql: record.sql, |
| | | result: record.result, |
| | | errmsg: record.errmsg, |
| | | errorCode: record.errorCode |
| | | }) |
| | |
| | | this.props.form.validateFieldsAndScroll((err, values) => { |
| | | if (!err) { |
| | | values.uuid = this.state.editItem ? this.state.editItem.uuid : '' |
| | | values.resultName = values.result === 'false' ? '不存在' : '存在' |
| | | |
| | | this.props.customChange(values) |
| | | this.setState({ |
| | |
| | | }) |
| | | this.props.form.setFieldsValue({ |
| | | sql: '', |
| | | errmsg: '', |
| | | errorCode: 'E' |
| | | errmsg: '' |
| | | }) |
| | | } |
| | | }) |
| | |
| | | } |
| | | } |
| | | return ( |
| | | <Form {...formItemLayout} className="custom-verify-form" id="verifycard2"> |
| | | <Form {...formItemLayout} className="verify-form" id="verifycard2"> |
| | | <Row gutter={24}> |
| | | <Col span={10} className="sql"> |
| | | <Col span={21} className="sql"> |
| | | <Form.Item label={'sql'}> |
| | | {getFieldDecorator('sql', { |
| | | initialValue: '', |
| | |
| | | message: this.props.dict['form.required.input'] + 'sql!' |
| | | } |
| | | ] |
| | | })(<TextArea rows={3} />)} |
| | | })(<TextArea rows={2} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={6}> |
| | | <Form.Item label={'报错信息'}> |
| | | <Col span={3} className="add"> |
| | | <Button onClick={this.handleConfirm} type="primary" className="add-row"> |
| | | 确定 |
| | | </Button> |
| | | </Col> |
| | | <Col span={7}> |
| | | <Form.Item label={'结果'}> |
| | | {getFieldDecorator('result', { |
| | | initialValue: 'true', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.select'] + '结果!' |
| | | } |
| | | ] |
| | | })( |
| | | <Select> |
| | | <Select.Option value="true"> 存在 </Select.Option> |
| | | <Select.Option value="false"> 不存在 </Select.Option> |
| | | </Select> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={7}> |
| | | <Form.Item label={'提示信息'}> |
| | | {getFieldDecorator('errmsg', { |
| | | initialValue: '', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.input'] + '报错信息!' |
| | | message: this.props.dict['form.required.input'] + '提示信息!' |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={6}> |
| | | <Col span={7}> |
| | | <Form.Item label={'报错编码'}> |
| | | {getFieldDecorator('errorCode', { |
| | | initialValue: 'E', |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={2} className="add"> |
| | | <Button onClick={this.handleConfirm} type="primary" className="add-row"> |
| | | 确定 |
| | | </Button> |
| | | </Col> |
| | | |
| | | </Row> |
| | | </Form> |
| | | ) |