king
2020-12-01 57da72c823fab94a3ec6fadab2bc75173c8a03b1
src/templates/calendarconfig/index.jsx
@@ -230,19 +230,20 @@
  getFuncNames = (data, funcNames, tableNames) => {
    data.forEach(item => {
      if (item.subfuncs) {
        this.getFuncNames(item.subfuncs, funcNames, tableNames)
      } else {
        if (item.tableName) {
          tableNames.push(item.tableName)
        }
        if (item.innerFunc) {
          funcNames.push({func: item.innerFunc, label: item.label || ''})
        }
      // if (item.subfuncs) {
      //   this.getFuncNames(item.subfuncs, funcNames, tableNames)
      //   return
      // }
        if (item.callbackFunc) {
          funcNames.push({func: item.callbackFunc, label: item.label || ''})
        }
      if (item.tableName) {
        tableNames.push(item.tableName)
      }
      if (item.innerFunc) {
        funcNames.push({func: item.innerFunc, label: item.label || ''})
      }
      if (item.callbackFunc) {
        funcNames.push({func: item.callbackFunc, label: item.label || ''})
      }
    })
@@ -322,33 +323,34 @@
    }
    new Promise(resolve => {
      if (_config.tab) {
        Api.getSystemConfig({
          func: 'sPC_Get_LongParam',
          MenuID: _config.tab.linkTab
        }).then(result => {
          if (result.status && result.LongParam) {
            let _LongParam = ''
      // if (_config.tab) {
      //   Api.getSystemConfig({
      //     func: 'sPC_Get_LongParam',
      //     MenuID: _config.tab.linkTab
      //   }).then(result => {
      //     if (result.status && result.LongParam) {
      //       let _LongParam = ''
  
            if (result.LongParam) {
              try {
                _LongParam = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam)))
              } catch (e) {
                console.warn('Parse Failure')
                _LongParam = ''
              }
            }
      //       if (result.LongParam) {
      //         try {
      //           _LongParam = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam)))
      //         } catch (e) {
      //           console.warn('Parse Failure')
      //           _LongParam = ''
      //         }
      //       }
            if (_LongParam) {
              _config.funcs[1].menuNo = _LongParam.tabNo || ''
              _config.funcs[1].subfuncs = _LongParam.funcs || []
            }
          }
          resolve()
        })
      } else {
        resolve()
      }
      //       if (_LongParam) {
      //         _config.funcs[1].menuNo = _LongParam.tabNo || ''
      //         _config.funcs[1].subfuncs = _LongParam.funcs || []
      //       }
      //     }
      //     resolve()
      //   })
      // } else {
      //   resolve()
      // }
      resolve()
    }).then(() => {
      // 保存时删除配置类型,system 、user
      delete _config.type