From 4ca375b2e3dae98d6ececc1b7b421a12f3fa8a26 Mon Sep 17 00:00:00 2001
From: 董国庆 <364620639@qq.com>
Date: 星期二, 01 七月 2025 09:00:38 +0800
Subject: [PATCH] 修改bug,验收通过

---
 laboratory/src/views/middleground/index.vue |  194 +++++++++++++++++++++++++++++++++++-------------
 1 files changed, 142 insertions(+), 52 deletions(-)

diff --git a/laboratory/src/views/middleground/index.vue b/laboratory/src/views/middleground/index.vue
index 10a947a..0c42bab 100644
--- a/laboratory/src/views/middleground/index.vue
+++ b/laboratory/src/views/middleground/index.vue
@@ -4,23 +4,36 @@
       <HeaderNav class="header-main" :logo="'true'" />
     </div>
 
-    <div class="middleground" :class="{
-      column: windowWidth < 1440,
-      mobile: windowWidth < 800,
-    }">
+    <div
+      class="middleground"
+      :class="{
+        column: windowWidth < 1440,
+        mobile: windowWidth < 800,
+      }"
+    >
       <!-- 左侧模块区域 -->
-      <div class="left-modules" :class="[
-        currentModuleLayout,
-        {
-          'mobile-layout': windowWidth < 800,
-        },
-      ]">
-        <div class="module-item" v-for="(item, index) in filteredModuleList" :key="index"
-          @click="handleModuleClick(item)">
+      <div
+        class="left-modules"
+        :class="[
+          currentModuleLayout,
+          {
+            'mobile-layout': windowWidth < 800,
+          },
+        ]"
+      >
+        <div
+          class="module-item"
+          v-for="(item, index) in filteredModuleList"
+          :key="index"
+          @click="handleModuleClick(item)"
+        >
           <div class="module-bg"></div>
           <div class="module-content">
             <div class="icon-wrapper">
-              <div class="module-icon" :style="{ backgroundImage: `url(${item.icon})` }"></div>
+              <div
+                class="module-icon"
+                :style="{ backgroundImage: `url(${item.icon})` }"
+              ></div>
             </div>
             <div class="module-text">{{ item.text }}</div>
           </div>
@@ -40,20 +53,29 @@
           <div class="title">待办事项</div>
           <!-- 待办事项列表将放置在这里 -->
           <div class="todo-list">
-            <div class="todo-item" v-for="(item,index) in list" :key="index" @click.stop="toDetail(item)">
+            <div
+              class="todo-item"
+              v-for="(item, index) in list"
+              :key="index"
+              @click.stop="toDetail(item)"
+            >
               <div class="todo-details">
                 <div class="notice-card">
                   <div class="todo-icon"></div>
-                  <div class="red-notice" v-if="item.isRead==0"></div>
+                  <div class="red-notice" v-if="item.isRead == 0"></div>
                 </div>
 
-                <span class="todo-title" :title="item.content || ''">{{item.content||''}}</span>
+                <span class="todo-title" :title="item.content || ''">{{
+                  item.content || ""
+                }}</span>
               </div>
               <div class="todo-meta">
                 <div class="me"></div>
-                <span class="todo-submitter">提交人: {{item.commitName||''}}</span>
+                <span class="todo-submitter"
+                  >提交人: {{ item.commitName || "" }}</span
+                >
                 <div class="time"></div>
-                <span class="todo-submitter">{{item.commitTime||''}}</span>
+                <span class="todo-submitter">{{ item.commitTime || "" }}</span>
               </div>
             </div>
           </div>
@@ -64,7 +86,7 @@
 </template>
 <script>
 import { Calendar } from "ant-design-vue";
-import { getList,read } from "./service";
+import { getList, read } from "./service";
 import HeaderNav from "../../layouts/components/HeaderNav.vue";
 import zhCN from "ant-design-vue/lib/locale-provider/zh_CN";
 // 引入 Element UI 的日历组件
@@ -88,7 +110,7 @@
       date: new Date(),
       viewWidth: "",
       scale: 1,
-      list:[],
+      list: [],
       // 审批人
       moduleList2: [
         {
@@ -102,7 +124,7 @@
           path: "/reportLibrary/feasibilityStudy",
         },
         {
-          text: "化验师提交",
+          text: "化验师QA专题报告",
           icon: require("../../assets/login/img7.png"),
           path: "/chemistQa/projectTesting",
         },
@@ -153,7 +175,7 @@
         //   path: "/reportLibrary/feasibilityStudy",
         // },
         {
-          text: "化验师提交",
+          text: "化验师QA专题报告",
           icon: require("../../assets/login/img7.png"),
           path: "/chemistQa/projectTesting",
         },
@@ -171,9 +193,9 @@
         //   path: "/projectList/list",
         // },
         {
-          text: '评定模块',
-          icon: require('../../assets/login/img4.png'),
-          path: '/deliveryAssessment/projectTeamIntegral'
+          text: "评定模块",
+          icon: require("../../assets/login/img4.png"),
+          path: "/deliveryAssessment/projectTeamIntegral",
         },
         // {
         //   text: "专业报告库",
@@ -185,7 +207,6 @@
         //   icon: require("../../assets/login/img3.png"),
         //   path: "/chemistQa/projectTesting",
         // },
-
       ],
       // 超级管理员
       moduleList6: [
@@ -226,10 +247,9 @@
   created() {
     // 初始化时检查窗口大小
     this.handleResize();
-    getList().then(res=>{
-      this.list = res
-
-    })
+    getList().then((res) => {
+      this.list = res;
+    });
   },
   mounted() {
     // 监听窗口大小变化
@@ -240,8 +260,7 @@
     window.removeEventListener("resize", this.handleResize);
   },
   methods: {
-    onPanelChange(e) {
-    },
+    onPanelChange(e) {},
     // 添加处理窗口大小变化的方法
     handleResize() {
       this.windowWidth = window.innerWidth;
@@ -253,21 +272,87 @@
         });
       }
     },
