Browse Source

report display page config as wide-screen page

hare8999@163.com 2 years ago
parent
commit
a1ab27ac09
2 changed files with 9 additions and 4 deletions
  1. 6 3
      src/router/index.js
  2. 3 1
      src/store/modules/mx-permission.js

+ 6 - 3
src/router/index.js

@@ -690,7 +690,8 @@ export const constantRoutes = [{
         name: 'ElectiveReportIndex',
         meta: {
           title: '选科报告',
-          parentPath: '/new-gaokao/bigdataSelectCourse/personalSelectCourseReport'
+          parentPath: '/new-gaokao/bigdataSelectCourse',
+          isWideScreen: true
         }
       },
       {
@@ -699,7 +700,8 @@ export const constantRoutes = [{
         name: '',
         meta: {
           title: '选科报告',
-          parentPath: '/new-gaokao/bigdataSelectCourse/personalSelectCourseReport'
+          parentPath: '/new-gaokao/bigdataSelectCourse',
+          isWideScreen: true
         }
       },
       {
@@ -708,7 +710,8 @@ export const constantRoutes = [{
         name: '',
         meta: {
           title: '学情报告',
-          parentPath: '/daoxue/report'
+          parentPath: '/daoxue/report',
+          isWideScreen: true
         }
       },
       {

+ 3 - 1
src/store/modules/mx-permission.js

@@ -138,7 +138,9 @@ const permission = {
           commit('SET_SIDEBAR_ROUTERS', [])
         }
         const middleMatch = ancestors.matches[1]
-        if (middleMatch) {
+        if (middleMatch &&
+          ancestors.matches.length > 2 // NOTE: 有部分路由强制只匹配至2级菜单,如报告想全屏展示
+        ) {
           commit('SET_SIDEBAR_ROUTERS', middleMatch.children || [])
         }
       }