| | |
| | | import addStyle from '../views/datamanage/addStyle.vue'; //数据管理-样式管理-添加样式 |
| | | import ExportMap from '../views/exportMap/index.vue'; //在线制图 |
| | | import userInfoManage from '../views/userManage/userInfoManage.vue'; // 用户管理模块 |
| | | import templateManage from '../views/userManage/templateManage.vue'; // 模板管理 |
| | | import orgManage from '../views/userManage/orgManage.vue'; // 用户管理模块 |
| | | import userAuditing from '../views/userManage/userAuditing.vue'; // 用户管理模块 |
| | | import roleManage from '../views/userManage/roleManage.vue'; // 用户管理模块 |
| | |
| | | import roleResAuthorization from '@/views/AuthorizationManagement/roleResAuthorization.vue'; //系统管理-角色资源授权 |
| | | import roleMenuAuthorization from '@/views/AuthorizationManagement/roleMenuAuthorization.vue'; //系统管理-角色菜单授权 |
| | | |
| | | import bankController from '../views/datamanage/bankController.vue';//数据库管理 |
| | | import projectController from '../views/datamanage/projectController.vue';//项目管理 |
| | | |
| | | import systemController from '@/views/maintenance/systemController.vue';//系统管理 |
| | | import empowerController from '@/views/maintenance/empowerController.vue';//授权管理 |
| | | import opexController from '@/views/maintenance/opexController.vue';//运维监控 |
| | | |
| | | //包二 |
| | | import WareInspection from '@/views/PackageTwo/WareInspection.vue'; //数据质检-入库质检 |
| | | import QualityInspection from '@/views/PackageTwo/index.vue'; //数据质检-入库质检 |
| | | const originalPush = VueRouter.prototype.push; |
| | | |
| | | VueRouter.prototype.push = function push(location) { |
| | | return originalPush.call(this, location).catch((err) => err); |
| | | const nowPage = sessionStorage.getItem('routerName') |
| | | const page = { |
| | | path: nowPage |
| | | } |
| | | if (page === location || location === '/') { |
| | | return originalPush.call(this, page).catch((err) => err); |
| | | } else { |
| | | return originalPush.call(this, location).catch((err) => err); |
| | | } |
| | | }; |
| | | |
| | | // 群组管理 |
| | |
| | | name: 'mochaitmo', |
| | | meta: { |
| | | title: '运维管理', |
| | | requireAuth: true, // 标识该路由是否需要登录 |
| | | }, |
| | | }, |
| | | { |
| | | path: '/systemController', |
| | | component: systemController, |
| | | name: 'systemController', |
| | | meta: { |
| | | title: '系统管理', |
| | | requireAuth: true, // 标识该路由是否需要登录 |
| | | }, |
| | | }, |
| | | { |
| | | path: '/empowerController', |
| | | component: empowerController, |
| | | name: 'empowerController', |
| | | meta: { |
| | | title: '授权管理', |
| | | requireAuth: true, // 标识该路由是否需要登录 |
| | | }, |
| | | }, |
| | | { |
| | | path: '/opexController', |
| | | component: opexController, |
| | | name: 'opexController', |
| | | meta: { |
| | | title: '运维监控', |
| | | requireAuth: true, // 标识该路由是否需要登录 |
| | | }, |
| | | }, |
| | | { |
| | | path: '/bankController', |
| | | component: bankController, |
| | | name: 'bankController', |
| | | meta: { |
| | | title: '数据库管理', |
| | | requireAuth: true, // 标识该路由是否需要登录 |
| | | }, |
| | | }, |
| | | { |
| | | path: '/projectController', |
| | | component: projectController, |
| | | name: 'projectController', |
| | | meta: { |
| | | title: '项目管理', |
| | | requireAuth: true, // 标识该路由是否需要登录 |
| | | }, |
| | | }, |
| | |
| | | }, |
| | | }, |
| | | { |
| | | path: '/templateManage', |
| | | component: templateManage, |
| | | name: 'templateManage', |
| | | meta: { |
| | | title: '模板管理', |
| | | requireAuth: true, // 标识该路由是否需要登录 |
| | | }, |
| | | }, |
| | | { |
| | | path: '/orgManage', |
| | | component: orgManage, |
| | | name: 'orgManage', |
| | |
| | | }); |
| | | //路由守卫 |
| | | router.beforeEach((to, from, next) => { |
| | | sessionStorage.setItem('routerName', to.path) |
| | | next(); |
| | | if (to.matched.some((auth) => auth.meta.requireAuth)) { |
| | | // 获取token |