king
2024-03-08 1bec8d69cf14bd88591eee5b0320c5c8f6c25a08
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
@@ -68,7 +68,7 @@
        editable: true,
        required: false,
        keyCol: true,
        width: '12%',
        width: '8%',
        render: (text) => {
          if (text === 'image') {
            return '图片'
@@ -90,7 +90,7 @@
        inputType: 'radio',
        editable: true,
        required: false,
        width: '12%',
        width: '10%',
        render: (text) => {
          if (text !== 'false') {
            return '是'
@@ -122,11 +122,33 @@
        editable: true,
        required: false,
        keyVals: ['number'],
        width: '12%',
        width: '10%',
        render: (text, record) => {
          if (record.type !== 'number') return ''
          if (text === 'true') {
            return '是'
          } else {
            return '否'
          }
        },
        options: [
          {value: 'true', text: '是'},
          {value: 'false', text: '否'}
        ]
      },
      {
        title: '0值导出',
        dataIndex: 'noValue',
        inputType: 'radio',
        editable: true,
        required: false,
        keyVals: ['number'],
        width: '10%',
        render: (text, record) => {
          if (record.type !== 'number') return ''
          if (text !== 'false') {
            return '是'
          } else {
            return '否'
@@ -235,6 +257,7 @@
      col.type = col.type || 'text'
      col.output = col.output || 'true'
      col.required = col.required || 'false'
      col.noValue = col.noValue || 'true'
      if (!['text', 'image', 'number'].includes(col.type)) {
        if (/^Decimal/ig.test(col.type)) {
@@ -411,7 +434,7 @@
    })
  }
  columnChange = (values) => {
  columnChange = (values, callback) => {
    let verify = JSON.parse(JSON.stringify(this.state.verify))
    let fields = verify.columns.map(item => item.Column)
@@ -422,6 +445,8 @@
        duration: 5
      })
      return
    } else {
      callback()
    }
    values.uuid = Utils.getuuid()
    values.abs = 'false'
@@ -528,6 +553,26 @@
        return
      }
      if (verify.dataType === 'custom') {
        if (this.scriptsForm && this.scriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.scriptsForm.props.form.getFieldValue('sql'))) {
          notification.warning({
            top: 92,
            message: '存在未保存脚本,请点击确定保存,或点击取消放弃修改!',
            duration: 5
          })
          this.setState({activeKey: 'scripts'})
          return
        }
      }
      if (this.columnRef && this.columnRef.state.editingKey) {
        notification.warning({
          top: 92,
          message: '字段未保存!',
          duration: 5
        })
        return
      }
      if (card.intertype === 'system' && verify.dataType !== 'custom' && verify.columns.length > 0 && config.$c_ds && config.setting.interType === 'system' && config.columns && config.columns.length > 0) {
        let cols = []
        let columns = config.columns.map(c => c.field)
@@ -585,15 +630,6 @@
          })
        })
      } else if (activeKey === 'columns') {
        if (this.columnRef && this.columnRef.state.editingKey) {
          notification.warning({
            top: 92,
            message: '字段未保存!',
            duration: 5
          })
          return
        }
        if (this.props.card.intertype !== 'system' || verify.dataType !== 'custom') {
          resolve(verify)
        } else {
@@ -612,15 +648,6 @@
          }, verify.scripts)
        }
      } else if (activeKey === 'scripts') {
        if (this.scriptsForm && this.scriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.scriptsForm.props.form.getFieldValue('sql'))) {
          notification.warning({
            top: 92,
            message: '存在未保存脚本,请点击确定保存,或点击取消放弃修改!',
            duration: 5
          })
          return
        }
        this.setState({loading: true})
        this.sqlverify(() => { // 验证成功
          this.setState({
@@ -775,6 +802,8 @@
      col.type = col.type || 'text'
      col.output = col.output || 'true'
      col.required = col.required || 'false'
      col.noValue = col.noValue || 'true'
      col.Width = col.Width || 20
      if (!['text', 'image', 'number'].includes(col.type)) {
        if (/^Decimal/ig.test(col.type)) {