From 43008f1240d6568a3364721bb01fc7e31b33d147 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 24 十二月 2023 23:39:51 +0800 Subject: [PATCH] Merge branch 'develop' --- src/tabviews/rolemanage/index.jsx | 45 +++++++++++++++++++++++++++------------------ 1 files changed, 27 insertions(+), 18 deletions(-) diff --git a/src/tabviews/rolemanage/index.jsx b/src/tabviews/rolemanage/index.jsx index 63aa365..f397ce4 100644 --- a/src/tabviews/rolemanage/index.jsx +++ b/src/tabviews/rolemanage/index.jsx @@ -356,7 +356,7 @@ /** * @description 鑾峰彇鏉冮檺鍒嗛厤鏍� */ - getTree = (parents, options) => { + getTree = (parents, options, addSelf) => { parents.forEach(parent => { parent.children = [] @@ -367,7 +367,7 @@ title: option.MenuName, key: option.MenuID, addSelf: option.OnlySelf === 'true', - tabs: option.Tabs + // tabs: option.Tabs }) } }) @@ -375,13 +375,13 @@ if (parent.children.length === 0) { parent.children = null // 閽堝鏍囩锛岀敓鎴愭柊鐨刬d锛屽苟淇濆瓨鍏宠仈鍏崇郴锛堟爣绛句笉鍞竴锛� - if (parent.tabs) { - let _uuid = Utils.getuuid() - linkMap.set(_uuid, parent.key) + // if (parent.tabs) { + // let _uuid = Utils.getuuid() + // linkMap.set(_uuid, parent.key) - parent.originKey = parent.key - parent.key = _uuid - } + // parent.originKey = parent.key + // parent.key = _uuid + // } } else { // 涓夌骇鑿滃崟鍒涘缓瀛愰」 if (parent.addSelf) { @@ -392,20 +392,29 @@ parent.children.unshift({ title: parent.title + '(浠呴〉闈�)', key: _uuid, - isSubView: true + // isSubView: true + }) + } else if (addSelf) { + let _uuid = Utils.getuuid() + linkMap.set(_uuid, parent.key) + parent.subKey = _uuid + + parent.children.unshift({ + title: parent.title + '(琛ㄦ牸)', + key: _uuid, }) } // 閽堝鏍囩锛岀敓鎴愭柊鐨刬d锛屽苟淇濆瓨鍏宠仈鍏崇郴锛堟爣绛句笉鍞竴锛� - if (parent.tabs) { - let _uuid = Utils.getuuid() - linkMap.set(_uuid, parent.key) + // if (parent.tabs) { + // let _uuid = Utils.getuuid() + // linkMap.set(_uuid, parent.key) - parent.originKey = parent.key - parent.key = _uuid - } + // parent.originKey = parent.key + // parent.key = _uuid + // } - parent.children = this.getTree(parent.children, options) + parent.children = this.getTree(parent.children, options, parent.addSelf) } }) return parents @@ -442,8 +451,8 @@ } } return true - } else if (parent.isSubView) { - return true + // } else if (parent.isSubView) { + // return true } return false }) -- Gitblit v1.8.0