diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index 743157cf..4aaf91c1 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; @@ -941,7 +943,7 @@ onMounted(() => { v-if=" dict.sysNormalDisable.length > 0 && record.roleId !== 1 && - record.roleKey !== 'admin' && + !userStore.roles?.includes(record.roleKey) && hasPermissions(['system:role:edit']) " v-model:checked="record.statusFlag" @@ -971,7 +973,10 @@ onMounted(() => { {