king
2024-02-19 62e2946d9029a40b4406a39275c7863dccbbeadf
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
@@ -67,6 +67,7 @@
        inputType: 'select',
        editable: true,
        required: false,
        keyCol: true,
        width: '12%',
        render: (text) => {
          if (text === 'image') {
@@ -82,38 +83,6 @@
          {value: 'number', text: '数值'},
          {value: 'image', text: '图片'}
        ]
      },
      {
        title: '取绝对值',
        dataIndex: 'abs',
        inputType: 'radio',
        editable: true,
        required: false,
        width: '12%',
        render: (text, record) => {
          if (record.type !== 'number') return ''
          if (text === 'true') {
            return '是'
          } else {
            return '否'
          }
        },
        options: [
          {value: 'true', text: '是'},
          {value: 'false', text: '否'}
        ]
      },
      {
        title: '小数位',
        dataIndex: 'decimal',
        inputType: 'number',
        min: 0,
        max: 18,
        editable: true,
        required: false,
        width: '12%',
        render: (text, record) => record.type === 'number' ? text : ''
      },
      {
        title: '导出',
@@ -146,6 +115,40 @@
          {value: 'false', text: '否'}
        ]
      },
      {
        title: '取绝对值',
        dataIndex: 'abs',
        inputType: 'radio',
        editable: true,
        required: false,
        keyVals: ['number'],
        width: '12%',
        render: (text, record) => {
          if (record.type !== 'number') return ''
          if (text === 'true') {
            return '是'
          } else {
            return '否'
          }
        },
        options: [
          {value: 'true', text: '是'},
          {value: 'false', text: '否'}
        ]
      },
      {
        title: '小数位',
        dataIndex: 'decimal',
        inputType: 'number',
        min: 0,
        max: 18,
        editable: true,
        required: false,
        keyVals: ['number'],
        width: '12%',
        render: (text, record) => record.type === 'number' ? text : ''
      }
    ],
    scriptsColumns: [
      {
@@ -808,28 +811,32 @@
    const { card } = this.props
    const { activeKey, verify } = this.state
    if (card.intertype !== 'system' || verify.dataType !== 'custom') {
    if (activeKey === 'setting') {
      this.settingForm.handleConfirm().then(res => {
        if (card.intertype !== 'system' || verify.dataType !== 'custom') {
          this.setState({activeKey: val, verify: {...verify, ...res}})
        } else {
          this.setState({
            verify: {...verify, ...res}
          }, () => {
            this.setState({loading: true})
            this.sqlverify(() => { // 验证成功
              this.setState({
                activeKey: val,
                loading: false
              })
            }, () => {             // 验证失败
              this.setState({
                activeKey: val,
                loading: false
              })
            }, verify.scripts)
          })
        }
      })
    } else if (card.intertype !== 'system' || verify.dataType !== 'custom') {
      this.setState({activeKey: val})
      return
    } else if (activeKey === 'setting') {
      this.settingForm.handleConfirm().then(res => {
        this.setState({
          verify: {...verify, ...res}
        }, () => {
          this.setState({loading: true})
          this.sqlverify(() => { // 验证成功
            this.setState({
              activeKey: val,
              loading: false
            })
          }, () => {             // 验证失败
            this.setState({
              activeKey: val,
              loading: false
            })
          }, verify.scripts)
        })
      })
    } else if (activeKey === 'columns') {
      if (this.columnRef && this.columnRef.state.editingKey) {
        notification.warning({