| | |
| | | class UniqueForm extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | field: PropTypes.any, |
| | | columns: PropTypes.array, // 列名集合 |
| | | signs: PropTypes.array, // 标记类型 |
| | | markChange: PropTypes.func // 修改函数 |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { columns, signs } = this.props |
| | | const { columns, signs, field } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const formItemLayout = { |
| | | labelCol: { |
| | |
| | | } |
| | | } |
| | | |
| | | let initVal = [] |
| | | if (field) { |
| | | initVal = [field, 'static'] |
| | | } |
| | | |
| | | return ( |
| | | <Form {...formItemLayout} className="normal-table-mark-form"> |
| | | <Row gutter={24}> |
| | | <Col span={6}> |
| | | <Form.Item label={'对比字段'}> |
| | | {getFieldDecorator('field', { |
| | | initialValue: [], |
| | | initialValue: initVal, |
| | | rules: [ |
| | | { |
| | | required: true, |