king
2023-07-13 69b833e09fa986f61743ab09cd55aa9fb595d234
src/templates/comtableconfig/updatetable/index.jsx
@@ -110,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(),
@@ -119,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,
@@ -187,11 +191,29 @@
          }
        })
        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, popActions, oldtabs)
              supIds.push([item.uuid, tab.uuid, tab.components[0].uuid])
              return tab
            })
          }
          return item
        })
        _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
            })
          }
@@ -790,7 +812,7 @@
      action: [],
      subtype: 'basetable',
      setting: { useMSearch: newCon.useMSearch },
      wrap: {},
      wrap: {name: newCon.name},
      style: {},
      headerStyle: {},
      columns: [],
@@ -819,7 +841,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
@@ -890,7 +916,7 @@
        if (_colspan.includes(col.field)) {
          _col.Hide = 'true'
        }
        _col.uuid = Utils.getuuid()
        _card.cols.push(_col)
      }
@@ -901,14 +927,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'
@@ -928,7 +961,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',
@@ -1123,7 +1156,7 @@
      })
    }
    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 || []
@@ -1156,6 +1189,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) {