统计报表
This commit is contained in:
1 parent
3d4d9953e8
commit
97691cb203
7 files changed
+1493
No files matched your search
Vendored
+2
@@ -17,6 +17,8 @@ declare module 'vue' {
|
||||
ElCard: typeof import('element-plus/es')['ElCard']
|
||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
|
||||
ElCollapse: typeof import('element-plus/es')['ElCollapse']
|
||||
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
|
||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||
ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
|
||||
ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
|
||||
|
||||
@@ -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: '组织与权限',
|
||||
|
||||
@@ -260,6 +260,14 @@ const router = createRouter({
|
||||
component: () => import('../views/UsersView.vue'),
|
||||
meta: { roles: ['SuperAdmin'] },
|
||||
},
|
||||
{
|
||||
path: 'statistics',
|
||||
name: 'statistics',
|
||||
component: () => import('../views/StatisticsView.vue'),
|
||||
meta: {
|
||||
roles: ['SuperAdmin', 'AcademicAdmin', 'CollegeAdmin', 'Leader'],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{ path: '/:pathMatch(.*)*', redirect: '/dashboard' },
|
||||
|
||||
Loaded 3 of 7 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user