From 173766e82d7cde9a7ae30b8896a9a287dff411f8 Mon Sep 17 00:00:00 2001
From: zjk <852185829@qq.com>
Date: 星期二, 02 九月 2025 10:17:59 +0800
Subject: [PATCH] feat: 打包配置

---
 laboratory/src/views/deliveryAssessment/assayTaskList/components/CraftDialog.vue |   50 ++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 40 insertions(+), 10 deletions(-)

diff --git a/laboratory/src/views/deliveryAssessment/assayTaskList/components/CraftDialog.vue b/laboratory/src/views/deliveryAssessment/assayTaskList/components/CraftDialog.vue
index 478a8fb..2cd1101 100644
--- a/laboratory/src/views/deliveryAssessment/assayTaskList/components/CraftDialog.vue
+++ b/laboratory/src/views/deliveryAssessment/assayTaskList/components/CraftDialog.vue
@@ -59,6 +59,7 @@
 </template>
 
 <script>
+import {getDetailById} from '../service'
 export default {
     name: 'CraftDialog',
     props: {
@@ -69,7 +70,11 @@
         reportData: {
             type: Object,
             default: () => { }
-        }
+        },id: {
+      type: [String, Number],
+      default: "",
+    //   required: true,
+    },
     },
     data() {
         return {
@@ -121,20 +126,45 @@
         modelValue: {
             handler(val) {
                 this.dialogVisible = val;
+                if (val && this.id) {
+          this.fetchDetail();
+        }
             },
             immediate: true
         },
-        reportData: {
-            handler(val) {
-                if (val) {
-                    this.form.reportNo = val.reportNo || '';
-                    this.form.reportName = val.reportName || '';
-                }
-            },
-            immediate: true
-        }
+        id(val) {
+      if (this.modelValue && val) {
+        this.fetchDetail();
+      }
+    },
     },
     methods: {
+        async fetchDetail() {
+      try {
+        const res = await getDetailById({ id: this.id });
+        if (res) {
+          this.evaluateInfo = { ...res };
+          this.form.reportNo = res.reportCode || "";
+          this.form.reportName = res.reportTitle || "";
+          // 详情回显分数
+          if (res.evaluateScore) {
+            if (
+              this.type === "detail" &&
+              typeof res.evaluateScore === "string"
+            ) {
+              const scoreArr = res.evaluateScore
+                .split(",")
+                .map((s) => Number(s));
+              this.criteriaList.forEach((item, idx) => {
+                item.score = scoreArr[idx] || 0;
+              });
+            }
+          }
+        }
+      } catch (e) {
+        this.$message && this.$message.error("获取详情失败");
+      }
+    },
         handleClose() {
             this.$emit('update:modelValue', false);
         },

--
Gitblit v1.7.1