From e950c38ba82e5e6bc8b0c50c35e5dbb6a180165a Mon Sep 17 00:00:00 2001
From: 13404089107 <puwei@sinata.cn>
Date: 星期二, 20 五月 2025 16:43:06 +0800
Subject: [PATCH] Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/leshan-laboratory

---
 laboratory/src/router/index.js |  251 ++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 233 insertions(+), 18 deletions(-)

diff --git a/laboratory/src/router/index.js b/laboratory/src/router/index.js
index 3fa02bd..d68bd14 100644
--- a/laboratory/src/router/index.js
+++ b/laboratory/src/router/index.js
@@ -26,7 +26,7 @@
 const routes = [
     {
         path: "/",
-        redirect: "/projectList/list",
+        redirect: "/login",
     },
     {
         path: "/login",
@@ -120,6 +120,24 @@
                     keepAlive: true,
                 },
                 component: () => import("../views/projectList/addProject"),
+            },
+            {
+                path: "editProject",
+                name: "EditProject",
+                meta: {
+                    title: "编辑项目组",
+                    hide: true,
+                },
+                component: () => import("../views/projectList/editProject"),
+            },
+            {
+                path: "detailProject",
+                name: "DetailProject",
+                meta: {
+                    title: "项目组详情",
+                    hide: true,
+                },
+                component: () => import("../views/projectList/detailProject"),
             }
         ]
     },
@@ -342,6 +360,14 @@
                 },
                 component: () => import("../views/dataManagement/testResultReport/detail.vue"),
             },
+            {
+                path: "suspendExperiment",
+                meta: {
+                    title: "实验中止审批",
+                    keepAlive: true,
+                },
+                component: () => import("../views/dataManagement/suspendExperiment/list.vue"),
+            },
         ],
     },
     {
@@ -362,12 +388,22 @@
             {
                 path: "add",
                 meta: {
-                    title: "新增可行报告",
+                    title: "新增可研报告",
                     hide: true,
                     keepAlive: true,
                 },
                 component: () => import("../views/reportLibrary/feasibilityStudy/add.vue"),
             },
+            {
+                path: "edit",
+                meta: {
+                    title: "编辑可研报告",
+                    hide: true,
+                    keepAlive: true,
+                },
+                component: () => import("../views/reportLibrary/feasibilityStudy/add.vue"),
+            },
+
             {
                 path: "feasibilityReport",
                 meta: {
@@ -377,6 +413,26 @@
                 component: () => import("../views/reportLibrary/feasibilityReport/index.vue"),
             },
             {
+                path: "addFeasibility",
+                meta: {
+                    title: "新增可行报告",
+                    hide: true,
+                    keepAlive: true,
+                },
+                component: () => import("../views/reportLibrary/feasibilityReport/add.vue"),
+            },
+            {
+                path: "editFeasibility",
+                meta: {
+                    title: "编辑可行报告",
+                    hide: true,
+                    keepAlive: true,
+                },
+                component: () => import("../views/reportLibrary/feasibilityReport/add.vue"),
+            },
+
+
+            {
                 path: "processDevelopment",
                 meta: {
                     title: "工艺开发工具",
@@ -384,6 +440,28 @@
                 },
                 component: () => import("../views/reportLibrary/processDevelopment/index.vue"),
             },
+
+            {
+                path: "addProcessDevelopment",
+                meta: {
+                    title: "新增工艺开发工具",
+                    hide: true,
+                    keepAlive: true,
+                },
+                component: () => import("../views/reportLibrary/processDevelopment/add.vue"),
+            },
+            {
+                path: "editProcessDevelopment",
+                meta: {
+                    title: "编辑工艺开发工具",
+                    hide: true,
+                    keepAlive: true,
+                },
+                component: () => import("../views/reportLibrary/processDevelopment/add.vue"),
+            },
+
+            
+
             {
                 path: "verificationRelease",
                 meta: {
@@ -399,6 +477,92 @@
                     keepAlive: true,
                 },
                 component: () => import("../views/reportLibrary/projectProposalLibrary/index.vue"),
+            },
+        ],
+    },
+    {
+        path: "/chemistQa",
+        component: Layouts,
+        meta: {
+            title: "化验师QA专题报告",
+        },
+        children: [
+            {
+                path: "projectTesting",
+                meta: {
+                    title: "项目检测项、检验包列表",
+                    keepAlive: true,
+                },
+                component: () => import("../views/chemistQa/projectTesting/index.vue"),
+            },
+            {
+                path: "add",
+                meta: {
+                    title: "新增检测项",
+                    hide: true,
+                    keepAlive: true,
+                },
+                component: () => import("../views/chemistQa/projectTesting/add.vue"),
+            },
+            {
+                path: "addDetectionReport",
+                meta: {
+                    title: "新增报告",
+                    hide: true,
+                    keepAlive: true,
+                },
+                component: () => import("../views/chemistQa/projectTesting/addDetectionReport.vue"),
+            },
+            {
+                path: "pilotAndProduction",
+                meta: {
+                    title: "中试、生产验证试验检验分析报告",
+                    keepAlive: true,
+                },
+                component: () => import("../views/chemistQa/pilotAndProduction/index.vue"),
+            },
+            {
+                path: "addPilot",
+                meta: {
+                    title: "新增中试、生产验证试验检验分析报告",
+                    hide: true,
+                    keepAlive: true,
+                },
+                component: () => import("../views/chemistQa/pilotAndProduction/add.vue"),
+            },
+            {
+                path: "rawMaterials",
+                meta: {
+                    title: "原辅料、包材、竞品检验分析报告",
+                    keepAlive: true,
+                },
+                component: () => import("../views/chemistQa/rawMaterials/index.vue"),
+            },
+            {
+                path: "addRawMaterials",
+                meta: {
+                    title: "新增原辅料、包材、竞品检验分析报告",
+                    hide: true,
+                    keepAlive: true,
+                },
+                component: () => import("../views/chemistQa/rawMaterials/add.vue"),
+            },
+            {
+                path: "productApproval",
+                meta: {
+                    title: "产品报批及项目工作总计报告",
+                    keepAlive: true,
+                },
+                component: () => import("../views/chemistQa/productApproval/index.vue"),
+            },
+            {
+                path: "addProductApproval",
+                meta: {
+                    title: "新增产品报批及项目工作总计报告",
+                    hide: true,
+                    keepAlive: true,
+                },
+                component: () => import("../views/chemistQa/productApproval/add.vue"),
             },
         ],
     },
