From 4c217b85e9bd8adf26de250d86aebb666b55702d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Fri, 6 Aug 2021 11:58:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=8F=9C=E5=8D=95=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E6=9D=83=E9=99=90=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=87=92?= =?UTF-8?q?=E4=BA=BA=E7=89=88=E4=B8=80=E4=BB=B6=E9=80=89=E4=B8=AD=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/sys/role-manage/roleManage.vue | 71 ++++++++++--------- 1 file changed, 39 insertions(+), 32 deletions(-) diff --git a/manager/src/views/sys/role-manage/roleManage.vue b/manager/src/views/sys/role-manage/roleManage.vue index f72d7099..d0cc5323 100644 --- a/manager/src/views/sys/role-manage/roleManage.vue +++ b/manager/src/views/sys/role-manage/roleManage.vue @@ -76,22 +76,22 @@ - +
+ + +
{{ item.title }}
- - - 操作数据权限 - - - 查看权限 - - + + + 操作数据权限 + + + 查看权限 + +
@@ -337,6 +337,17 @@ export default { this.getRoleList(); }, + /** + * 设置权限 + */ + setRole(val) { + let enable; + val == "onlyView" ? (enable = false) : (enable = true); + this.saveRoleWay.map((item) => { + item.isSuper = enable; + }); + }, + /** * 查询所有角色 */ @@ -515,7 +526,7 @@ export default { } // 递归判断子节点 this.checkPermTree(this.permData, rolePerms); - console.warn(this.permData); + this.permModalVisible = true; }, // 递归判断子节点 @@ -535,7 +546,6 @@ export default { }, // 判断角色拥有的权限节点勾选 hasPerm(p, rolePerms) { - console.log(p, rolePerms); if (!rolePerms) return false; let flag = false; for (let i = 0; i < rolePerms.length; i++) { @@ -568,7 +578,6 @@ export default { let way = []; selectedNodes.forEach((e) => { - console.log(e); let perm = { title: e.title, isSuper: e.isSuper, @@ -707,44 +716,42 @@ export default { display: flex; padding: 20px 0; align-items: center; - >.title{ + > .title { flex: 2; text-align: right; } - >.content{ + > .content { flex: 10; } } -.btns{ +.btns { display: flex; align-items: center; - justify-content: space-between; + justify-content: center; } -.btn-item{ +.btn-item { margin-right: 20px; } .permModal { - .ivu-modal-body { - max-height: 560px; - overflow: auto; - } + .ivu-modal-body { + max-height: 560px; + overflow: auto; + } } .depModal { - .ivu-modal-body { - max-height: 500px; - overflow: auto; - } + .ivu-modal-body { + max-height: 500px; + overflow: auto; + } } -.tips{ +.tips { font-size: 12px; color: #999; margin-left: 8px; } -.title{ - +.title { font-weight: bold; margin-right: 20px; } -