From 8f558cbb986a1f78ad2ea246db9969c099a972ad Mon Sep 17 00:00:00 2001 From: pixel <303176530@qq.com> Date: Sun, 22 Sep 2019 17:56:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9tree=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E9=80=89=E4=B8=ADbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QMPlusVuePage/src/view/superAdmin/authority/authority.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/QMPlusVuePage/src/view/superAdmin/authority/authority.vue b/QMPlusVuePage/src/view/superAdmin/authority/authority.vue index 78de2af9..d7a900c3 100644 --- a/QMPlusVuePage/src/view/superAdmin/authority/authority.vue +++ b/QMPlusVuePage/src/view/superAdmin/authority/authority.vue @@ -154,7 +154,10 @@ export default { const menus = res1.data.menus const arr = [] menus.map(item => { - arr.push(Number(item.menuId)) + // 防止直接选中父级造成全选 + if(!menus.some(same=>same.parentId === item.menuId)){ + arr.push(Number(item.menuId)) + } }) this.treeIds = arr const res2 = await getBaseMenuTree()