From 1dfd49b103e721f9bb63fd4d472b6fcc225d94a1 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 12 三月 2020 18:42:20 +0800 Subject: [PATCH] 2020-03-12 --- src/templates/comtableconfig/index.jsx | 33 ++++++++++++++++++++++++++------- 1 files changed, 26 insertions(+), 7 deletions(-) diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx index c65fdc2..db2e165 100644 --- a/src/templates/comtableconfig/index.jsx +++ b/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锛屾寜閽笅鐨勬寜閽畉ype涓�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`), -- Gitblit v1.8.0