From bae38c34c585a0783235601d22ccf0398ac9468b Mon Sep 17 00:00:00 2001 From: wizzercn Date: Thu, 29 Nov 2018 19:02:20 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E5=AE=8C=E5=96=84=20=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F-=E8=A7=92=E8=89=B2=E7=AE=A1=E7=90=86-=E5=88=86?= =?UTF-8?q?=E9=85=8D=E6=9D=83=E9=99=90=20=E7=9A=84=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../platform/sys/SysRoleController.java | 2 +- .../views/platform/sys/role/index.html | 38 +++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/wk-app/wk-nb-web-vue/src/main/java/cn/wizzer/app/web/modules/controllers/platform/sys/SysRoleController.java b/wk-app/wk-nb-web-vue/src/main/java/cn/wizzer/app/web/modules/controllers/platform/sys/SysRoleController.java index 91dadb8df..4e4a87a02 100644 --- a/wk-app/wk-nb-web-vue/src/main/java/cn/wizzer/app/web/modules/controllers/platform/sys/SysRoleController.java +++ b/wk-app/wk-nb-web-vue/src/main/java/cn/wizzer/app/web/modules/controllers/platform/sys/SysRoleController.java @@ -219,7 +219,7 @@ public Object menuAll(HttpServletRequest req) { @RequiresPermissions("sys.manager.role") public Object menuRole(String roleId, HttpServletRequest req) { try { - List userList = sysUserService.getMenusAndButtons(StringUtil.getPlatformUid()); + List userList = sysRoleService.getMenusAndButtons(roleId); List list; if (shiroUtil.hasRole("sysadmin")) { list = sysMenuService.query(Cnd.orderBy().asc("location").asc("path")); diff --git a/wk-app/wk-nb-web-vue/src/main/resources/views/platform/sys/role/index.html b/wk-app/wk-nb-web-vue/src/main/resources/views/platform/sys/role/index.html index 6ab0f8a27..91491628b 100644 --- a/wk-app/wk-nb-web-vue/src/main/resources/views/platform/sys/role/index.html +++ b/wk-app/wk-nb-web-vue/src/main/resources/views/platform/sys/role/index.html @@ -167,10 +167,15 @@ + + 全选 + 清空 + @@ -272,6 +277,10 @@ :title="menuDialogTitle" :visible.sync="menuDialogVisible" width="70%"> + + 全选 + 清空 + 0){ + obj.forEach(function (o) { + ids.push(o.id); + if(o.children){ + self.getTreeAllIds(ids,o.children); + } + }); + } + }, + addRoleSelAll:function () { + var self=this; + var ids=[]; + self.getTreeAllIds(ids,self.addMenuData); + self.$refs["addMenuTree"].setCheckedKeys(ids); + }, + addRoleSelClear:function () { + this.$refs["addMenuTree"].setCheckedKeys([]); + }, + menuRoleSelAll:function () { + var self=this; + var ids=[]; + self.getTreeAllIds(ids,self.doMenuData); + self.$refs["doMenuTree"].setCheckedKeys(ids); + }, + menuRoleSelClear:function () { + this.$refs["doMenuTree"].setCheckedKeys([]); } }, created: function () {