king
2020-03-12 1dfd49b103e721f9bb63fd4d472b6fcc225d94a1
src/templates/comtableconfig/index.jsx
@@ -1586,6 +1586,25 @@
        }
      }
      if (config.type === 'user') { // 使用已有菜单时,默认添加关联标签id
        config.action = config.action.map(item => {
          if (item.OpenType === 'popview' && !item.linkTab) {
            item.linkTab = Utils.getuuid()
          }
          return item
        })
        config.tabgroups.forEach(group => {
          config[group] = config[group].map(tab => {
            if (!tab.linkTab) {
              tab.linkTab = Utils.getuuid()
            }
            return tab
          })
        })
      }
      let _LongParam = ''
      let _config = {...config, tables: this.state.selectedTables}
      let _pageParam = {...menu.PageParam, OpenType: res.opentype}
@@ -1740,6 +1759,8 @@
          return
        }
  
        let _sort = 0
        let btnParam = {             // 添加菜单按钮
          func: 'sPC_Button_AddUpt',
          Type: 40,                  // 添加菜单下的按钮type为40,按钮下的按钮type为60
@@ -1748,8 +1769,9 @@
          Template: menu.PageParam.Template || '',
          PageParam: '',
          LongParam: '',
          LText: _config.action.map((item, index) => {
            return `select '${item.uuid}' as menuid, '${item.label}' as menuname, '${(index + 1) * 10}' as Sort`
          LText: _config.action.map(item => {
            _sort++
            return `select '${item.uuid}' as menuid, '${item.label}' as menuname, '${_sort * 10}' as Sort`
          })
        }
  
@@ -1764,12 +1786,11 @@
        }
        let _LText = []
        let _index = 1
        _config.tabgroups.forEach(groupId => {
          _config[groupId].forEach(item => {
            _LText.push(`select '${menu.MenuID}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${_index * 10}' as Sort`)
            _index++
            _sort++
            _LText.push(`select '${menu.MenuID}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${_sort * 10}' as Sort`)
          })
        })
@@ -1780,7 +1801,6 @@
        tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp)
  
        let _vals = this.getFuncNames(_config.funcs, [], [])
        // let _funcs = Array.from(new Set(_vals.func))
        let _tables = Array.from(new Set(_vals.table))
        let param = {
@@ -1792,7 +1812,6 @@
          MenuNo: res.menuNo,
          Template: menu.PageParam.Template || '',
          MenuName: res.menuName,
          // Sort: (this.props.supMenuList.length + 1) * 10,
          PageParam: JSON.stringify(_pageParam),
          LongParam: _LongParam,
          LText: _vals.func.map(item => `select '${menu.MenuID}' as MenuID,'${item.func}' as ProcName,'${item.label}' as MenuName`),