king
2020-11-24 0f79daefced8980fa571dd3d2c781a0e3646614f
src/templates/sharecomponent/actioncomponent/verifyexcelout/columnform/index.jsx
@@ -6,37 +6,14 @@
class ExcelOutColumn extends Component {
  static propTpyes = {
    dict: PropTypes.object,         // 字典项
    columns: PropTypes.array,       // 列名集合
    columnChange: PropTypes.func    // 修改函数
  }
  state = {
    editItem: null // 编辑元素
  }
  edit = (record) => {
    this.setState({
      editItem: record
    })
    this.props.form.setFieldsValue({
      Column: record.Column,
      Text: record.Text,
      Width: record.Width
    })
  }
  handleConfirm = () => {
    // 表单提交时检查输入值是否正确
    this.props.form.validateFieldsAndScroll((err, values) => {
      if (!err) {
        values.uuid = this.state.editItem ? this.state.editItem.uuid : ''
        this.props.columnChange(values)
        this.setState({
          editItem: null
        })
        this.props.form.setFieldsValue({
          Column: '',
          Text: '',
@@ -104,7 +81,7 @@
          </Col>
          <Col span={3} className="add">
            <Button onClick={this.handleConfirm} type="primary" className="mk-green">
              保存
              添加
            </Button>
          </Col>
        </Row>