From 51d32283921983508bebffee2ecd5cb4c4948e6a Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期三, 05 六月 2024 16:04:23 +0800
Subject: [PATCH] feat:题目表移除分数字段、新增题目状态、条件多选
---
src/router.js | 332 +++++++++++++++++++++++-------------------------------
1 files changed, 141 insertions(+), 191 deletions(-)
diff --git a/src/router.js b/src/router.js
index b567245..adcce54 100644
--- a/src/router.js
+++ b/src/router.js
@@ -36,234 +36,176 @@
}
]
},
- {
- 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: 'test-paper-generation',
+ name: 'TestPaperGeneration',
+ component: () => import('@/views/Manage/TestPaper/TestPaperGeneration.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')
}
]
},
+ // 瀛︿範妗f
{
- 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 }
}
]
@@ -271,6 +213,14 @@
routes: constantRoutes
})
+
+router.beforeEach((to,from,next)=>{
+ if(to.meta.title){//鍒ゆ柇鏄惁鏈夋爣棰�
+ document.title = to.meta.title
+ }
+ next() //鎵ц杩涘叆璺敱锛屽鏋滀笉鍐欏氨涓嶄細杩涘叆鐩爣椤�
+})
+
export {
constantRoutes,
router
--
Gitblit v1.8.0