diff --git a/src/router/index_Common.js b/src/router/index_Common.js index 778aced0c..cbdebad42 100644 --- a/src/router/index_Common.js +++ b/src/router/index_Common.js @@ -225,8 +225,6 @@ export const constantRoutes = [ { // 竞赛系统报名 path: '/jsxtApply', component: JsxtApply, - meta: { - }, hidden: true }, { @@ -969,40 +967,31 @@ export const JSXT = [ redirect: '/jsxt/home', component: Layout, meta: { - i18n: 'router.competitionManage', roles: [user, admin, userTrainingPlatform] }, - hidden: getSessionStorage('project') ? !getSessionStorage('project').endsWith('jsxt') && !window.document.location.pathname.includes('jsxt') : !window.document.location.pathname.includes('jsxt'), + hidden: true, children: [ { path: '', redirect: '/jsxt/home', component: CompetitionManage, meta: { - i18n: 'router.competitionManage', - icon: 'design' }, children: [ { path: 'home', component: CompetitionHome, - meta: { - hidden: true - } + hidden: true }, // { // path: 'theory/:id', // component: theoryManage, - // meta: { - // hidden: true - // } + // hidden: true // }, { path: 'examDetail', component: CompetitionDetail, - meta: { - hidden: true - } + hidden: true }, { // 考试结果 path: 'result', @@ -1016,9 +1005,7 @@ export const JSXT = [ { path: '/jsxt/theory/detail/:id', component: Refereedetail, - meta: { - hidden: true - } + hidden: true }, { path: '/refereeJsxt', diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index ee75ac2d9..349af31c1 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -88,7 +88,7 @@ const permission = { if (roles.includes(admin) && !roles.includes(user)) { // 只拥有管理员 不拥有普通用户权限 则增加用户权限 roles.push(user); } - const routeList = resetAsyncRouter(PermissionParam[getSessionStorage('project')]); + const routeList = resetAsyncRouter(PermissionParam[getSessionStorage('project') || 'login']); const accessedRouters = filterAsyncRouter(routeList, roles); accessedRouters.forEach(route => { diff --git a/src/views/competitionManage/create.vue b/src/views/competitionManage/create.vue index 06df9a072..4f93c9d7b 100644 --- a/src/views/competitionManage/create.vue +++ b/src/views/competitionManage/create.vue @@ -1,5 +1,5 @@