| | |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/user', |
| | | component: Layout, |
| | | name: 'UserPage', |
| | | meta: { |
| | | title: '用户管理', |
| | | icon: 'users' |
| | | }, |
| | | children: [ |
| | | { |
| | | path: 'student/list', |
| | | component: () => import('@/views/user/student/list'), |
| | | name: 'UserStudentPageList', |
| | | meta: { title: '学生列表', noCache: true } |
| | | }, |
| | | { |
| | | path: 'student/edit', |
| | | component: () => import('@/views/user/student/edit'), |
| | | name: 'UserStudentEdit', |
| | | meta: { title: '学生编辑', noCache: true, activeMenu: '/user/student/list' }, |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: 'admin/list', |
| | | component: () => import('@/views/user/admin/list'), |
| | | name: 'UserAdminPageList', |
| | | meta: { title: '管理员列表', noCache: true } |
| | | }, |
| | | { |
| | | path: 'admin/edit', |
| | | component: () => import('@/views/user/admin/edit'), |
| | | name: 'UserAdminEdit', |
| | | meta: { title: '管理员编辑', noCache: true, activeMenu: '/user/admin/list' }, |
| | | hidden: true |
| | | } |
| | | ] |
| | | }, |
| | | // 开始考试 |
| | | { |
| | | path: '/exam', |
| | | name: 'exam', |
| | | component: Layout, |
| | | name: 'ExamPage', |
| | | meta: { |
| | | title: '卷题管理', |
| | | icon: 'exam' |
| | | }, |
| | | children: [ |
| | | { |
| | | path: 'paper/list', |
| | | component: () => import('@/views/exam/paper/list'), |
| | | name: 'ExamPaperPageList', |
| | | meta: { title: '试卷列表', noCache: true } |
| | | path: '/', |
| | | name: 'examIndex', |
| | | component: () => import('@/views/Exam/Exam.vue') |
| | | }, |
| | | { |
| | | path: 'paper/edit', |
| | | component: () => import('@/views/exam/paper/edit'), |
| | | name: 'ExamPaperEdit', |
| | | meta: { title: '试卷编辑', noCache: true, activeMenu: '/exam/paper/list' }, |
| | | hidden: true |
| | | path: 'myexam', |
| | | name: 'myexam', |
| | | component: () => import('@/views/Exam/MyExam/MyExam.vue'), |
| | | |
| | | }, |
| | | // 开始考试 |
| | | { |
| | | path: 'question/list', |
| | | component: () => import('@/views/exam/question/list'), |
| | | name: 'ExamQuestionPageList', |
| | | meta: { title: '题目列表', noCache: true } |
| | | }, |
| | | { |
| | | path: 'question/edit/singleChoice', |
| | | component: () => import('@/views/exam/question/edit/single-choice'), |
| | | name: 'singleChoicePage', |
| | | meta: { title: '单选题编辑', noCache: true, activeMenu: '/exam/question/list' }, |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: 'question/edit/multipleChoice', |
| | | component: () => import('@/views/exam/question/edit/multiple-choice'), |
| | | name: 'multipleChoicePage', |
| | | meta: { title: '多选题编辑', noCache: true, activeMenu: '/exam/question/list' }, |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: 'question/edit/trueFalse', |
| | | component: () => import('@/views/exam/question/edit/true-false'), |
| | | name: 'trueFalsePage', |
| | | meta: { title: '判断题编辑', noCache: true, activeMenu: '/exam/question/list' }, |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: 'question/edit/gapFilling', |
| | | component: () => import('@/views/exam/question/edit/gap-filling'), |
| | | name: 'gapFillingPage', |
| | | meta: { title: '填空题编辑', noCache: true, activeMenu: '/exam/question/list' }, |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: 'question/edit/shortAnswer', |
| | | component: () => import('@/views/exam/question/edit/short-answer'), |
| | | name: 'shortAnswerPage', |
| | | meta: { title: '简答题编辑', noCache: true, activeMenu: '/exam/question/list' }, |
| | | hidden: true |
| | | path: 'beginexam', |
| | | name: 'BeginExam', |
| | | component: () => import('@/views/Exam/MyExam/BeginExam.vue') |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | path: '/teach', |
| | | name: 'teach', |
| | | component: Layout, |
| | | children: [ |
| | | { |
| | | path: '/', |
| | | name: 'examIndex', |
| | | component: () => import('@/views/Teach/Teach.vue') |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | path: '/task', |
| | | path: '/manage', |
| | | name: 'manage', |
| | | component: Layout, |
| | | name: 'TaskPage', |
| | | meta: { |
| | | title: '任务管理', |
| | | icon: 'task' |
| | | }, |
| | | alwaysShow: true, |
| | | children: [ |
| | | // 应用管理 |
| | | { |
| | | path: 'list', |
| | | component: () => import('@/views/task/list'), |
| | | name: 'TaskListPage', |
| | | meta: { title: '任务列表', noCache: true } |
| | | path: '/', |
| | | name: 'manageIndex', |
| | | component: () => import('@/views/Manage/Manage.vue') |
| | | }, |
| | | // 教师管理 |
| | | { |
| | | path: 'edit', |
| | | component: () => import('@/views/task/edit'), |
| | | name: 'TaskEditPage', |
| | | meta: { title: '任务创建', noCache: true } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/education', |
| | | component: Layout, |
| | | name: 'EducationPage', |
| | | meta: { |
| | | title: '教育管理', |
| | | icon: 'education' |
| | | }, |
| | | alwaysShow: true, |
| | | children: [ |
| | | { |
| | | path: 'subject/list', |
| | | component: () => import('@/views/education/subject/list'), |
| | | name: 'EducationSubjectPage', |
| | | meta: { title: '学科列表', noCache: true } |
| | | path: 'teacher-manage', |
| | | name: 'teacherManage', |
| | | component: () => import('@/views/Manage/Education/TeacherManage.vue'), |
| | | meta: { title: '教师管理' } |
| | | }, |
| | | // 教师介绍 |
| | | { |
| | | path: 'subject/edit', |
| | | component: () => import('@/views/education/subject/edit'), |
| | | name: 'EducationSubjectEditPage', |
| | | meta: { title: '学科编辑', noCache: true, activeMenu: '/education/subject/list' }, |
| | | hidden: true |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/answer', |
| | | component: Layout, |
| | | name: 'AnswerPage', |
| | | meta: { |
| | | title: '成绩管理', |
| | | icon: 'answer' |
| | | }, |
| | | alwaysShow: true, |
| | | children: [ |
| | | { |
| | | path: 'list', |
| | | component: () => import('@/views/answer/list'), |
| | | name: 'AnswerPageList', |
| | | meta: { title: '答卷列表', noCache: true } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/message', |
| | | component: Layout, |
| | | name: 'MessagePage', |
| | | meta: { |
| | | title: '消息中心', |
| | | icon: 'message' |
| | | }, |
| | | alwaysShow: true, |
| | | children: [ |
| | | { |
| | | path: 'list', |
| | | component: () => import('@/views/message/list'), |
| | | name: 'MessageListPage', |
| | | meta: { title: '消息列表', noCache: true } |
| | | path: 'teacher-detail', |
| | | name: 'teacherDetail', |
| | | component: () => import('@/views/Manage/Education/TeacherDetail.vue') |
| | | }, |
| | | // 考勤记录明细 |
| | | { |
| | | path: 'send', |
| | | component: () => import('@/views/message/send'), |
| | | name: 'MessageSendPage', |
| | | meta: { title: '消息发送', noCache: true } |
| | | path: 'attendance-record', |
| | | name: 'attendanceRecord', |
| | | component: () => import('@/views/Manage/AttendanceRecord/index.vue') |
| | | }, |
| | | // 成绩查询 |
| | | { |
| | | path: 'score-inquiry', |
| | | name: 'ScoreInquiry', |
| | | component: () => import('@/views/Manage/ScoreInquiry/index.vue') |
| | | }, |
| | | // 学分计算规则 |
| | | { |
| | | path: 'credit-hour', |
| | | name: 'CreditHour', |
| | | component: () => import('@/views/Manage/CreditHour/index.vue') |
| | | }, |
| | | // 试卷管理 |
| | | { |
| | | path: 'test-paper', |
| | | name: 'TestPaper', |
| | | component: () => import('@/views/Manage/TestPaper/index.vue'), |
| | | meta: { title: '试卷管理' } |
| | | }, |
| | | // 题库管理 |
| | | { |
| | | path: 'question-bank', |
| | | name: 'QuestionBank', |
| | | component: () => import('@/views/Manage/TestPaper/QuestionBank.vue'), |
| | | meta: { title: '题库管理' } |
| | | }, |
| | | // 科目管理 |
| | | { |
| | | path: 'subject', |
| | | name: 'subject', |
| | | component: () => import('@/views/Manage/TestPaper/subject.vue'), |
| | | meta: { title: '科目管理' } |
| | | }, |
| | | // 试卷生成 |
| | | { |
| | | path: 'test-paper-generation', |
| | | name: 'TestPaperGeneration', |
| | | component: () => import('@/views/Manage/TestPaper/TestPaperGeneration.vue') |
| | | }, |
| | | //随机试卷模板管理 |
| | | { |
| | | path: 'paper-template', |
| | | name: 'PaperTemplate', |
| | | component: () => import('@/views/Manage/TestPaper/PaperTemplate.vue') |
| | | }, |
| | | // 班级管理 |
| | | { |
| | | path: 'class-management', |
| | | name: 'ClassManagement', |
| | | component: () => import('@/views/Manage/ClassManagement/index.vue'), |
| | | children: [ |
| | | { |
| | | path: '/', |
| | | name: 'ClassManagementIndex', |
| | | component: () => import('@/views/Manage/ClassManagement/Class.vue'), |
| | | meta: { title: '班级管理' } |
| | | }, { |
| | | path: 'Class-staff', |
| | | name: 'ClassStaff', |
| | | component: () => import('@/views/Manage/ClassManagement/ClassStaff.vue'), |
| | | meta: { title: '班级成员管理' } |
| | | } |
| | | ] |
| | | }, |
| | | // 发布公告 |
| | | { |
| | | path: 'Announce', |
| | | name: 'announce', |
| | | component: () => import('@/views/Manage/Announce/index.vue'), |
| | | }, |
| | | // 课程表 |
| | | { |
| | | path: 'timetable', |
| | | name: 'Timetable', |
| | | component: () => import('@/views/Manage/Timetable/index.vue'), |
| | | }, |
| | | // 电子邮件 |
| | | { |
| | | path: 'email', |
| | | name: 'Email', |
| | | component: () => import('@/views/Manage/Email/index.vue'), |
| | | }, |
| | | // 考试管理 |
| | | { |
| | | path: 'examination-management', |
| | | name: 'ExaminationManagement', |
| | | component: () => import('@/views/Manage/ExaminationManagement/index.vue'), |
| | | } |
| | | ] |
| | | |
| | | ], |
| | | }, |
| | | // 个人资料 |
| | | { |
| | | path: '/log', |
| | | path: '/mine', |
| | | name: 'mine', |
| | | component: Layout, |
| | | name: 'LogPage', |
| | | meta: { |
| | | title: '日志中心', |
| | | icon: 'log' |
| | | }, |
| | | alwaysShow: true, |
| | | children: [ |
| | | { |
| | | path: 'user/list', |
| | | component: () => import('@/views/log/list'), |
| | | name: 'LogUserPage', |
| | | meta: { title: '用户日志', noCache: true } |
| | | path: '/mine', |
| | | name: 'mine', |
| | | component: () => import('@/views/mine/index.vue') |
| | | } |
| | | ] |
| | | }, |
| | | // 学习档案 |
| | | { |
| | | path: '/profile', |
| | | path: '/study-particulars', |
| | | name: 'StudyParticulars', |
| | | component: Layout, |
| | | hidden: true, |
| | | children: [ |
| | | { |
| | | path: 'index', |
| | | component: () => import('@/views/profile/index'), |
| | | name: 'Profile', |
| | | meta: { title: '个人简介', icon: 'user', noCache: true } |
| | | path: '/study-particulars', |
| | | name: 'Study-particulars', |
| | | component: () => import('@/views/mine/StudyParticulars.vue') |
| | | } |
| | | ] |
| | | }, |
| | | { path: '*', |
| | | hidden: true, |
| | | component: () => import('@/views/error-page/404'), |
| | | meta: { title: '404', noCache: true } |
| | | } |
| | | ] |
| | | |
| | |
| | | routes: constantRoutes |
| | | }) |
| | | |
| | | |
| | | router.beforeEach((to,from,next)=>{ |
| | | if(to.meta.title){//判断是否有标题 |
| | | document.title = to.meta.title |
| | | } |
| | | next() //执行进入路由,如果不写就不会进入目标页 |
| | | }) |
| | | |
| | | export { |
| | | constantRoutes, |
| | | router |