| | |
| | | |
| | | export default { |
| | | components: { SidebarItem, Logo }, |
| | | data () { |
| | | return { |
| | | routerList: sessionStorage.getItem('deptAdmin') === '1' ? deptAdminRoutes : this.routes |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters([ |
| | | 'sidebar', |
| | |
| | | }, |
| | | isCollapse () { |
| | | return !this.sidebar.opened |
| | | }, |
| | | routerList () { |
| | | return sessionStorage.getItem('deptAdmin') === '1' ? deptAdminRoutes : this.routes |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | } |
| | | } |
| | | } |
| | |
| | | }, |
| | | children: [ |
| | | { |
| | | path: 'paper/list', |
| | | component: () => import('@/views/exam/paper/list'), |
| | | name: 'ExamPaperPageList', |
| | | meta: { title: '试卷列表', noCache: true } |
| | | }, |
| | | { |
| | | path: 'paper/edit', |
| | | component: () => import('@/views/exam/paper/edit'), |
| | | name: 'ExamPaperEdit', |
| | | meta: { title: '试卷编辑', noCache: true, activeMenu: '/exam/paper/list' }, |
| | | hidden: true |
| | | }, |
| | | { |
| | | 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: 'simulation/list', |
| | | component: () => import('@/views/exam/simulation/list'), |
| | | name: 'personalSimulationList', |
| | | meta: { title: '模拟列表', noCache: true } |
| | | }, |
| | | { |
| | | path: 'personalSimulation/list', |
| | | component: () => import('@/views/exam/personalSimulation/list'), |
| | | name: 'personalSimulation', |
| | | meta: { title: '个人模拟', noCache: true } |
| | | }, |
| | | { |
| | | path: 'personalRandomTemplate/list', |
| | | component: () => import('@/views/exam/personalRandomTemplate/list'), |
| | | name: 'personalSimulation', |
| | |
| | | name: 'personalSimulationEdit', |
| | | meta: { title: '试卷编辑', noCache: true, activeMenu: '/exam/personalSimulation/list' }, |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: 'personalSimulation/list/mathList', |
| | | component: () => import('@/views/exam/mathList/list.vue'), |
| | | name: 'multiplemathList', |
| | | meta: { title: '模拟列表详情', noCache: true, activeMenu: '/exam/mathList/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: '/task', |
| | | 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: 'edit', |
| | | component: () => import('@/views/task/edit'), |
| | | name: 'TaskEditPage', |
| | | meta: { title: '任务创建', noCache: true } |
| | | } |
| | | ] |
| | | }, |
| | |
| | | }, |
| | | alwaysShow: true, |
| | | children: [ |
| | | { |
| | | path: 'list', |
| | | component: () => import('@/views/answer/list'), |
| | | name: 'AnswerPageList', |
| | | meta: { title: '答卷列表', noCache: true } |
| | | }, |
| | | { |
| | | path: 'sheetStatistics', |
| | | component: () => import('@/views/answer/sheetStatistics.vue'), |
| | | name: 'AnswerPageList', |
| | | meta: { title: '答卷统计', noCache: true } |
| | | }, |
| | | { |
| | | path: 'achievementStatistics', |
| | | component: () => import('@/views/answer/achievementStatistics.vue'), |
| | |
| | | ] |
| | | |
| | | const router = new Router({ |
| | | routes: sessionStorage.getItem('deptAdmin') === '1' ? deptAdminRoutes : constantRoutes |
| | | routes: constantRoutes |
| | | }) |
| | | |
| | | export { |
| | |
| | | import { constantRoutes, deptAdminRouter } from '@/router' |
| | | import { constantRoutes } from '@/router' |
| | | |
| | | let state = { |
| | | routes: constantRoutes |
| | |
| | | } |
| | | |
| | | const actions = { |
| | | changeRoute() {} |
| | | } |
| | | |
| | | export default { |