统计报表
This commit is contained in:
@@ -43,6 +43,12 @@ const isTimetableManager = computed(() =>
|
||||
),
|
||||
)
|
||||
|
||||
const isStatisticsViewer = computed(() =>
|
||||
roles.value.some((role) =>
|
||||
['SuperAdmin', 'AcademicAdmin', 'CollegeAdmin', 'Leader'].includes(role),
|
||||
),
|
||||
)
|
||||
|
||||
function hasAnyRole(allowedRoles: string[]) {
|
||||
return roles.value.some((role) => allowedRoles.includes(role))
|
||||
}
|
||||
@@ -58,6 +64,14 @@ const navigationGroups = computed<NavigationGroup[]>(() => [
|
||||
direct: true,
|
||||
items: [{ path: '/dashboard', label: '教务总览' }],
|
||||
},
|
||||
...(isStatisticsViewer.value
|
||||
? [{
|
||||
key: 'statistics',
|
||||
label: '统计报表',
|
||||
direct: true,
|
||||
items: [{ path: '/statistics', label: '统计报表' }],
|
||||
} as NavigationGroup]
|
||||
: []),
|
||||
{
|
||||
key: 'organization',
|
||||
label: '组织与权限',
|
||||
|
||||
Reference in New Issue
Block a user