From 4fb8e4073c180b1c8bba697d44e99fb36dfe2790 Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Tue, 13 Jul 2021 16:24:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AE=A1=E8=AE=A1?= =?UTF-8?q?=E5=91=98=E9=A6=96=E9=A1=B5=E7=94=A8=E6=88=B7=E6=95=B0=E7=A9=BA?= =?UTF-8?q?=E7=99=BD=E7=9A=84=E9=97=AE=E9=A2=98=20(#894)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: ibuler --- src/components/SummaryCard/index.vue | 12 ++++++++---- src/store/modules/users.js | 7 ++++++- src/views/dashboard/ResourceSummary.vue | 12 ++---------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/components/SummaryCard/index.vue b/src/components/SummaryCard/index.vue index 103501d7c..1d8092f3d 100644 --- a/src/components/SummaryCard/index.vue +++ b/src/components/SummaryCard/index.vue @@ -4,15 +4,15 @@ {{ title }} - {{ rightSideLabel.title }} + + {{ rightSideLabel.title }} +

- - {{ body.count }} - + {{ body.count }} {{ body.count }} @@ -77,4 +77,8 @@ export default { .no-margins { margin: 0 !important; } + + .disabled-link { + color: #428bca; + } diff --git a/src/store/modules/users.js b/src/store/modules/users.js index feee1dcdc..0a104a074 100644 --- a/src/store/modules/users.js +++ b/src/store/modules/users.js @@ -20,7 +20,9 @@ const getDefaultState = () => { orgs: [], perms: 0b00000000, MFAVerifyAt: null, - isSuperAdmin: false + isSuperAdmin: false, + hasAdminPerm: false, + hasAuditPerm: false } } @@ -53,12 +55,15 @@ const mutations = { }, SET_ROLES(state, roles) { state.roles = roles + // rolec.PERM_ADMIN & }, SET_SYS_ROLE(state, role) { state.sysRole = role }, SET_PERMS(state, perms) { state.perms = perms + state.hasAdmin = (perms & rolec.PERM_ADMIN) === rolec.PERM_ADMIN + state.hasAudit = (perms & rolec.PERM_AUDIT) === rolec.PERM_AUDIT }, SET_CURRENT_ORG(state, org) { saveCurrentOrgToCookie(org) diff --git a/src/views/dashboard/ResourceSummary.vue b/src/views/dashboard/ResourceSummary.vue index 898e831dc..f9a4004cd 100644 --- a/src/views/dashboard/ResourceSummary.vue +++ b/src/views/dashboard/ResourceSummary.vue @@ -8,8 +8,6 @@