From fa60bfa07970c192c85a437e7db784eccdae2839 Mon Sep 17 00:00:00 2001
From: 董国庆 <364620639@qq.com>
Date: 星期一, 16 六月 2025 20:04:15 +0800
Subject: [PATCH] 修改bug

---
 laboratory/src/views/dataManagement/dispatching/list.vue |   32 ++++++++++++++++++++++++--------
 1 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/laboratory/src/views/dataManagement/dispatching/list.vue b/laboratory/src/views/dataManagement/dispatching/list.vue
index 34edc48..815ea10 100644
--- a/laboratory/src/views/dataManagement/dispatching/list.vue
+++ b/laboratory/src/views/dataManagement/dispatching/list.vue
@@ -110,12 +110,18 @@
           <template slot-scope="scope">
             <!-- 工艺工程师(3) -->
             <template v-if="userRole == '3'">
-              <el-button type="text" @click="handleDetail(scope.row)">详情</el-button>
-              <el-button 
-                v-if="scope.row.status == 1" 
-                type="text" 
-                @click="handleDelete(scope.row)"
-              >删除</el-button>
+              <template v-if="currentType === 'draft'">
+                <el-button type="text" @click="handleEdit(scope.row)">编辑</el-button>
+                <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
+              </template>
+              <template v-else>
+                <el-button type="text" @click="handleDetail(scope.row)">详情</el-button>
+                <el-button 
+                  v-if="scope.row.status == 1" 
+                  type="text" 
+                  @click="handleDelete(scope.row)"
+                >删除</el-button>
+              </template>
             </template>
             
             <!-- 化验师(4)和实验员(5) -->
@@ -241,6 +247,15 @@
         path: "/dataManagement/addDispatch",
       });
     },
+    handleEdit(row) {
+      this.$router.push({
+        path: "/dataManagement/addDispatch",
+        query: {
+          id: row.id,
+          type: 'edit'
+        }
+      });
+    },
     handleConfirm(row) {
       this.currentApprovalData = row;
       this.approvalDialogType = "approve";
@@ -325,7 +340,7 @@
     border-radius: 8px 8px 0px 0px;
     border: 1px solid #dcdfe6;
     padding: 16px 29px;
-    font-weight: bold;
+    // font-weight: bold;
     font-size: 18px;
     color: #606266;
     width: unset;
@@ -336,7 +351,7 @@
     background: #fafafc;
     border-radius: 8px 8px 0px 0px;
     border: 1px solid #dcdfe6;
-    font-weight: 400;
+    // font-weight: 400;
     font-size: 18px;
     color: #606266;
     margin-left: 16px;
@@ -347,6 +362,7 @@
     background: #ffffff;
     border-radius: 8px 8px 0px 0px;
     border: 1px solid #049c9a;
+    font-weight: bold
   }
 }
 </style>
\ No newline at end of file

--
Gitblit v1.7.1