| | |
| | | // 表单提交时检查输入值是否正确 |
| | | this.props.form.validateFieldsAndScroll((err, values) => { |
| | | if (!err) { |
| | | if (/^[\s\n]+$/.test(values.sql)) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '请输入sql!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | values.uuid = this.state.editItem ? this.state.editItem.uuid : '' |
| | | |
| | | let _quot = values.sql.match(/'{1}/g) |
| | |
| | | loading: false |
| | | }) |
| | | |
| | | MKEmitter.emit('editLineId', values.uuid) |
| | | if (values.uuid) { |
| | | MKEmitter.emit('editLineId', values.uuid) |
| | | } |
| | | |
| | | this.props.form.setFieldsValue({ |
| | | sql: ' ' |
| | |
| | | message: '请输入sql!' |
| | | } |
| | | ] |
| | | })(<CodeMirror />)} |
| | | })(<CodeMirror/>)} |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |