king
2024-08-25 326aa6b3effaccc71cfe0775d47b0f29eb3695a6
src/templates/comtableconfig/updatetable/index.jsx
@@ -29,7 +29,7 @@
  trigger = () => {
    const { config } = this.props
    const _this = this
    const that = this
    if (!config.enabled) {
      notification.warning({
@@ -45,7 +45,7 @@
      content: '',
      onOk() {
        return new Promise(resolve => {
          _this.execUpdate(resolve)
          that.execUpdate(resolve)
        })
      },
      onCancel() {}
@@ -87,14 +87,13 @@
    let formActions = []
    let popActions = []
    let errors = []
    let formTabs = []
    let mainTb = {name: '主表', uuid: Utils.getuuid(), useMSearch: 'false', isMain: true}
    let oldtabs = {
      mainTable: mainTb.uuid
    }
    let tbl = this.getTable(config, mainTb, errors, formActions, formTabs, popActions, oldtabs)
    let tbl = this.getTable(config, mainTb, errors, formActions, popActions, oldtabs)
    if (config.autoMatic && config.autoMatic.enable === 'true') {
      if (tbl.action.filter(item => item.uuid === config.autoMatic.action && (['pop', 'prompt', 'exec'].includes(item.OpenType) || (item.OpenType === 'funcbutton' && item.funcType === 'print'))).length === 0) {
@@ -111,7 +110,11 @@
    let _tbs = []
    if (config.tabgroups && config.tabgroups.length > 0) {
      config.tabgroups.forEach(m => {
        if (!m.sublist || m.sublist.length === 0) return
        if (!m.sublist) return
        m.sublist = m.sublist.filter(c => !!c.linkTab)
        if (m.sublist.length === 0) return
        let tabs = {
          uuid: Utils.getuuid(),
@@ -120,7 +123,7 @@
          setting: {},
          style: {},
          subtabs: m.sublist.map(n => {
            let tab = { uuid: Utils.getuuid(), label: n.label, icon: n.icon, permission: 'false', components: [
            let tab = { uuid: Utils.getuuid(), label: n.label, icon: n.icon, permission: 'true', components: [
              {
                uuid: Utils.getuuid(),
                linkTab: n.linkTab,
@@ -147,7 +150,7 @@
      let defers = _tbs.map((item, i) => {
        return new Promise((resolve) => {
          setTimeout(() => {
            Api.getSystemConfig({
            Api.getCloudConfig({
              func: 'sPC_Get_LongParam',
              MenuID: item.linkTab
            }).then(res => {
@@ -188,10 +191,12 @@
          }
        })
        let supIds = []
        _config.components = _config.components.map(item => {
          if (item.type === 'tabs') {
            item.subtabs = item.subtabs.map(tab => {
              tab.components[0] = this.getTable(menus[tab.components[0].linkTab], tab.components[0], errors, formActions, formTabs, popActions, oldtabs)
              tab.components[0] = this.getTable(menus[tab.components[0].linkTab], tab.components[0], errors, formActions, popActions, oldtabs)
              supIds.push([item.uuid, tab.uuid, tab.components[0].uuid])
              return tab
            })
@@ -199,19 +204,35 @@
          return item
        })
        this.setPopView(_resolve, _config, formActions, formTabs, popActions, errors)
        _config.components = _config.components.map(item => {
          if (item.type === 'tabs') {
            item.subtabs = item.subtabs.map(tab => {
              if (tab.components[0].setting.supModule && tab.components[0].setting.supModule.length === 1) {
                supIds.forEach(ids => {
                  if (ids[2] === tab.components[0].setting.supModule[0]) {
                    tab.components[0].setting.supModule = ids
                  }
                })
              }
              return tab
            })
          }
          return item
        })
        this.setPopView(_resolve, _config, formActions, popActions, errors)
      })
    } else {
      this.setPopView(_resolve, _config, formActions, formTabs, popActions, errors)
      this.setPopView(_resolve, _config, formActions, popActions, errors)
    }
  }
  setPopView = (_resolve, _config, formActions, formTabs, popActions, errors) => {
  setPopView = (_resolve, _config, formActions, popActions, errors) => {
    if (popActions.length > 0) {
      let defers = popActions.map((item, i) => {
        return new Promise((resolve) => {
          setTimeout(() => {
            Api.getSystemConfig({
            Api.getCloudConfig({
              func: 'sPC_Get_LongParam',
              MenuID: item.linkTab
            }).then(res => {
@@ -267,7 +288,7 @@
                      MenuName: btn.label,
                      tables: _config.tables || [],
                      Template: 'BaseTable',
                      components: [this.getTable(menus[btn.uuid], mainTb, errors, formActions, formTabs)],
                      components: [this.getTable(menus[btn.uuid], mainTb, errors, formActions)],
                      viewType: 'popview',
                      style: { backgroundColor: '#ffffff', backgroundImage: '', paddingTop: '16px', paddingBottom: '40px', paddingLeft: '16px', paddingRight: '16px' }
                    }
@@ -279,8 +300,9 @@
                }
              })
              tab.components[0].cols.forEach(col => {
                if (col.type !== 'action') return
                if (col.type !== 'custom') return
                col.elements.forEach(btn => {
                  if (btn.eleType !== 'button') return
                  if (btn.OpenType === 'popview') {
                    if (menus[btn.uuid]) {
                      let mainTb = {name: '主表', uuid: Utils.getuuid(), useMSearch: 'false'}
@@ -292,7 +314,7 @@
                        MenuName: btn.label,
                        tables: _config.tables || [],
                        Template: 'BaseTable',
                        components: [this.getTable(menus[btn.uuid], mainTb, errors, formActions, formTabs)],
                        components: [this.getTable(menus[btn.uuid], mainTb, errors, formActions)],
                        viewType: 'popview',
                        style: { backgroundColor: '#ffffff', backgroundImage: '', paddingTop: '16px', paddingBottom: '40px', paddingLeft: '16px', paddingRight: '16px' }
                      }
@@ -318,7 +340,7 @@
                    MenuName: btn.label,
                    tables: _config.tables || [],
                    Template: 'BaseTable',
                    components: [this.getTable(menus[btn.uuid], mainTb, errors, formActions, formTabs)],
                    components: [this.getTable(menus[btn.uuid], mainTb, errors, formActions)],
                    viewType: 'popview',
                    style: { backgroundColor: '#ffffff', backgroundImage: '', paddingTop: '16px', paddingBottom: '40px', paddingLeft: '16px', paddingRight: '16px' }
                  }
@@ -330,8 +352,9 @@
              }
            })
            item.cols.forEach(col => {
              if (col.type !== 'action') return
              if (col.type !== 'custom') return
              col.elements.forEach(btn => {
                if (btn.eleType !== 'button') return
                if (btn.OpenType === 'popview') {
                  if (menus[btn.uuid]) {
                    let mainTb = {name: '主表', uuid: Utils.getuuid(), useMSearch: 'false'}
@@ -343,7 +366,7 @@
                      MenuName: btn.label,
                      tables: _config.tables || [],
                      Template: 'BaseTable',
                      components: [this.getTable(menus[btn.uuid], mainTb, errors, formActions, formTabs)],
                      components: [this.getTable(menus[btn.uuid], mainTb, errors, formActions)],
                      viewType: 'popview',
                      style: { backgroundColor: '#ffffff', backgroundImage: '', paddingTop: '16px', paddingBottom: '40px', paddingLeft: '16px', paddingRight: '16px' }
                    }
@@ -358,10 +381,10 @@
          }
        })
        this.setPopForm(_resolve, _config, formActions, formTabs, errors)
        this.setPopForm(_resolve, _config, formActions, errors)
      })
    } else {
      this.setPopForm(_resolve, _config, formActions, formTabs, errors)
      this.setPopForm(_resolve, _config, formActions, errors)
    }
  }
@@ -384,12 +407,12 @@
    return enabled
  }
  setPopForm = (_resolve, _config, formActions, formTabs, errors) => {
  setPopForm = (_resolve, _config, formActions, errors) => {
    if (formActions.length > 0) {
      let defers = formActions.map((item, i) => {
        return new Promise((resolve) => {
          setTimeout(() => {
            Api.getSystemConfig({
            Api.getCloudConfig({
              func: 'sPC_Get_LongParam',
              MenuID: item.origin
            }).then(res => {
@@ -406,6 +429,40 @@
  
                if (_LongParam) {
                  _LongParam.uuid = item.uuid
                  if (_LongParam.fields && _LongParam.fields.length === 0 && _LongParam.groups && _LongParam.groups.length > 0) {
                    _LongParam.groups.forEach(group => {
                      if (group.sublist && group.sublist.length > 0) {
                        _LongParam.fields.push({
                          uuid: Utils.getuuid(),
                          label: group.label,
                          field: '',
                          type: 'split'
                        })
                        _LongParam.fields.push(...group.sublist)
                      }
                    })
                  }
                  let span = _LongParam.setting && _LongParam.setting.cols ? (24 / _LongParam.setting.cols) : 12
                  if (![24, 12, 8].includes(span)) {
                    span = 12
                  }
                  if (_LongParam.fields) {
                    _LongParam.fields = _LongParam.fields.map(n => {
                      if (!n.span && n.type !== 'split') {
                        if (['textarea', 'hint', 'checkcard', 'brafteditor'].includes(n.type)) {
                          n.span = 24
                        } else {
                          n.span = span
                        }
                      }
                      return n
                    })
                  }
                  resolve(_LongParam)
                } else {
                  resolve({uuid: item.uuid, $empty: true})
@@ -450,8 +507,9 @@
                }
              })
              tab.components[0].cols.forEach(col => {
                if (col.type !== 'action') return
                if (col.type !== 'custom') return
                col.elements.forEach(btn => {
                  if (btn.eleType !== 'button') return
                  if (btn.OpenType === 'popview' && btn.config && btn.config.components[0]) {
                    this.setTbForm(btn.config.components[0], menus, errors, tab.components[0].name + '-' + btn.label)
                  } else if (btn.OpenType === 'pop' || (btn.OpenType === 'funcbutton' && btn.funcType === 'print' && btn.execMode === 'pop')) {
@@ -487,8 +545,9 @@
              }
            })
            item.cols.forEach(col => {
              if (col.type !== 'action') return
              if (col.type !== 'custom') return
              col.elements.forEach(btn => {
                if (btn.eleType !== 'button') return
                if (btn.OpenType === 'popview' && btn.config && btn.config.components[0]) {
                  this.setTbForm(btn.config.components[0], menus, errors, item.name + '-' + btn.label)
                } else if (btn.OpenType === 'pop' || (btn.OpenType === 'funcbutton' && btn.funcType === 'print' && btn.execMode === 'pop')) {
@@ -508,10 +567,10 @@
          }
        })
        this.saveConfig(_resolve, _config, errors, formTabs)
        this.saveConfig(_resolve, _config, errors)
      })
    } else {
      this.saveConfig(_resolve, _config, errors, formTabs)
      this.saveConfig(_resolve, _config, errors)
    }
  }
@@ -531,8 +590,9 @@
      }
    })
    item.cols.forEach(col => {
      if (col.type !== 'action') return
      if (col.type !== 'custom') return
      col.elements.forEach(btn => {
        if (btn.eleType !== 'button') return
        if (btn.OpenType === 'pop' || (btn.OpenType === 'funcbutton' && btn.funcType === 'print' && btn.execMode === 'pop')) {
          if (menus[btn.uuid]) {
            btn.modal = {
@@ -549,9 +609,9 @@
    })
  }
  saveConfig = (_resolve, _config, errors, formTabs) => {
  saveConfig = (_resolve, _config, errors) => {
    let err = errors.join(';')
    let _this = this
    let that = this
    if (err) {
      _resolve()
@@ -560,17 +620,17 @@
        content: '',
        onOk() {
          return new Promise(resolve => {
            _this.saveNewMenu(resolve, _config, formTabs)
            that.saveNewMenu(resolve, _config)
          })
        },
        onCancel() {}
      })
    } else {
      this.saveNewMenu(_resolve, _config, formTabs)
      this.saveNewMenu(_resolve, _config)
    }
  }
  saveNewMenu = (_resolve, _config, formTabs) => {
  saveNewMenu = (_resolve, _config) => {
    _config.components.forEach(item => {
      if (item.type === 'tabs') {
        item.subtabs.forEach(tab => {
@@ -580,8 +640,9 @@
            }
          })
          tab.components[0].cols.forEach(col => {
            if (col.type !== 'action') return
            if (col.type !== 'custom') return
            col.elements.forEach(btn => {
              if (btn.eleType !== 'button') return
              if (btn.OpenType === 'popview' && btn.config) {
                btn.config.$tables = getTables(btn.config.components[0])
              }
@@ -597,8 +658,9 @@
          }
        })
        item.cols.forEach(col => {
          if (col.type !== 'action') return
          if (col.type !== 'custom') return
          col.elements.forEach(btn => {
            if (btn.eleType !== 'button') return
            if (btn.OpenType === 'popview' && btn.config) {
              btn.config.$tables = getTables(btn.config.components[0])
            }
@@ -609,81 +671,38 @@
      }
    })
    // if (formTabs.length > 0) {
    //   this.transformTabs(_resolve, _config, formTabs)
    // } else {
      this.submitConfig(_resolve, _config)
    // }
    this.submitConfig(_resolve, _config)
  }
  transformTabs = (_resolve, _config, formTabs) => {
    let tab = formTabs.shift()
    Api.getSystemConfig({
      func: 'sPC_Get_LongParam',
      MenuID: tab.uuid
    }).then(res => {
      if (res.status) {
        let _LongParam = ''
        if (res.LongParam) {
          try {
            _LongParam = JSON.parse(window.decodeURIComponent(window.atob(res.LongParam)))
          } catch (e) {
            console.warn('Parse Failure')
            _LongParam = ''
          }
  checkBtns = (card) => {
    card.action.forEach(cell => {
      if (cell.hidden === 'true') return
      if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) {
        if (!cell.modal || cell.modal.fields.length === 0) {
          card.errors.push({ level: 0, detail: `按钮“${cell.label}”中表单尚未添加`})
        }
        if (_LongParam && (_LongParam.type === 'FormTab' || _LongParam.Template === 'FormTab') && _LongParam.enabled) {
          if (!_LongParam.tabgroups) {
            _LongParam.tabgroups = []
          } else if (typeof(_LongParam.tabgroups[0]) === 'string') {
            let _tabgroups = []
            _LongParam.tabgroups.forEach(groupId => {
              let _group = {
                uuid: groupId,
                sublist: fromJS(_LongParam[groupId]).toJS()
              }
              delete _LongParam[groupId]
              _tabgroups.push(_group)
            })
            _LongParam.tabgroups = _tabgroups
          }
          _LongParam.tabgroups = _LongParam.tabgroups.filter(group => group.sublist.length > 0)
          _LongParam.tabgroups.forEach(group => {
            group.sublist = group.sublist.map(tab => {
              if (tab.supMenu === 'mainTable') {
                tab.supMenu = ''
              }
              return tab
            })
          })
          _LongParam.action = _LongParam.action.map(item => {
            if (item.intertype === 'inner' && !item.innerFunc) {
              item.intertype = 'system'
            }
            return item
          })
          delete _LongParam.funcs
          delete _LongParam.tables
        } else {
          _config.components[0].action = _config.components[0].action.filter(btn => btn.uuid !== tab.uuid)
        }
      } else {
        notification.warning({
          top: 92,
          message: res.message,
          duration: 5
        })
        _resolve()
      } else if (cell.OpenType === 'excelIn' && (!cell.verify || !cell.verify.sheet || !cell.verify.columns || cell.verify.columns.length === 0)) {
        card.errors.push({ level: 0, detail: `按钮“${cell.label}”中导入列未设置!`})
      } else if (cell.OpenType === 'excelOut' && (!cell.verify || !cell.verify.columns || cell.verify.columns.length === 0)) {
        card.errors.push({ level: 0, detail: `按钮“${cell.label}”中导出列未设置!`})
      }
    })
    card.cols.forEach(col => {
      if (col.type !== 'custom') return
      col.elements.forEach(cell => {
        if (cell.hidden === 'true' || cell.eleType !== 'button') return
        if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) {
          if (!cell.modal || cell.modal.fields.length === 0) {
            card.errors.push({ level: 0, detail: `按钮“${cell.label}”中表单尚未添加`})
          }
        } else if (cell.OpenType === 'excelIn' && (!cell.verify || !cell.verify.sheet || !cell.verify.columns || cell.verify.columns.length === 0)) {
          card.errors.push({ level: 0, detail: `按钮“${cell.label}”中导入列未设置!`})
        } else if (cell.OpenType === 'excelOut' && (!cell.verify || !cell.verify.columns || cell.verify.columns.length === 0)) {
          card.errors.push({ level: 0, detail: `按钮“${cell.label}”中导出列未设置!`})
        }
      })
    })
  }
@@ -695,11 +714,14 @@
          if (tab.components[0].$tables) {
            tbs.push(...tab.components[0].$tables)
          }
          this.checkBtns(tab.components[0])
        })
      } else {
        if (item.$tables) {
          tbs.push(...item.$tables)
        }
        this.checkBtns(item)
      }
    })
@@ -751,17 +773,17 @@
      debug_md5: key,
      debug_url: url,
      debug_list: window.btoa(tbs),
      LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config)))
      LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))),
      LText: ''
    }
    param.LText = Utils.formatOptions(param.LText)
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.secretkey = Utils.encrypt(param.LText, param.timestamp)
    param.secretkey = Utils.encrypt('', param.timestamp)
    let save = false
    new Promise(resolve => {
      Api.getSystemConfig(param).then(res => {
      Api.getCloudConfig(param).then(res => {
        resolve(res)
      })
    }).then(res => { // 删除原菜单
@@ -772,7 +794,7 @@
      if (this.delButtons.length === 0) return res
      return Api.getSystemConfig({
      return Api.getCloudConfig({
        func: 'sPC_MainMenu_Del',
        up_type: 'Y',
        MenuID: this.delButtons.join(',')
@@ -812,7 +834,7 @@
    })
  }
  getTable = (config, newCon, errors, formActions, formTabs, popActions, oldtabs) => {
  getTable = (config, newCon, errors, formActions, popActions, oldtabs) => {
    let _card = {
      uuid: newCon.uuid,
      type: 'table',
@@ -824,7 +846,7 @@
      action: [],
      subtype: 'basetable',
      setting: { useMSearch: newCon.useMSearch },
      wrap: {},
      wrap: {name: newCon.name},
      style: {},
      headerStyle: {},
      columns: [],
@@ -853,7 +875,11 @@
    let lineMarks = []
    config.columns.forEach(col => {
      if (col.type === 'colspan') {
        _colspan.push(...col.subfield.split(', '))
        if (col.subfield) {
          _colspan.push(...col.subfield.split(', '))
        } else if (col.sublist && col.sublist.length > 0) {
          _colspan.push(...col.sublist)
        }
      }
      if (!col.field) return
@@ -924,7 +950,7 @@
        if (_colspan.includes(col.field)) {
          _col.Hide = 'true'
        }
        _col.uuid = Utils.getuuid()
        _card.cols.push(_col)
      }
@@ -935,14 +961,21 @@
          label: col.label,
          marks: [],
          isSub: false,
          uuid: col.uuid,
          uuid: Utils.getuuid(),
          blacklist: []
        }
        let _subs = []
        if (col.subfield) {
          _subs = col.subfield.split(', ')
        } else if (col.sublist) {
          _subs = col.sublist
        }
        if (col.unfold === 'true') {
          ucol.type = 'colspan'
          ucol.subcols = []
          col.subfield.split(', ').forEach(sub => {
          _subs.forEach(sub => {
            if (_cols[sub]) {
              let _col = fromJS(_cols[sub]).toJS()
              _col.Hide = 'false'
@@ -962,7 +995,7 @@
          ucol.elements = []
          ucol.style = {paddingTop: '12px', paddingLeft: '8px', paddingBottom: '12px', paddingRight: '8px'}
          col.subfield.split(', ').forEach(sub => {
          _subs.forEach(sub => {
            if (_cols[sub]) {
              let _col = {
                copyable: 'false',
@@ -1081,14 +1114,10 @@
        if (newCon.equalTab && oldtabs && oldtabs[newCon.equalTab]) {
          _btn.syncComponent.push(oldtabs[newCon.equalTab])
        }
      } else if (_btn.execSuccess === 'maingrid') {
        _btn.execSuccess = 'mainline'
      }
      if (_btn.execError === 'equaltab') {
        _btn.execError = 'grid'
      } else if (_btn.execError === 'maingrid') {
        _btn.execError = 'mainline'
      }
      if (_btn.popClose === 'equaltab') {
@@ -1098,8 +1127,6 @@
        if (newCon.equalTab && oldtabs && oldtabs[newCon.equalTab]) {
          _btn.syncComponent.push(oldtabs[newCon.equalTab])
        }
      } else if (_btn.popClose === 'maingrid') {
        _btn.popClose = 'mainline'
      }
      if (_btn.OpenType === 'pop' || (_btn.OpenType === 'funcbutton' && _btn.funcType === 'print' && _btn.execMode === 'pop')) {
@@ -1111,27 +1138,8 @@
        popActions.push({origin: btn.uuid, linkTab: btn.linkTab || '', uuid: _btn.uuid, name: newCon.name, label: btn.label})
      } else if (_btn.OpenType === 'tab') {
        if (btn.tabTemplate === 'FormTab') {
          if (newCon.isMain !== true) {
            errors.push(newCon.name + '中按钮《' + btn.label + '》不在支持')
            return
          }
          delete _btn.tabTemplate
          _btn.MenuID = 'tab' + md5(btn.uuid).substr(3)
          _btn.MenuName = this.baseMsg.MenuName + '-' + btn.label
          _btn.MenuNo = this.baseMsg.MenuNo + '_' + _btn.MenuID.substr(-4).toUpperCase()
          _btn.hidden = _btn.hidden || 'false'
          _btn.tabType = 'CustomPage'
          _btn.linkmenu = [this.baseMsg.fstMenuId, this.baseMsg.parentId, _btn.MenuID]
          let _tab = {...btn}
          _tab.MenuID = _btn.MenuID
          _tab.MenuNo = _btn.MenuNo
          _tab.MenuName = _btn.MenuName
          formTabs.push(_tab)
          errors.push(newCon.name + '中按钮《' + btn.label + '》不在支持')
          return
        } else if (!btn.linkmenu || btn.linkmenu.length !== 3) {
          errors.push(newCon.name + '中按钮《' + btn.label + '》不在支持')
@@ -1169,14 +1177,14 @@
        marks: [],
        isSub: false,
        uuid: Utils.getuuid(),
        type: 'action',
        type: 'custom',
        Width: 120,
        elements: colbtns,
        style: {paddingTop: '12px', paddingLeft: '8px', paddingBottom: '12px', paddingRight: '8px'}
      })
    }
    let sets = ['tableName', 'interType', 'sysInterface', 'innerFunc', 'interface', 'proInterface', 'outerFunc', 'dataresource', ['queryType', 'query'], 'primaryKey', 'order', 'execute', ['laypage', 'true'], ['pageSize', 10], ['onload', 'true']]
    let sets = ['tableName', 'interType', 'sysInterface', 'innerFunc', 'interface', 'proInterface', 'outerFunc', 'dataresource', ['queryType', 'query'], 'primaryKey', 'order', ['laypage', 'true'], ['pageSize', 10], ['onload', 'true']]
    let wraps = ['tableType', ['bordered', 'true'], 'actionfixed', ['size', 'middle'], ['selected', 'false'], ['tableMode', 'compatible'], ['mask', 'show'], ['borderColor', '#e8e8e8'], 'height', 'controlField', 'controlVal']
    _card.scripts = config.setting.scripts || []
@@ -1209,6 +1217,8 @@
      _card.wrap.doubleClick = ''
    }
    _card.setting.execute = config.setting.default || 'true'
    _card.errors = []
    let columns = _card.columns.map(c => c.field)
    if (_card.setting.interType === 'system' && _card.setting.execute !== 'false' && !_card.setting.dataresource) {
@@ -1222,36 +1232,6 @@
    } else if (!_card.setting.supModule) {
      _card.errors.push({ level: 0, detail: '未设置上级组件!'})
    }
    _card.action.forEach(cell => {
      if (cell.hidden === 'true') return
      if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) {
        if (!cell.modal || cell.modal.fields.length === 0) {
          _card.errors.push({ level: 0, detail: `按钮“${cell.label}”中表单尚未添加`})
        }
      } else if (cell.OpenType === 'excelIn' && (!cell.verify || !cell.verify.sheet || !cell.verify.columns || cell.verify.columns.length === 0)) {
        _card.errors.push({ level: 0, detail: `按钮“${cell.label}”中导入列未设置!`})
      } else if (cell.OpenType === 'excelOut' && (!cell.verify || !cell.verify.columns || cell.verify.columns.length === 0)) {
        _card.errors.push({ level: 0, detail: `按钮“${cell.label}”中导出列未设置!`})
      }
    })
    _card.cols.forEach(col => {
      if (col.type !== 'action') return
      col.elements.forEach(cell => {
        if (cell.hidden === 'true') return
        if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) {
          if (!cell.modal || cell.modal.fields.length === 0) {
            _card.errors.push({ level: 0, detail: `按钮“${cell.label}”中表单尚未添加`})
          }
        } else if (cell.OpenType === 'excelIn' && (!cell.verify || !cell.verify.sheet || !cell.verify.columns || cell.verify.columns.length === 0)) {
          _card.errors.push({ level: 0, detail: `按钮“${cell.label}”中导入列未设置!`})
        } else if (cell.OpenType === 'excelOut' && (!cell.verify || !cell.verify.columns || cell.verify.columns.length === 0)) {
          _card.errors.push({ level: 0, detail: `按钮“${cell.label}”中导出列未设置!`})
        }
      })
    })
    return _card
  }