@@ -441,7 +605,7 @@
                 component: () => import("../views/deliveryAssessment/restsTask"),
             },
             {
-                // 超级管理员 工艺工程师
+                // 超级管理员 工艺工程师 审批人
                 path: "clinicalTrial",
                 meta: {
                     title: "临床试验积分列表",
@@ -449,7 +613,7 @@
                 component: () => import("../views/deliveryAssessment/clinicalTrial"),
             },
             {
-                // 化验师 审批人
+                // 化验师 审批人 工艺工程师
                 path: "testingAndEvaluation",
                 meta: {
                     title: "检测项评定列表",
@@ -473,7 +637,7 @@
                 component: () => import("../views/deliveryAssessment/assayTaskList"),
             },
             {
-                // 工艺工程师
+                // 工艺工程师 审批人
                 path: "processEngineerEvaluate",
                 meta: {
                     title: "工艺工程师工作评定详情",
@@ -518,6 +682,46 @@
                 },
                 component: () => import("../views/deliveryAssessment/chemistEvaluate/add"),
             },
+            {
+                // 工艺工程师
+                path: "QAList",
+                name: 'QAList',
+                meta: {
+                    title: "化验师QA专题报告评定",
+                    keepAlive: true,
+                },
+                component: () => import("../views/deliveryAssessment/QA"),
+            },
+            {
+                // 审批人
+                path: "experimenterJobEvaluation",
+                name: 'ExperimenterJobEvaluation',
+                meta: {
+                    title: "实验员工作评定详情",
+                    keepAlive: true,
+                },
+                component: () => import("../views/deliveryAssessment/experimenterJobEvaluation"),
+            },
+            {
+                // 审批人
+                path: "technicianJobEvaluation",
+                name: 'TechnicianJobEvaluation',
+                meta: {
+                    title: "化验师工作评定详情",
+                    keepAlive: true,
+                },
+                component: () => import("../views/deliveryAssessment/technicianJobEvaluation"),
+            },
+            {
+                // 审批人
+                path: "reportEvaluation",
+                name: 'ReportEvaluation',
+                meta: {
+                    title: "专业报告库评定",
+                    keepAlive: true,
+                },
+                component: () => import("../views/deliveryAssessment/reportEvaluation"),
+            },
         ]
     }
 ];
@@ -534,17 +738,28 @@
     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 (to.path === "/login") {
+        if (sessionStorage.getItem('token')) {
+            next('/system');  // 已登录状态访问登录页时重定向到系统首页
+            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) {
@@ -556,7 +771,8 @@
             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))
@@ -577,7 +793,6 @@
     }
 
     next()
-    // }
 });
 
 export default router;

--
Gitblit v1.7.1