| | |
| | | }, |
| | | mounted() { |
| | | // 获取所有定义的一级菜单和多级菜单 |
| | | // 过滤掉登录路由,只获取主布局下的路由 |
| | | this.routersList = routers.options.routes.find(route => route.path === '/').children; |
| | | // 过滤掉登录路由和重定向路由,只获取主布局下的路由 |
| | | this.routersList = routers.options.routes.filter(route => |
| | | route.path !== '/login' && |
| | | route.path !== '/' && |
| | | !route.meta?.hide |
| | | ); |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | |
| | | const routes = [ |
| | | { |
| | | path: "/", |
| | | redirect: "/projectList/list", |
| | | }, |
| | | { |
| | | path: "/login", |
| | | meta: { |
| | | title: "登录", |
| | |
| | | component: () => import("../views/login"), |
| | | }, |
| | | { |
| | | path: "/", |
| | | component: Layouts, |
| | | children: [ |
| | | { |
| | | path: "/projectList", |
| | | meta: { |
| | | title: "项目组管理", |
| | | }, |
| | | component: Parent, |
| | | component: Layouts, |
| | | children: [ |
| | | { |
| | | path: "list", |
| | |
| | | }, |
| | | { |
| | | path: "/dataManagement", |
| | | component: Parent, |
| | | component: Layouts, |
| | | meta: { |
| | | title: "实验室数据管理", |
| | | }, |
| | |
| | | component: () => import("../views/dataManagement/approvalPlan/addPlan"), |
| | | }, |
| | | { |
| | | path: "/dispatching", |
| | | path: "dispatching", |
| | | meta: { |
| | | title: "实验调度管理", |
| | | keepAlive: true, |
| | |
| | | component: () => import("../views/dataManagement/dispatching/list.vue"), |
| | | }, |
| | | { |
| | | path: "/confirmation-sheet", |
| | | path: "confirmation-sheet", |
| | | meta: { |
| | | title: "校验方法确认单", |
| | | keepAlive: true, |
| | |
| | | }, |
| | | { |
| | | path: "/reportLibrary", |
| | | component: Parent, |
| | | component: Layouts, |
| | | meta: { |
| | | title: "专业报告库审批", |
| | | }, |
| | | children: [ |
| | | { |
| | | path: "/feasibilityStudy", |
| | | path: "feasibilityStudy", |
| | | meta: { |
| | | title: "可研报告库", |
| | | keepAlive: true, |
| | |
| | | component: () => import("../views/reportLibrary/feasibilityStudy/index.vue"), |
| | | }, |
| | | { |
| | | path: "/feasibilityReport", |
| | | path: "feasibilityReport", |
| | | meta: { |
| | | title: "可行报告库", |
| | | keepAlive: true, |
| | |
| | | component: () => import("../views/reportLibrary/feasibilityReport/index.vue"), |
| | | }, |
| | | { |
| | | path: "/processDevelopment", |
| | | path: "processDevelopment", |
| | | meta: { |
| | | title: "工艺开发工具", |
| | | keepAlive: true, |
| | |
| | | component: () => import("../views/reportLibrary/processDevelopment/index.vue"), |
| | | }, |
| | | { |
| | | path: "/verificationRelease", |
| | | path: "verificationRelease", |
| | | meta: { |
| | | title: "验证与发布", |
| | | keepAlive: true, |
| | |
| | | component: () => import("../views/reportLibrary/verificationRelease/index.vue"), |
| | | }, |
| | | { |
| | | path: "/projectProposalLibrary", |
| | | path: "projectProposalLibrary", |
| | | meta: { |
| | | title: "立项报告库", |
| | | keepAlive: true, |
| | |
| | | }, |
| | | ], |
| | | } |
| | | ], |
| | | }, |
| | | ]; |
| | | |
| | | const router = new VueRouter({ |