|
|
@ -48,10 +48,13 @@ import { |
|
|
|
BarsOutlined |
|
|
|
BarsOutlined |
|
|
|
} from '@vicons/antd' |
|
|
|
} from '@vicons/antd' |
|
|
|
import { useMenuStore } from '@/store/menu/menu' |
|
|
|
import { useMenuStore } from '@/store/menu/menu' |
|
|
|
|
|
|
|
import { useUserStore } from '@/store/user/user' |
|
|
|
|
|
|
|
import type { UserInfoRes } from '@/service/modules/users/types' |
|
|
|
|
|
|
|
|
|
|
|
export function useDataList() { |
|
|
|
export function useDataList() { |
|
|
|
const { t } = useI18n() |
|
|
|
const { t } = useI18n() |
|
|
|
const menuStore = useMenuStore() |
|
|
|
const menuStore = useMenuStore() |
|
|
|
|
|
|
|
const userStore = useUserStore() |
|
|
|
|
|
|
|
|
|
|
|
const renderIcon = (icon: any) => { |
|
|
|
const renderIcon = (icon: any) => { |
|
|
|
return () => h(NIcon, null, { default: () => h(icon) }) |
|
|
|
return () => h(NIcon, null, { default: () => h(icon) }) |
|
|
@ -82,14 +85,12 @@ export function useDataList() { |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: t('menu.home'), |
|
|
|
label: t('menu.home'), |
|
|
|
key: 'home', |
|
|
|
key: 'home', |
|
|
|
icon: renderIcon(HomeOutlined), |
|
|
|
icon: renderIcon(HomeOutlined) |
|
|
|
isShowSide: false |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: t('menu.project'), |
|
|
|
label: t('menu.project'), |
|
|
|
key: 'projects', |
|
|
|
key: 'projects', |
|
|
|
icon: renderIcon(ProfileOutlined), |
|
|
|
icon: renderIcon(ProfileOutlined), |
|
|
|
isShowSide: false, |
|
|
|
|
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: t('menu.project_overview'), |
|
|
|
label: t('menu.project_overview'), |
|
|
@ -136,7 +137,6 @@ export function useDataList() { |
|
|
|
label: t('menu.resources'), |
|
|
|
label: t('menu.resources'), |
|
|
|
key: 'resource', |
|
|
|
key: 'resource', |
|
|
|
icon: renderIcon(FolderOutlined), |
|
|
|
icon: renderIcon(FolderOutlined), |
|
|
|
isShowSide: true, |
|
|
|
|
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: t('menu.file_manage'), |
|
|
|
label: t('menu.file_manage'), |
|
|
@ -179,7 +179,6 @@ export function useDataList() { |
|
|
|
label: t('menu.data_quality'), |
|
|
|
label: t('menu.data_quality'), |
|
|
|
key: 'data-quality', |
|
|
|
key: 'data-quality', |
|
|
|
icon: renderIcon(ContainerOutlined), |
|
|
|
icon: renderIcon(ContainerOutlined), |
|
|
|
isShowSide: true, |
|
|
|
|
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: t('menu.task_result'), |
|
|
|
label: t('menu.task_result'), |
|
|
@ -197,14 +196,12 @@ export function useDataList() { |
|
|
|
label: t('menu.datasource'), |
|
|
|
label: t('menu.datasource'), |
|
|
|
key: 'datasource', |
|
|
|
key: 'datasource', |
|
|
|
icon: renderIcon(DatabaseOutlined), |
|
|
|
icon: renderIcon(DatabaseOutlined), |
|
|
|
isShowSide: false, |
|
|
|
|
|
|
|
children: [] |
|
|
|
children: [] |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: t('menu.monitor'), |
|
|
|
label: t('menu.monitor'), |
|
|
|
key: 'monitor', |
|
|
|
key: 'monitor', |
|
|
|
icon: renderIcon(DesktopOutlined), |
|
|
|
icon: renderIcon(DesktopOutlined), |
|
|
|
isShowSide: true, |
|
|
|
|
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: t('menu.service_manage'), |
|
|
|
label: t('menu.service_manage'), |
|
|
@ -246,8 +243,8 @@ export function useDataList() { |
|
|
|
label: t('menu.security'), |
|
|
|
label: t('menu.security'), |
|
|
|
key: 'security', |
|
|
|
key: 'security', |
|
|
|
icon: renderIcon(SafetyCertificateOutlined), |
|
|
|
icon: renderIcon(SafetyCertificateOutlined), |
|
|
|
isShowSide: true, |
|
|
|
children:
|
|
|
|
children: [ |
|
|
|
(userStore.getUserInfo as UserInfoRes).userType === 'ADMIN_USER' ? [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: t('menu.tenant_manage'), |
|
|
|
label: t('menu.tenant_manage'), |
|
|
|
key: `/security/tenant-manage`, |
|
|
|
key: `/security/tenant-manage`, |
|
|
@ -288,6 +285,12 @@ export function useDataList() { |
|
|
|
key: `/security/token-manage`, |
|
|
|
key: `/security/token-manage`, |
|
|
|
icon: renderIcon(SafetyOutlined) |
|
|
|
icon: renderIcon(SafetyOutlined) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
] : [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: t('menu.token_manage'), |
|
|
|
|
|
|
|
key: `/security/token-manage`, |
|
|
|
|
|
|
|
icon: renderIcon(SafetyOutlined) |
|
|
|
|
|
|
|
} |
|
|
|
] |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
] |
|
|
|