From 8b237203bc762a104d13326b7ce456d758629abb Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期一, 11 三月 2024 18:01:58 +0800
Subject: [PATCH] 部门管理员路由管理-bug处理
---
src/layout/components/Sidebar/index.vue | 12 ++-
src/router.js | 111 ------------------------------------
src/store/modules/router.js | 3
3 files changed, 9 insertions(+), 117 deletions(-)
diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue
index 104421d..36dfebd 100644
--- a/src/layout/components/Sidebar/index.vue
+++ b/src/layout/components/Sidebar/index.vue
@@ -27,11 +27,6 @@
export default {
components: { SidebarItem, Logo },
- data () {
- return {
- routerList: sessionStorage.getItem('deptAdmin') === '1' ? deptAdminRoutes : this.routes
- }
- },
computed: {
...mapGetters([
'sidebar',
@@ -51,6 +46,13 @@
},
isCollapse () {
return !this.sidebar.opened
+ },
+ routerList () {
+ return sessionStorage.getItem('deptAdmin') === '1' ? deptAdminRoutes : this.routes
+ }
+ },
+ data () {
+ return {
}
}
}
diff --git a/src/router.js b/src/router.js
index 5013f6c..a4c18b1 100644
--- a/src/router.js
+++ b/src/router.js
@@ -398,44 +398,6 @@
},
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',
@@ -454,65 +416,6 @@
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 }
}
]
},
@@ -526,18 +429,6 @@
},
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'),
@@ -574,7 +465,7 @@
]
const router = new Router({
- routes: sessionStorage.getItem('deptAdmin') === '1' ? deptAdminRoutes : constantRoutes
+ routes: constantRoutes
})
export {
diff --git a/src/store/modules/router.js b/src/store/modules/router.js
index 0ec6320..747a715 100644
--- a/src/store/modules/router.js
+++ b/src/store/modules/router.js
@@ -1,4 +1,4 @@
-import { constantRoutes, deptAdminRouter } from '@/router'
+import { constantRoutes } from '@/router'
let state = {
routes: constantRoutes
@@ -11,7 +11,6 @@
}
const actions = {
- changeRoute() {}
}
export default {
--
Gitblit v1.8.0