From c94eaa728f9d68a872d904823c964e5d5810f202 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期四, 12 十二月 2024 18:02:49 +0800
Subject: [PATCH] 修改自定义url绑定值&&登录添加中文密码错误提示&&

---
 Source/plt-web/plt-web-ui/src/views/authority/ui/uiAuthorization/index.vue |   37 ++++++++++++++++++++++++++++++++-----
 1 files changed, 32 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..a77bb26 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,45 @@
 
     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,
+          parentId:item.parentId,
+          level: item.level,
+          leaf:item.leaf,
+          oid: item.oid,
+          text: item.text
+        }
+      })
+
+      const parentData = selectParentList.map(item => {
+        return {
+          checked: false,
+          expanded: true,
+          data:item.data,
+          parentId:item.parentId,
+          level: item.level,
+          leaf:item.leaf,
+          oid: item.oid,
+          text: item.text
+        }
+      })
+      // 鍦ㄥ崐閫夌姸鎬佷腑杩囨护鎺夐《绾ц妭鐐� oid 涓� root
+      const filterSelectTreeData = parentData.filter(item => item.oid !== 'root');
+
+      const data = [...selectTreeData,...filterSelectTreeData];
       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