feat(sj_1.0.0): 菜单添加权限
This commit is contained in:
parent
d64b691345
commit
9ae1d86031
2
.env
2
.env
@ -41,7 +41,7 @@ VITE_SERVICE_MODAL_LOGOUT_CODES=5001
|
||||
VITE_SERVICE_EXPIRED_TOKEN_CODES=9999,9998
|
||||
|
||||
# when the route mode is static, the defined super role
|
||||
VITE_STATIC_SUPER_ROLE=R_SUPER
|
||||
VITE_STATIC_SUPER_ROLE=R_ADMIN
|
||||
|
||||
# sourcemap
|
||||
VITE_SOURCE_MAP=N
|
||||
|
@ -41,8 +41,8 @@ export const menuIconTypeRecord: Record<Api.SystemManage.IconType, App.I18n.I18n
|
||||
export const menuIconTypeOptions = transformRecordToOption(menuIconTypeRecord);
|
||||
|
||||
export const roleTypeRecord: Record<string, string> = {
|
||||
'1': 'R_ADMIN',
|
||||
'2': 'R_SUPER'
|
||||
'1': 'R_USER',
|
||||
'2': 'R_ADMIN'
|
||||
};
|
||||
|
||||
export const podsType: Record<Api.Dashboard.DashboardPodsType, App.I18n.I18nKey> = {
|
||||
|
@ -385,7 +385,8 @@ export const generatedRoutes: GeneratedRoute[] = [
|
||||
title: 'namespace',
|
||||
i18nKey: 'route.namespace',
|
||||
icon: 'eos-icons:namespace',
|
||||
order: 20
|
||||
order: 20,
|
||||
roles: ['R_ADMIN']
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -497,7 +498,8 @@ export const generatedRoutes: GeneratedRoute[] = [
|
||||
title: 'user',
|
||||
i18nKey: 'route.user',
|
||||
order: 900,
|
||||
icon: 'material-symbols:manage-accounts'
|
||||
icon: 'material-symbols:manage-accounts',
|
||||
roles: ['R_ADMIN']
|
||||
},
|
||||
children: [
|
||||
{
|
||||
@ -508,7 +510,8 @@ export const generatedRoutes: GeneratedRoute[] = [
|
||||
title: 'user_manager',
|
||||
i18nKey: 'route.user_manager',
|
||||
icon: 'streamline:interface-user-multiple-close-geometric-human-multiple-person-up-user',
|
||||
order: 900
|
||||
order: 900,
|
||||
roles: ['R_ADMIN']
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -9,10 +9,11 @@ import { useTable, useTableOperate } from '@/hooks/common/table';
|
||||
import { groupConfigIdModeRecord, yesOrNoRecord } from '@/constants/business';
|
||||
import { tagColor } from '@/utils/common';
|
||||
import StatusSwitch from '@/components/common/status-switch.vue';
|
||||
import { useAuth } from '@/hooks/business/auth';
|
||||
import GroupOperateDrawer from './modules/group-operate-drawer.vue';
|
||||
import GroupDetailDrawer from './modules/group-detail-drawer.vue';
|
||||
import GroupSearch from './modules/group-search.vue';
|
||||
|
||||
const { hasAuth } = useAuth();
|
||||
const appStore = useAppStore();
|
||||
|
||||
/** 详情页属性数据 */
|
||||
@ -166,6 +167,7 @@ function edit(id: string) {
|
||||
:disabled-delete="checkedRowKeys.length === 0"
|
||||
:loading="loading"
|
||||
:show-delete="false"
|
||||
:show-add="hasAuth('R_ADMIN')"
|
||||
@add="handleAdd"
|
||||
@refresh="getData"
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user