| | |
| | | |
| | | 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 || ''}) |
| | | } |
| | | }) |
| | | |
| | |
| | | } |
| | | |
| | | 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 |