From 4aac1609c95a097de0e8da843a9ed2f211303d4e Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期四, 27 十月 2022 14:21:37 +0800 Subject: [PATCH] 黑白名单,系统配置,综合展示权限管理添加 --- src/views/Synthesis/index.vue | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/views/Synthesis/index.vue b/src/views/Synthesis/index.vue index c588525..b16b0a7 100644 --- a/src/views/Synthesis/index.vue +++ b/src/views/Synthesis/index.vue @@ -128,27 +128,32 @@ val = '/comprehensive'; } var permsEntity = this.$store.state.permsEntity; + if (permsEntity.length == 0) { getPerms().then((res) => { if (res.code == 200) permsEntity = res.result; - this.$store.state.permsEntity = permsEntity; + for (var i = 0; i < permsEntity.length; i++) { + if (permsEntity[i].perms == val) { + this.showMenuChange(permsEntity[i], permsEntity); + } + } }); - } - - for (var i = 0; i < permsEntity.length; i++) { - if (permsEntity[i].perms == val) { - this.showMenuChange(permsEntity[i], permsEntity); + } else { + for (var i = 0; i < permsEntity.length; i++) { + if (permsEntity[i].perms == val) { + this.showMenuChange(permsEntity[i], permsEntity); + } } } }, }, mounted() { //this.messageName = this.$store.state.teNmme; - this.$bus.$on('changetool', (e) => { this.tepostmessage(e); }); }, + created() { this.getPermsMenu(); }, -- Gitblit v1.9.3