实验预约

This commit is contained in:
2026-07-28 21:04:18 +08:00 Unverified
parent 865378dbdf
commit ec979f640d
12 changed files with 8750 additions and 0 deletions
+15
View File
@@ -49,6 +49,10 @@ const isStatisticsViewer = computed(() =>
),
)
const canUseExperiments = computed(() =>
hasAnyRole(['SuperAdmin', 'AcademicAdmin', 'CollegeAdmin', 'Teacher', 'Student']),
)
function hasAnyRole(allowedRoles: string[]) {
return roles.value.some((role) => allowedRoles.includes(role))
}
@@ -72,6 +76,17 @@ const navigationGroups = computed<NavigationGroup[]>(() => [
items: [{ path: '/statistics', label: '统计报表' }],
} as NavigationGroup]
: []),
...(canUseExperiments.value
? [{
key: 'experiments',
label: isStudent.value ? '我的实验' : '实验管理',
direct: true,
items: [{
path: '/experiments',
label: isStudent.value ? '我的实验' : '实验管理',
}],
} as NavigationGroup]
: []),
{
key: 'organization',
label: '组织与权限',