| | |
| | | import { Form, Row, Col, Button, Input, InputNumber } from 'antd' |
| | | import './index.scss' |
| | | |
| | | |
| | | class UniqueForm extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | range: PropTypes.any, // 字典项 |
| | | columns: PropTypes.array, // 列名集合 |
| | | columnChange: PropTypes.func // 修改函数 |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | handleConfirm = () => { |
| | | // const { columns } = this.props |
| | | // 表单提交时检查输入值是否正确 |
| | | this.props.form.validateFieldsAndScroll((err, values) => { |
| | | if (!err) { |
| | | values.uuid = this.state.editItem ? this.state.editItem.uuid : '' |
| | | |
| | | // let _col = columns.filter(col => col.uuid !== values.uuid && col.Column === values.Column) |
| | | // if (_col.length > 0) { |
| | | // notification.warning({ |
| | | // top: 92, |
| | | // message: 'Excel列字段名,不可重复!', |
| | | // duration: 10 |
| | | // }) |
| | | // return |
| | | // } |
| | | |
| | | this.props.columnChange(values) |
| | | this.setState({ |
| | | editItem: null |