-    toDetail(item){
-      read({id:item.id}).then(res=>{
-        let urlList=['/dataManagement/approvalPlan','/dataManagement/suspendExperiment','/dataManagement/testResultReport'
-          ,'/reportLibrary/feasibilityStudy','/deliveryAssessment/reportEvaluation','/dataManagement/confirmation-sheet',
-          '/dataManagement/inspectionReport','/dataManagement/scheme-management','/chemistQa/projectTesting',
-          '/deliveryAssessment/reportEvaluation','/dataManagement/dispatching','/dataManagement/confirmation-sheet',
-          '/sampleManage/manage','/dataManagement/dispatching'
-        ]
-        let url=urlList[(item.noticeType *1) -1]
+    toDetail(item) {
+      read({ id: item.id }).then((res) => {
+        if (item.noticeType == 4) {
+          if (item.content.includes("可研")) {
+            this.$router.push({
+              path: "/reportLibrary/feasibilityStudy",
+            });
+          } else if (item.content.includes("可行")) {
+            this.$router.push({
+              path: "/reportLibrary/feasibilityReport",
+            });
+          } else if (item.content.includes("工艺开发")) {
+            this.$router.push({
+              path: "/reportLibrary/processDevelopment",
+            });
+          } else if (item.content.includes("验证与发布")) {
+            this.$router.push({
+              path: "/reportLibrary/verificationRelease",
+            });
+          } else if (item.content.includes("立项报告库")) {
+            this.$router.push({
+              path: "/reportLibrary/projectProposalLibrary",
+            });
+          }
+          return;
+        }
+        if (item.noticeType == 9) {
+          if (item.content.includes("项目检测项")) {
+            this.$router.push({
+              path: "/chemistQa/projectTesting",
+            });
+          } else if (item.content.includes("中试")) {
+            this.$router.push({
+              path: "/chemistQa/pilotAndProduction",
+            });
+          } else if (item.content.includes("辅料")) {
+            this.$router.push({
+              path: "/chemistQa/rawMaterials",
+            });
+          } else if (item.content.includes("产品报批")) {
+            this.$router.push({
+              path: "/chemistQa/productApproval",
+            });
+          } 
+          return;
+        }
+        if (item.noticeType == 10) {
+          if (item.content.includes("项目检测项")) {
+            this.$router.push({
+              path: "/deliveryAssessment/testingAndEvaluation",
+            });
+          } else{
+            this.$router.push({
+              path: "/deliveryAssessment/assayTaskList",
+            });
+          }
+          return;
+        }
+        let urlList = [
+          "/dataManagement/approvalPlan",
+          "/dataManagement/suspendExperiment",
+          "/dataManagement/testResultReport",
+          "/reportLibrary/feasibilityStudy",
+          "/deliveryAssessment/reportEvaluation",
+          "/dataManagement/confirmation-sheet",
+          "/dataManagement/testResultReport",
+          "/dataManagement/scheme-management",
+          "/chemistQa/projectTesting",
+          "/deliveryAssessment/reportEvaluation",
+          "/dataManagement/dispatching",
+          "/dataManagement/confirmation-sheet",
+          "/sampleManage/manage",
+          "/dataManagement/dispatching",
+        ];
+        let url = urlList[item.noticeType - 1];
+        console.log("url url", url, "item.noticeType-1", item.noticeType - 1);
         this.$router.push({
           path: url,
         });
-      })
-
-    }
+      });
+    },
   },
   computed: {
     currentModuleList() {
@@ -492,9 +577,11 @@
         top: 0;
         width: 100%;
         height: 40px;
-        background: linear-gradient(to bottom,
-            rgba(255, 255, 255, 0.3) 0%,
-            rgba(255, 255, 255, 0) 100%);
+        background: linear-gradient(
+          to bottom,
+          rgba(255, 255, 255, 0.3) 0%,
+          rgba(255, 255, 255, 0) 100%
+        );
         backdrop-filter: blur(4px);
         -webkit-backdrop-filter: blur(4px);
         pointer-events: none;
@@ -508,9 +595,11 @@
         bottom: 0;
         width: 100%;
         height: 40px;
-        background: linear-gradient(to bottom,
-            rgba(255, 255, 255, 0) 0%,
-            rgba(255, 255, 255, 0.8) 100%);
+        background: linear-gradient(
+          to bottom,
+          rgba(255, 255, 255, 0) 0%,
+          rgba(255, 255, 255, 0.8) 100%
+        );
         backdrop-filter: blur(4px);
         -webkit-backdrop-filter: blur(4px);
         pointer-events: none;
@@ -922,7 +1011,8 @@
             }
 
             &.ant-fullcalendar-next-month-btn-day {
-              .ant-fullcalendar-date {}
+              .ant-fullcalendar-date {
+              }
 
               .ant-fullcalendar-value {
                 color: #ffffff !important;
@@ -1058,7 +1148,7 @@
           display: flex;
           align-items: center;
           justify-content: space-between;
-          min-width:260px;
+          min-width: 260px;
         }
 
         .time {

--
Gitblit v1.7.1