From 0cae7d0058e96701671923bff5269edb70236a69 Mon Sep 17 00:00:00 2001
From: FlyFive <826323891@qq.com>
Date: 星期一, 12 十月 2020 13:50:25 +0800
Subject: [PATCH] update ruoyi-ui/src/views/system/role/index.vue. getMenuAllCheckedKeys()方法中选中节点和半选节点获取的方法反了。

---
 ruoyi-ui/src/views/system/role/index.vue |   32 +++++++++++++-------------------
 1 files changed, 13 insertions(+), 19 deletions(-)

diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue
index f54a7e7..7835eb6 100644
--- a/ruoyi-ui/src/views/system/role/index.vue
+++ b/ruoyi-ui/src/views/system/role/index.vue
@@ -377,9 +377,9 @@
     // 鎵�鏈夐儴闂ㄨ妭鐐规暟鎹�
     getDeptAllCheckedKeys() {
       // 鐩墠琚�変腑鐨勯儴闂ㄨ妭鐐�
-      let checkedKeys = this.$refs.dept.getHalfCheckedKeys();
+      let checkedKeys = this.$refs.dept.getCheckedKeys();
       // 鍗婇�変腑鐨勯儴闂ㄨ妭鐐�
-      let halfCheckedKeys = this.$refs.dept.getCheckedKeys();
+      let halfCheckedKeys = this.$refs.dept.getHalfCheckedKeys();
       checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
       return checkedKeys;
     },
@@ -537,20 +537,16 @@
           if (this.form.roleId != undefined) {
             this.form.menuIds = this.getMenuAllCheckedKeys();
             updateRole(this.form).then(response => {
-              if (response.code === 200) {
-                this.msgSuccess("淇敼鎴愬姛");
-                this.open = false;
-                this.getList();
-              }
+              this.msgSuccess("淇敼鎴愬姛");
+              this.open = false;
+              this.getList();
             });
           } else {
             this.form.menuIds = this.getMenuAllCheckedKeys();
             addRole(this.form).then(response => {
-              if (response.code === 200) {
-                this.msgSuccess("鏂板鎴愬姛");
-                this.open = false;
-                this.getList();
-              }
+              this.msgSuccess("鏂板鎴愬姛");
+              this.open = false;
+              this.getList();
             });
           }
         }
@@ -561,11 +557,9 @@
       if (this.form.roleId != undefined) {
         this.form.deptIds = this.getDeptAllCheckedKeys();
         dataScope(this.form).then(response => {
-          if (response.code === 200) {
-            this.msgSuccess("淇敼鎴愬姛");
-            this.openDataScope = false;
-            this.getList();
-          }
+          this.msgSuccess("淇敼鎴愬姛");
+          this.openDataScope = false;
+          this.getList();
         });
       }
     },
@@ -581,7 +575,7 @@
         }).then(() => {
           this.getList();
           this.msgSuccess("鍒犻櫎鎴愬姛");
-        }).catch(function() {});
+        })
     },
     /** 瀵煎嚭鎸夐挳鎿嶄綔 */
     handleExport() {
@@ -594,7 +588,7 @@
           return exportRole(queryParams);
         }).then(response => {
           this.download(response.msg);
-        }).catch(function() {});
+        })
     }
   }
 };

--
Gitblit v1.9.3