king
2024-02-27 ffc81ccbf6493386824f020c77869a737ce6fce5
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
@@ -530,6 +530,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)
@@ -587,15 +607,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 {
@@ -614,15 +625,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({
@@ -777,6 +779,7 @@
      col.type = col.type || 'text'
      col.output = col.output || 'true'
      col.required = col.required || 'false'
      col.Width = col.Width || 20
      if (!['text', 'image', 'number'].includes(col.type)) {
        if (/^Decimal/ig.test(col.type)) {