2024-12-29 20:44:44 +08:00
|
|
|
const Layout = () => import('@/layout/admin-layout.vue')
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: 'Admin',
|
|
|
|
|
path: '/admin',
|
|
|
|
|
component: Layout,
|
|
|
|
|
redirect: '/admin/index',
|
|
|
|
|
meta: {
|
|
|
|
|
title: '',
|
|
|
|
|
icon: 'uil:pagelines',
|
|
|
|
|
role: [],
|
|
|
|
|
requireAuth: false,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminIndex',
|
|
|
|
|
path: 'index',
|
|
|
|
|
component: () => import('./index.vue'),
|
|
|
|
|
meta: {
|
|
|
|
|
title: '管理端首页',
|
|
|
|
|
icon: 'mdi:home-outline',
|
|
|
|
|
//PS. 设为公开路由,但不在白名单中
|
|
|
|
|
role: [],
|
|
|
|
|
requireAuth: false,
|
|
|
|
|
order: -1,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminProblem',
|
|
|
|
|
path: 'problem',
|
|
|
|
|
redirect: '/admin/problem/problem-list',
|
|
|
|
|
meta: {
|
|
|
|
|
title: '作业管理',
|
|
|
|
|
icon: 'material-symbols:problem-outline',
|
|
|
|
|
role: ['admin', 'teacher'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminProblemList',
|
|
|
|
|
path: 'problem-list',
|
2025-03-01 20:40:30 +08:00
|
|
|
component: () => import('@/views/admin/problem/problem-list.vue'),
|
2024-12-29 20:44:44 +08:00
|
|
|
meta: {
|
|
|
|
|
title: '作业列表',
|
|
|
|
|
icon: 'eva:list-fill',
|
|
|
|
|
role: ['admin', 'teacher'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminProblemAdd',
|
|
|
|
|
path: 'problem-add',
|
2025-03-01 20:40:30 +08:00
|
|
|
component: () => import('@/views/admin/problem/problem-add.vue'),
|
2024-12-29 20:44:44 +08:00
|
|
|
meta: {
|
|
|
|
|
title: '作业添加',
|
|
|
|
|
icon: 'ic:baseline-add',
|
|
|
|
|
role: ['admin', 'teacher'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
2025-03-01 20:40:30 +08:00
|
|
|
{
|
|
|
|
|
name: 'AdminProblemStore',
|
|
|
|
|
path: 'problem-store',
|
|
|
|
|
component: () => import('@/views/admin/problem/problem-store.vue'),
|
|
|
|
|
meta: {
|
|
|
|
|
title: '作业库',
|
|
|
|
|
icon: 'ic:baseline-add',
|
|
|
|
|
role: ['admin', 'teacher'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
2024-12-29 20:44:44 +08:00
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminCourse',
|
|
|
|
|
path: 'course',
|
|
|
|
|
redirect: '/admin/course/course-list',
|
|
|
|
|
meta: {
|
|
|
|
|
title: '课程管理',
|
|
|
|
|
icon: 'lucide:book-check',
|
|
|
|
|
role: ['admin', 'teacher'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminCourseList',
|
|
|
|
|
path: 'course-list',
|
|
|
|
|
component: () => import('./course/course-list.vue'),
|
|
|
|
|
meta: {
|
|
|
|
|
title: '课程列表',
|
|
|
|
|
icon: 'eva:list-fill',
|
|
|
|
|
role: ['admin', 'teacher'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminCourseAdd',
|
|
|
|
|
path: 'course-add',
|
|
|
|
|
component: () => import('./course/course-add.vue'),
|
|
|
|
|
meta: {
|
|
|
|
|
title: '课程添加',
|
|
|
|
|
icon: 'ic:baseline-add',
|
|
|
|
|
role: ['admin', 'teacher'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminCourseEdit',
|
|
|
|
|
path: 'course-edit/:chId',
|
|
|
|
|
component: () => import('./course/course-edit.vue'),
|
|
|
|
|
isHidden: true,
|
|
|
|
|
meta: {
|
|
|
|
|
title: '课程编辑',
|
|
|
|
|
role: ['admin', 'teacher'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
2025-03-01 20:40:30 +08:00
|
|
|
{
|
|
|
|
|
name: 'AdminClassManage',
|
|
|
|
|
path: 'view-classes-not-in-exam',
|
|
|
|
|
isHidden: true,
|
|
|
|
|
component: () => import('./course/view-classes-not-in-exam.vue'),
|
|
|
|
|
meta: {
|
|
|
|
|
title: '添加班级到考试',
|
|
|
|
|
role: ['admin', 'teacher', 'assistant'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
2024-12-29 20:44:44 +08:00
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminClass',
|
|
|
|
|
path: 'class',
|
|
|
|
|
redirect: '/admin/class/class-list',
|
|
|
|
|
meta: {
|
|
|
|
|
title: '班级管理',
|
|
|
|
|
icon: 'healthicons:i-training-class',
|
|
|
|
|
role: ['admin', 'teacher', 'assistant'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminClassList',
|
|
|
|
|
path: 'class-list',
|
|
|
|
|
component: () => import('./class/class-list.vue'),
|
|
|
|
|
meta: {
|
|
|
|
|
title: '班级列表',
|
|
|
|
|
icon: 'eva:list-fill',
|
|
|
|
|
role: ['admin', 'teacher', 'assistant'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminClassAdd',
|
|
|
|
|
path: 'class-add',
|
|
|
|
|
component: () => import('./class/class-add.vue'),
|
|
|
|
|
meta: {
|
|
|
|
|
title: '班级添加',
|
|
|
|
|
icon: 'ic:baseline-add',
|
|
|
|
|
role: ['admin', 'teacher'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminClassEdit',
|
|
|
|
|
path: 'class-edit/:clId',
|
|
|
|
|
component: () => import('./class/class-edit.vue'),
|
|
|
|
|
isHidden: true,
|
|
|
|
|
meta: {
|
|
|
|
|
title: '班级编辑',
|
|
|
|
|
role: ['admin', 'teacher'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminClassStudents',
|
|
|
|
|
path: 'class-student/:clId',
|
|
|
|
|
component: () => import('./class/class-student-list.vue'),
|
|
|
|
|
isHidden: true,
|
|
|
|
|
meta: {
|
|
|
|
|
title: '学生信息',
|
|
|
|
|
role: ['admin', 'teacher', 'assistant'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'StudentEdit',
|
|
|
|
|
path: 'class-student-edit/:clId',
|
|
|
|
|
component: () => import('./class/student-edit.vue'),
|
|
|
|
|
isHidden: true,
|
|
|
|
|
meta: {
|
|
|
|
|
title: '编辑学生',
|
|
|
|
|
role: ['admin', 'teacher', 'assistant'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'StudentEditPassword',
|
|
|
|
|
path: 'class-student-password/:clId',
|
|
|
|
|
component: () => import('./class/student-edit-password.vue'),
|
|
|
|
|
isHidden: true,
|
|
|
|
|
meta: {
|
|
|
|
|
title: '编辑学生密码',
|
|
|
|
|
role: ['admin', 'teacher', 'assistant'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'ClassStudentAdd',
|
|
|
|
|
path: 'class-student-add/:clId',
|
|
|
|
|
component: () => import('./class/class-student-add.vue'),
|
|
|
|
|
isHidden: true,
|
|
|
|
|
meta: {
|
|
|
|
|
title: '添加学生',
|
|
|
|
|
role: ['admin', 'teacher', 'assistant'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminClassAssistant',
|
|
|
|
|
path: 'class-assistant/:clId',
|
|
|
|
|
component: () => import('./class/class-assistant-list.vue'),
|
|
|
|
|
isHidden: true,
|
|
|
|
|
meta: {
|
|
|
|
|
title: '助教信息',
|
|
|
|
|
role: ['admin', 'teacher'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'ClassAssistantPassword',
|
|
|
|
|
path: 'class-assistant-password/:clId',
|
|
|
|
|
component: () => import('./class/class-assistant-password.vue'),
|
|
|
|
|
isHidden: true,
|
|
|
|
|
meta: {
|
|
|
|
|
title: '重置密码',
|
|
|
|
|
role: ['admin', 'teacher'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'ClassAssistantDetail',
|
|
|
|
|
path: 'class-assistant-detail/:clId',
|
|
|
|
|
component: () => import('./class/class-assistant-detail.vue'),
|
|
|
|
|
isHidden: true,
|
|
|
|
|
meta: {
|
|
|
|
|
title: '详细信息',
|
|
|
|
|
role: ['admin', 'teacher'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'ClassAssistantAdd',
|
|
|
|
|
path: 'class-assistant-add/:clId',
|
|
|
|
|
component: () => import('./class/class-assistant-add.vue'),
|
|
|
|
|
isHidden: true,
|
|
|
|
|
meta: {
|
|
|
|
|
title: '班级助教添加',
|
|
|
|
|
role: ['admin', 'teacher'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminClassExam',
|
|
|
|
|
path: 'class-exam/:clId',
|
|
|
|
|
component: () => import('./class/class-exam-list.vue'),
|
|
|
|
|
isHidden: true,
|
|
|
|
|
meta: {
|
|
|
|
|
title: '考试信息',
|
|
|
|
|
role: ['admin', 'teacher', 'assistant'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminClassExamAdd',
|
|
|
|
|
path: 'Exam-problem-list/:clId',
|
|
|
|
|
component: () => import('./class/class-exam-add.vue'),
|
|
|
|
|
isHidden: true,
|
|
|
|
|
meta: {
|
|
|
|
|
title: '添加考试列表',
|
|
|
|
|
role: ['admin', 'teacher'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminTeacher',
|
|
|
|
|
path: 'teacher',
|
|
|
|
|
redirect: '/admin/teacher/teacher-list',
|
|
|
|
|
meta: {
|
|
|
|
|
title: '教师管理',
|
|
|
|
|
icon: 'ph:chalkboard-teacher',
|
|
|
|
|
role: ['admin'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminTeacher',
|
|
|
|
|
path: 'teacher-list',
|
|
|
|
|
component: () => import('./teacher/teacher-list.vue'),
|
|
|
|
|
meta: {
|
|
|
|
|
title: '教师列表',
|
|
|
|
|
icon: 'eva:list-fill',
|
|
|
|
|
role: ['admin'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminTeacherAdd',
|
|
|
|
|
path: 'teacher-Add',
|
|
|
|
|
component: () => import('./teacher/teacher-add.vue'),
|
|
|
|
|
meta: {
|
|
|
|
|
title: '添加教师',
|
|
|
|
|
icon: 'ic:baseline-add',
|
|
|
|
|
role: ['admin'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'TeacherEdit',
|
|
|
|
|
path: 'teacher-edit/:clId',
|
|
|
|
|
component: () => import('./teacher/teacher-edit.vue'),
|
|
|
|
|
isHidden: true,
|
|
|
|
|
meta: {
|
|
|
|
|
title: '编辑教师',
|
|
|
|
|
role: ['admin'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'TeacherPassword',
|
|
|
|
|
path: 'teacher-password/:clId',
|
|
|
|
|
component: () => import('./teacher/teacher-edit-password.vue'),
|
|
|
|
|
isHidden: true,
|
|
|
|
|
meta: {
|
|
|
|
|
title: '编辑密码',
|
|
|
|
|
role: ['admin'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminAssistant',
|
|
|
|
|
path: 'assistant',
|
|
|
|
|
redirect: '/admin/assistant/assistant-list',
|
|
|
|
|
meta: {
|
|
|
|
|
title: '助教管理',
|
|
|
|
|
icon: 'ion:people',
|
|
|
|
|
role: ['admin'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminAssistantList',
|
|
|
|
|
path: 'assistant-list',
|
|
|
|
|
component: () => import('./assistant/assistant-list.vue'),
|
|
|
|
|
meta: {
|
|
|
|
|
title: '助教列表',
|
|
|
|
|
icon: 'eva:list-fill',
|
|
|
|
|
role: ['admin'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminAssistantAdd',
|
|
|
|
|
path: 'assistant-add',
|
|
|
|
|
component: () => import('./assistant/assistant-add.vue'),
|
|
|
|
|
meta: {
|
|
|
|
|
title: '助教添加',
|
|
|
|
|
icon: 'ic:baseline-add',
|
|
|
|
|
role: ['admin'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminAssistantEdit',
|
|
|
|
|
path: 'assistant-edit/:asId',
|
|
|
|
|
component: () => import('./assistant/assistant-edit.vue'),
|
|
|
|
|
isHidden: true,
|
|
|
|
|
meta: {
|
|
|
|
|
title: '助教编辑',
|
|
|
|
|
icon: 'ic:baseline-table-view',
|
|
|
|
|
role: ['admin'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminAssistantRePassword',
|
|
|
|
|
path: 'assistant-re-password/:asId',
|
|
|
|
|
component: () => import('./assistant/assistant-repassword.vue'),
|
|
|
|
|
isHidden: true,
|
|
|
|
|
meta: {
|
|
|
|
|
title: '密码修改',
|
|
|
|
|
icon: 'ic:baseline-table-view',
|
|
|
|
|
role: ['admin'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminStudent',
|
|
|
|
|
path: 'student',
|
|
|
|
|
redirect: '/admin/student/student-list',
|
|
|
|
|
meta: {
|
|
|
|
|
title: '全部学生',
|
|
|
|
|
icon: 'ph:student',
|
|
|
|
|
role: ['admin'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
name: 'AdminStudent',
|
|
|
|
|
path: 'student-list',
|
|
|
|
|
component: () => import('./student/student-list.vue'),
|
|
|
|
|
meta: {
|
|
|
|
|
title: '全部学生',
|
|
|
|
|
icon: 'ph:student',
|
|
|
|
|
role: ['admin'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'StudentEdits',
|
|
|
|
|
path: 'student-edit/:clId',
|
|
|
|
|
component: () => import('./student/student-edit.vue'),
|
|
|
|
|
isHidden: true,
|
|
|
|
|
meta: {
|
|
|
|
|
title: '编辑学生',
|
|
|
|
|
role: ['admin'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'StudentPassword',
|
|
|
|
|
path: 'student-password/:clId',
|
|
|
|
|
component: () => import('./student/student-edit-password.vue'),
|
|
|
|
|
isHidden: true,
|
|
|
|
|
meta: {
|
|
|
|
|
title: '编辑密码',
|
|
|
|
|
role: ['admin'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'PersonSetting',
|
|
|
|
|
path: '/admin/person-setting',
|
|
|
|
|
component: () => import('./tool/index.vue'),
|
|
|
|
|
isHidden: true,
|
|
|
|
|
meta: {
|
|
|
|
|
title: '个人设置',
|
|
|
|
|
role: ['teacher', 'admin', 'assistant'],
|
|
|
|
|
requireAuth: true,
|
|
|
|
|
keepAlive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
}
|