替换权限标识

This commit is contained in:
lai
2024-07-22 19:11:32 +08:00
parent 636c7a5939
commit d9b2b6b567
6 changed files with 761 additions and 9 deletions

View File

@@ -17,6 +17,7 @@ import { OptionsType, WS } from '@/plugins/ws-websocket';
import saveAs from 'file-saver';
import PQueue from 'p-queue';
import useUserStore from '@/store/modules/user';
import { TENANTADMIN_ROLE_KEY } from '@/constants/admin-constants';
const { t } = useI18n();
const { getDict } = useDictStore();
const ws = new WS();
@@ -481,7 +482,7 @@ onBeforeUnmount(() => {
></a-input>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24" v-roles:has="['administrator']">
<a-col :lg="6" :md="12" :xs="24" v-roles:has="[TENANTADMIN_ROLE_KEY]">
<a-form-item
:label="t('views.neUser.sub.tenantName')"
name="tenantName "
@@ -544,7 +545,7 @@ onBeforeUnmount(() => {
<a-button
type="primary"
:danger="realTimeData"
v-roles:has="['administrator']"
v-roles:has="[TENANTADMIN_ROLE_KEY]"
>
<template #icon><FundOutlined /> </template>
{{
@@ -561,7 +562,7 @@ onBeforeUnmount(() => {
:disabled="tableState.selectedRowKeys.length <= 0"
:loading="modalState.confirmLoading"
@click.prevent="fnRecordDelete('0')"
v-roles:has="['administrator']"
v-roles:has="[TENANTADMIN_ROLE_KEY]"
>
<template #icon><DeleteOutlined /></template>
{{ t('common.deleteText') }}
@@ -692,7 +693,7 @@ onBeforeUnmount(() => {
<a-button
type="link"
@click.prevent="fnRecordDelete(record.id)"
v-roles:has="['administrator']"
v-roles:has="[TENANTADMIN_ROLE_KEY]"
>
<template #icon>
<DeleteOutlined />