| | |
| | | } |
| | | */ |
| | | |
| | | const routes = [{ |
| | | const routes = [ |
| | | { |
| | | path: "/", |
| | | redirect: "/projectList/list", |
| | | redirect: "/login", |
| | | }, |
| | | { |
| | | path: "/login", |
| | |
| | | title: "项目组管理", |
| | | }, |
| | | component: Layouts, |
| | | children: [{ |
| | | children: [ |
| | | { |
| | | path: "list", |
| | | name: "ProjectList", |
| | | meta: { |
| | | title: "项目组管理", |
| | | title: "菌种库项目组管理", |
| | | }, |
| | | component: () => import("../views/projectList"), |
| | | }, |
| | |
| | | path: "addProject", |
| | | name: "AddProject", |
| | | meta: { |
| | | title: "新增项目组", |
| | | title: "新增菌种库项目组", |
| | | hide: true, |
| | | keepAlive: true, |
| | | }, |
| | |
| | | title: "系统管理", |
| | | }, |
| | | component: Layouts, |
| | | children: [{ |
| | | children: [ |
| | | { |
| | | path: "user", |
| | | name: "User", |
| | | meta: { |
| | |
| | | meta: { |
| | | title: "菌种库", |
| | | }, |
| | | children: [{ |
| | | children: [ |
| | | { |
| | | path: "/strain-library", |
| | | component: Parent, |
| | | meta: { |
| | | title: "菌种库管理", |
| | | }, |
| | | children: [{ |
| | | children: [ |
| | | { |
| | | path: "strain-library-manage", |
| | | name: "StrainLibraryManage", |
| | | meta: { |
| | |
| | | title: "菌种传代生产谱系图", |
| | | }, |
| | | component: () => import("../views/pedigree-chart"), |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | { |
| | | path: "/dataManagement", |
| | | component: Layouts, |
| | | meta: { |
| | | title: "实验室数据管理", |
| | | }, |
| | | children: [{ |
| | | path: "approvalPlan", |
| | | meta: { |
| | | title: "项目课题方案审批", |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/dataManagement/approvalPlan/list.vue"), |
| | | }, |
| | | { |
| | | path: "addPlan", |
| | | name: "addPlan", |
| | | path: 'add-pedigree', |
| | | name: 'AddPedigree', |
| | | meta: { |
| | | title: "新增项目课题方案", |
| | | title: "新增母代菌种传代生产谱系图", |
| | | hide: true |
| | | }, |
| | | component: () => import("../views/pedigree-chart/add"), |
| | | }, |
| | | { |
| | | path: 'add-progenitor', |
| | | name: 'AddProgenitor', |
| | | meta: { |
| | | title: "新增祖代菌种传代生产谱系图", |
| | | hide: true |
| | | }, |
| | | component: () => import("../views/pedigree-chart/addProgenitor"), |
| | | }, |
| | | // { |
| | | // path: "strain-flow-chart", |
| | | // name: "StrainFlowChart", |
| | | // meta: { |
| | | // title: "菌种传代产生流程图", |
| | | // keepAlive: true, |
| | | // }, |
| | | // component: () => import("../views/strain-library/strain-flow-chart"), |
| | | // }, |
| | | { |
| | | path: 'breeding-record', |
| | | name: 'BreedingRecord', |
| | | meta: { |
| | | title: "菌种选育保藏记录", |
| | | }, |
| | | component: () => import("../views/strain-library/breeding-record"), |
| | | }, |
| | | { |
| | | path: 'add-breeding-record', |
| | | name: 'AddBreedingRecord', |
| | | meta: { |
| | | title: "新增菌种选育保藏记录", |
| | | hide: true, |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/dataManagement/approvalPlan/addPlan"), |
| | | component: () => import("../views/strain-library/breeding-record/add"), |
| | | }, |
| | | { |
| | | path: "dispatching", |
| | | path: 'validation', |
| | | meta: { |
| | | title: "实验调度管理", |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/dataManagement/dispatching/list.vue"), |
| | | }, |
| | | { |
| | | path: "addDispatch", |
| | | meta: { |
| | | title: "新增实验调度", |
| | | hide: true, |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/dataManagement/dispatching/addDispatch"), |
| | | }, |
| | | { |
| | | path: "confirmation-sheet", |
| | | name: "ConfirmationSheet", |
| | | meta: { |
| | | title: "检验方法确认单", |
| | | }, |
| | | component: () => import("../views/dataManagement/confirmation-sheet"), |
| | | }, |
| | | { |
| | | path: "confirmation-sheet/add", |
| | | name: "AddConfirmationSheet", |
| | | meta: { |
| | | title: "检验方法确认单", |
| | | }, |
| | | component: () => import("../views/dataManagement/confirmation-sheet/components/add.vue"), |
| | | }, |
| | | { |
| | | path: "/sampleManage", |
| | | meta: { |
| | | title: "样品管理", |
| | | // keepAlive: true, |
| | | title: "菌种验证数据资料", |
| | | }, |
| | | component: Parent, |
| | | children: [{ |
| | | path: "manage", |
| | | children: [ |
| | | { |
| | | path: 'primitive-cell', |
| | | name: 'PrimitiveCell', |
| | | meta: { |
| | | title: "样品管理", |
| | | keepAlive: true, |
| | | title: '原始细胞库资料', |
| | | }, |
| | | component: () => import("../views/dataManagement/sampleManage/list.vue"), |
| | | component: () => import("../views/strain-library/validation/primitive-cell/index.vue") |
| | | }, |
| | | { |
| | | path: "addSample", |
| | | name: "addPaddSamplelan", |
| | | path: 'add-primitive-cell', |
| | | name: 'AddPrimitiveCell', |
| | | meta: { |
| | | title: "新增样品", |
| | | hide: true, |
| | | keepAlive: true, |
| | | title: '新增原始细胞库资料', |
| | | hide: true |
| | | }, |
| | | component: () => import("../views/dataManagement/sampleManage/addSample"), |
| | | }, { |
| | | path: "record", |
| | | meta: { |
| | | title: "取样操作记录列表", |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/dataManagement/sampleRecordList/list.vue"), |
| | | component: () => import("../views/strain-library/validation/primitive-cell/add.vue") |
| | | }, |
| | | { |
| | | path: "changeRecord", |
| | | name: "changeRecord", |
| | | path: 'confirm-detail', |
| | | name: 'ConfirmDetail', |
| | | meta: { |
| | | title: "填写取样操作记录", |
| | | hide: true, |
| | | keepAlive: true, |
| | | title: '确认原始细胞库资料', |
| | | hide: true |
| | | }, |
| | | component: () => import("../views/dataManagement/sampleRecordList/changeRecord"), |
| | | }, { |
| | | path: "submissionList", |
| | | meta: { |
| | | title: "送样单列表", |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/dataManagement/sampleSubmissionList/list.vue"), |
| | | component: () => import("../views/strain-library/validation/primitive-cell/confirm-detail.vue") |
| | | }, |
| | | { |
| | | path: "submission", |
| | | name: "submission", |
| | | path: 'chief-cell', |
| | | name: 'ChiefCell', |
| | | meta: { |
| | | title: "送样单详情", |
| | | hide: true, |
| | | keepAlive: true, |
| | | title: '主细胞库资料' |
| | | }, |
| | | component: () => import("../views/dataManagement/sampleSubmissionList/submission"), |
| | | }, |
| | | component: () => import("../views/strain-library/validation/chief-cell") |
| | | } |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | path: "deliveryRecord", |
| | | meta: { |
| | | title: "取样送样记录", |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/dataManagement/SampleDeliveryRecord/list.vue"), |
| | | }, |
| | | { |
| | | path: "delivery", |
| | | name: "delivery", |
| | | meta: { |
| | | title: "送样详情", |
| | | hide: true, |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/dataManagement/SampleDeliveryRecord/deliveryRecord"), |
| | | }, |
| | | { |
| | | path: "originalRecordTest", |
| | | meta: { |
| | | title: "原始检验记录", |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/dataManagement/originalRecordTest/list.vue"), |
| | | }, |
| | | { |
| | | path: "originalRecordTest/detail", |
| | | name: "OriginalRecordTestDetail", |
| | | meta: { |
| | | title: "原始检验记录详情", |
| | | hide: true, |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/dataManagement/originalRecordTest/detail.vue"), |
| | | }, |
| | | { |
| | | path: "inspectionReport", |
| | | meta: { |
| | | title: "检验报告管理", |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/dataManagement/inspectionReport/list.vue"), |
| | | }, |
| | | { |
| | | path: "inspectionReport/detail", |
| | | name: "inspectionReportDetail", |
| | | meta: { |
| | | title: "检验报告详情", |
| | | hide: true, |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/dataManagement/inspectionReport/detail.vue"), |
| | | }, |
| | | { |
| | | path: "testResultReport", |
| | | meta: { |
| | | title: "实验结果汇报", |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/dataManagement/testResultReport/list.vue"), |
| | | }, |
| | | { |
| | | path: "testResultReport/detail", |
| | | name: "testResultReportDetail", |
| | | meta: { |
| | | title: "实验结果详情", |
| | | hide: true, |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/dataManagement/testResultReport/detail.vue"), |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: "/reportLibrary", |
| | | component: Layouts, |
| | | meta: { |
| | | title: "专业报告库审批", |
| | | }, |
| | | children: [{ |
| | | path: "feasibilityStudy", |
| | | meta: { |
| | | title: "可研报告库", |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/reportLibrary/feasibilityStudy/index.vue"), |
| | | }, |
| | | { |
| | | path: "add", |
| | | meta: { |
| | | title: "新增可行报告", |
| | | hide: true, |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/reportLibrary/feasibilityStudy/add.vue"), |
| | | }, |
| | | { |
| | | path: "feasibilityReport", |
| | | meta: { |
| | | title: "可行报告库", |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/reportLibrary/feasibilityReport/index.vue"), |
| | | }, |
| | | { |
| | | path: "processDevelopment", |
| | | meta: { |
| | | title: "工艺开发工具", |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/reportLibrary/processDevelopment/index.vue"), |
| | | }, |
| | | { |
| | | path: "verificationRelease", |
| | | meta: { |
| | | title: "验证与发布", |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/reportLibrary/verificationRelease/index.vue"), |
| | | }, |
| | | { |
| | | path: "projectProposalLibrary", |
| | | meta: { |
| | | title: "立项报告库", |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/reportLibrary/projectProposalLibrary/index.vue"), |
| | | }, |
| | | ], |
| | | ] |
| | | }, { |
| | | path: "/strainReportLibrary", |
| | | component: Layouts, |
| | |
| | | title: "菌种报告库", |
| | | }, |
| | | children: [{ |
| | | path: "reportLibraryOne", |
| | | meta: { |
| | | title: "报告库一", |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/strainReportLibrary/reportLibraryOne/index.vue"), |
| | | path: "reportLibraryOne", |
| | | meta: { |
| | | title: "报告库一", |
| | | keepAlive: true, |
| | | }, |
| | | { |
| | | path: "add", |
| | | meta: { |
| | | title: "新增报告", |
| | | hide: true, |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/strainReportLibrary/reportLibraryOne/add.vue"), |
| | | component: () => import("../views/strainReportLibrary/reportLibraryOne/index.vue"), |
| | | }, |
| | | { |
| | | path: "add", |
| | | meta: { |
| | | title: "新增报告", |
| | | hide: true, |
| | | keepAlive: true, |
| | | }, |
| | | { |
| | | path: "reportLibraryTwo", |
| | | meta: { |
| | | title: "报告库二", |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/strainReportLibrary/reportLibraryOneTWO/index.vue"), |
| | | component: () => import("../views/strainReportLibrary/reportLibraryOne/add.vue"), |
| | | }, |
| | | { |
| | | path: "reportLibraryTwo", |
| | | meta: { |
| | | title: "报告库二", |
| | | keepAlive: true, |
| | | }, |
| | | { |
| | | path: "addTwo", |
| | | meta: { |
| | | title: "新增报告", |
| | | hide: true, |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/strainReportLibrary/reportLibraryOneTWO/add.vue"), |
| | | component: () => import("../views/strainReportLibrary/reportLibraryOneTWO/index.vue"), |
| | | }, |
| | | { |
| | | path: "addTwo", |
| | | meta: { |
| | | title: "新增报告", |
| | | hide: true, |
| | | keepAlive: true, |
| | | }, |
| | | { |
| | | path: "reportLibraryThree", |
| | | meta: { |
| | | title: "报告库三", |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/strainReportLibrary/reportLibraryOneThree/index.vue"), |
| | | component: () => import("../views/strainReportLibrary/reportLibraryOneTWO/add.vue"), |
| | | }, |
| | | { |
| | | path: "reportLibraryThree", |
| | | meta: { |
| | | title: "报告库三", |
| | | keepAlive: true, |
| | | }, |
| | | { |
| | | path: "addThree", |
| | | meta: { |
| | | title: "新增报告", |
| | | hide: true, |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/strainReportLibrary/reportLibraryOneThree/add.vue"), |
| | | component: () => import("../views/strainReportLibrary/reportLibraryOneThree/index.vue"), |
| | | }, |
| | | { |
| | | path: "addThree", |
| | | meta: { |
| | | title: "新增报告", |
| | | hide: true, |
| | | keepAlive: true, |
| | | }, |
| | | { |
| | | path: "reportLibraryFour", |
| | | meta: { |
| | | title: "报告库四", |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/strainReportLibrary/reportLibraryOneFour/index.vue"), |
| | | component: () => import("../views/strainReportLibrary/reportLibraryOneThree/add.vue"), |
| | | }, |
| | | { |
| | | path: "reportLibraryFour", |
| | | meta: { |
| | | title: "报告库四", |
| | | keepAlive: true, |
| | | }, |
| | | { |
| | | path: "addFour", |
| | | meta: { |
| | | title: "新增报告", |
| | | hide: true, |
| | | keepAlive: true, |
| | | }, |
| | | component: () => import("../views/strainReportLibrary/reportLibraryOneFour/add.vue"), |
| | | component: () => import("../views/strainReportLibrary/reportLibraryOneFour/index.vue"), |
| | | }, |
| | | { |
| | | path: "addFour", |
| | | meta: { |
| | | title: "新增报告", |
| | | hide: true, |
| | | keepAlive: true, |
| | | }, |
| | | |
| | | component: () => import("../views/strainReportLibrary/reportLibraryOneFour/add.vue"), |
| | | }, |
| | | |
| | | ], |
| | | }, |
| | | { |
| | |
| | | title: "菌种报告评定", |
| | | }, |
| | | children: [{ |
| | | path: "projectTeamIntegral", |
| | | meta: { |
| | | title: "菌种项目组评定表", |
| | | }, |
| | | component: () => import("../views/deliveryAssessment/projectTeamIntegral"), |
| | | path: "projectTeamIntegral", |
| | | meta: { |
| | | title: "菌种项目组评定表", |
| | | }, |
| | | { |
| | | path: "projectTeamIntegral-detail", |
| | | meta: { |
| | | title: "评定详情", |
| | | hide: true |
| | | }, |
| | | component: () => import("../views/deliveryAssessment/projectTeamIntegral/detail.vue"), |
| | | component: () => import("../views/deliveryAssessment/projectTeamIntegral"), |
| | | }, |
| | | { |
| | | path: "projectTeamIntegral-detail", |
| | | meta: { |
| | | title: "评定详情", |
| | | hide: true |
| | | }, |
| | | component: () => import("../views/deliveryAssessment/projectTeamIntegral/detail.vue"), |
| | | }, |
| | | ] |
| | | } |
| | | ]; |
| | |
| | | document.title = to.meta.title || '实验室流程'; |
| | | |
| | | // 登录验证 |
| | | // 排除登录页的校验 |
| | | // if (to.path === "/login") { |
| | | // sessionStorage.removeItem('userInfo') |
| | | // next() |
| | | // } else if (!sessionStorage.getItem('userInfo')) { |
| | | // next('/login') |
| | | // } else { |
| | | // // 判断是否拥有要跳转菜单权限 |
| | | // let menus = store.state.menus |
| | | // if (to.meta.hasOwnProperty('privilege') && !menus.includes(to.meta.privilege)) { |
| | | // return |
| | | // if (sessionStorage.getItem('token')) { |
| | | // next('/projectList'); // 已登录状态访问登录页时重定向到系统首页 |
| | | // return; |
| | | // } |
| | | // next(); |
| | | // return; |
| | | // } |
| | | |
| | | // // 登录状态校验 |
| | | // const isAuthenticated = sessionStorage.getItem('token'); |
| | | // if (!isAuthenticated) { |
| | | // next('/login'); // 未登录用户重定向到登录页 |
| | | // return; |
| | | // } |
| | | |
| | | // 判断是否拥有要跳转菜单权限 |
| | | let menus = store.state.menus |
| | | if (to.meta.hasOwnProperty('privilege') && !menus.includes(to.meta.privilege)) { |
| | | return |
| | | } |
| | | |
| | | // 设置标签列表 |
| | | if (!to.meta.hide || !to.meta.oneself) { |
| | |
| | | const tagInfo = { |
| | | path: to.path, |
| | | name: to.name, |
| | | meta: to.meta |
| | | meta: to.meta, |
| | | query: to.query, |
| | | } |
| | | tagList.push(tagInfo) |
| | | sessionStorage.setItem('tagList', JSON.stringify(tagList)) |
| | |
| | | } |
| | | |
| | | next() |
| | | // } |
| | | }); |
| | | |
| | | export default router; |
| | | export default router; |