| | |
| | | |
| | | class CustomForm extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | btn: PropTypes.object, // 按钮 |
| | | usefulfields: PropTypes.string, // 可用字段 |
| | | initsql: PropTypes.string, // 可用字段 |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={21} className="sql"> |
| | | <Form.Item label={'sql'}> |
| | | <Form.Item label="sql"> |
| | | {getFieldDecorator('sql', { |
| | | initialValue: '', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.input'] + 'sql!' |
| | | message: '请输入sql!' |
| | | } |
| | | ] |
| | | })(<CodeMirror />)} |
| | |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.select'] + '结果处理!' |
| | | message: '请选择结果处理!' |
| | | } |
| | | ] |
| | | })( |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={7}> |
| | | <Form.Item label={'提示信息'}> |
| | | <Form.Item label="提示信息"> |
| | | {getFieldDecorator('errmsg', { |
| | | initialValue: '', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.input'] + '提示信息!' |
| | | message: '请输入提示信息!' |
| | | }, |
| | | { |
| | | pattern: /^[^']*$/ig, |
| | |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.select'] + '报错编码!' |
| | | message: '请选择报错编码!' |
| | | } |
| | | ] |
| | | })( |