From d5db032fe98ac40d7baf7471c9e01998b2e9932c Mon Sep 17 00:00:00 2001 From: jiangyunjie Date: Fri, 10 Apr 2020 10:39:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kiisoo-ic-ui/src/pages/user/RoleManager.vue | 24 ++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/kiisoo-ic-ui/src/pages/user/RoleManager.vue b/kiisoo-ic-ui/src/pages/user/RoleManager.vue index a3d0a15..b213047 100644 --- a/kiisoo-ic-ui/src/pages/user/RoleManager.vue +++ b/kiisoo-ic-ui/src/pages/user/RoleManager.vue @@ -99,26 +99,25 @@
-
+
{{item.name}} + @click.prevent.native="handleCheckAll(index)" style="color:#697882;margin-right: 20px;">{{item.name}}
-
+
{{itemSon.name}}
- - + {{itemGrandson.name}} @@ -294,7 +293,8 @@ }, methods: { //一级权限-点击事件 - handleCheckAll (item) { + handleCheckAll (index) { + let item = this.permissionList[index]; if (item.indeterminate) { item.check = false; } else { @@ -329,7 +329,9 @@ // this.saveRolePermissionApi(); }, //二级权限-点击事件 - handleSonCheckAll(itemSon, item) { + handleSonCheckAll(itemSonIndex, index) { + let item = this.permissionList[index]; + let itemSon = this.permissionList[index].sonPermissionList[itemSonIndex]; if (itemSon.indeterminate) { itemSon.check = false; } else { @@ -367,7 +369,9 @@ } }, //三级权限-点击事件 - handleGrandSonCheckChange (itemSon, item) { + handleGrandSonCheckChange (itemSonIndex, index) { + let item = this.permissionList[index]; + let itemSon = this.permissionList[index].sonPermissionList[itemSonIndex]; let sonPermissionCount = itemSon.sonPermissionList.length; if (itemSon.checkArr.length === sonPermissionCount) { itemSon.indeterminate = false;