king
2022-10-22 03a22ec6f9ad7303d10b4c65bb5bc6fa5cbd448a
src/menu/datasource/verifycard/index.jsx
@@ -739,6 +739,7 @@
  }
  pasteSubmit = () => {
    const { config } = this.props
    const { setting } = this.state
    this.pasteFormRef.handleConfirm().then(res => {
@@ -762,21 +763,35 @@
        res.data.setting.supModule = setting.supModule
      }
      this.setState({
        scripts: res.data.scripts.map(col => {
          col.uuid = Utils.getuuid()
          return col
        }),
        columns: res.data.columns.map(col => {
          col.uuid = Utils.getuuid()
          return col
        }),
        setting: res.data.setting,
        reload: true,
        pvisible: false
      }, () => {
        this.setState({reload: false})
      })
      if (config.subtype !== 'basetable') {
        this.setState({
          scripts: res.data.scripts.map(col => {
            col.uuid = Utils.getuuid()
            return col
          }),
          columns: res.data.columns.map(col => {
            col.uuid = Utils.getuuid()
            return col
          }),
          setting: res.data.setting,
          reload: true,
          pvisible: false
        }, () => {
          this.setState({reload: false})
        })
      } else {
        this.setState({
          scripts: res.data.scripts.map(col => {
            col.uuid = Utils.getuuid()
            return col
          }),
          setting: res.data.setting,
          reload: true,
          pvisible: false
        }, () => {
          this.setState({reload: false})
        })
      }
    })
  }
@@ -834,7 +849,7 @@
              wrappedComponentRef={(inst) => this.settingForm = inst}
            /> : null}
          </TabPane>
          <TabPane tab={
          {config.subtype !== 'basetable' ? <TabPane tab={
            <span>
              字段集
              {columns.length ? <span className="count-tip">{columns.length}</span> : null}
@@ -848,7 +863,7 @@
              updatefield={this.updatefields}
            />
            <EditTable actions={['edit', 'move', 'copy', 'del', 'clear']} type="datasourcefield" wrappedComponentRef={(inst) => this.datasource = inst} data={columns} columns={colColumns} onChange={(columns) => this.setState({columns})}/>
          </TabPane>
          </TabPane> : null}
          <TabPane tab={
            <span>
              自定义脚本