From 6590a0c811b614b6f0031da9b123d8b7d810c09d Mon Sep 17 00:00:00 2001
From: TsMask <340112800@qq.com>
Date: Fri, 21 Mar 2025 17:08:20 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A6=81=E6=AD=A2admin=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=E8=8F=9C=E5=8D=95=E5=88=86=E9=85=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/role/index.vue | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index 66b05e8a..98d5b0d4 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -32,8 +32,10 @@ import { hasPermissions } from '@/plugins/auth-user';
import { MENU_PATH_INLINE } from '@/constants/menu-constants';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useI18n from '@/hooks/useI18n';
+import useUserStore from '@/store/modules/user';
const { t } = useI18n();
const { getDict } = useDictStore();
+const userStore = useUserStore();
const router = useRouter();
const route = useRoute();
const routePath = route.path;
@@ -940,7 +942,7 @@ onMounted(() => {
v-if="
dict.sysNormalDisable.length > 0 &&
record.roleId !== '1' &&
- record.roleKey !== 'admin' &&
+ !userStore.roles?.includes(record.roleKey) &&
record.roleKey !== 'tenant' &&
hasPermissions(['system:role:edit'])
"
@@ -974,7 +976,7 @@ onMounted(() => {
v-if="
record.roleId !== '1' &&
record.roleKey !== 'tenant' &&
- record.roleKey !== 'admin'
+ !userStore.roles?.includes(record.roleKey)
"
>
{{ t('common.editText') }}
@@ -990,7 +992,7 @@ onMounted(() => {
v-if="
record.roleId !== '1' &&
record.roleKey !== 'tenant' &&
- record.roleKey !== 'admin'
+ !userStore.roles?.includes(record.roleKey)
"
>
{{ t('common.deleteText') }}