From 5b162fd92ab2383ce44ca2f84dc8ad750430817b Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期五, 18 十月 2024 16:48:17 +0800 Subject: [PATCH] 修改功能权限和UI授权 --- Source/plt-web/plt-web-ui/src/views/authority/ui/uiAuthorization/index.vue | 29 ++++++++++++++++++++++++----- 1 files changed, 24 insertions(+), 5 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/views/authority/ui/uiAuthorization/index.vue b/Source/plt-web/plt-web-ui/src/views/authority/ui/uiAuthorization/index.vue index d387f92..4214755 100644 --- a/Source/plt-web/plt-web-ui/src/views/authority/ui/uiAuthorization/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/authority/ui/uiAuthorization/index.vue @@ -111,7 +111,6 @@ this.getTypeList(); }, methods: { - getTreeList() { const loading = this.$loading({}); gridRoles().then(res => { @@ -173,14 +172,12 @@ if (obj.checked === true) { result.push(obj.oid); } - // 濡傛灉鏈� children锛屽垯缁х画閬嶅巻 if (obj.children && obj.children.length > 0) { obj.children.forEach(child => { this.findCheckedOids(child, result); }); } - return result; }, @@ -188,7 +185,7 @@ processChildren(item) { if (item.children && item.children.length > 0) { item.children = item.children.map(child => { - if (child.level < 2) { + if (child.level < 3) { // 榛樿鏍戣妭鐐瑰睍寮�涓ゅ眰鏁堟灉 this.defaultExpandKeys.push(child.oid) } @@ -243,15 +240,37 @@ saveHandler() { const selectTreeList = this.$refs.uiTree.getCheckedNodes(); + const selectParentList = this.$refs.uiTree.getHalfCheckedNodes(); if (selectTreeList.length == 0) { this.$message.error("璇烽�夋嫨鍔熻兘妯″潡"); return; } + const selectTreeData = selectTreeList.map(item => { + return { + checked: true, + expanded: true, + data:item.data, + level: item.level, + oid: item.oid, + text: item.text + } + }) + const parentData = selectParentList.map(item => { + return { + checked: false, + expanded: true, + data:item.data, + level: item.level, + oid: item.oid, + text: item.text + } + }) + const data = [...parentData,...selectTreeData]; const formData = { roleId: this.nodeRow.oid, type: this.type, context: this.context, - selectTreeList: selectTreeList + selectTreeList: data } authorizedUI(formData).then(res => { if (res.data.success) { -- Gitblit v1.9.3