From 4d4e8cd36377fa24cdda7a560dfc42fd2c9334b4 Mon Sep 17 00:00:00 2001
From: 董国庆 <364620639@qq.com>
Date: 星期五, 23 五月 2025 15:33:49 +0800
Subject: [PATCH] 实验结果汇报

---
 laboratory/src/components/EvaluateTable/index.vue |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/laboratory/src/components/EvaluateTable/index.vue b/laboratory/src/components/EvaluateTable/index.vue
index b015f4c..83b827d 100644
--- a/laboratory/src/components/EvaluateTable/index.vue
+++ b/laboratory/src/components/EvaluateTable/index.vue
@@ -151,7 +151,7 @@
         },
         viewJson: {
             handler(newVal, oldVal) {
-                if (newVal && this.isReadonly) {
+                if (newVal) {
                     try {
                         const parsedData = JSON.parse(newVal)
                         this.activeIndex = parsedData
@@ -205,7 +205,17 @@
         },
         sort(num, index) {
             return (index + 1) * 3 - num
+        },
+        resetData() {
+            this.total = null
+            this.activeIndex = this.activeIndex.map(() => ({
+                num: null,
+                score: 0
+            }))
         }
+    },
+    beforeDestroy() {
+        this.resetData()
     }
 }
 </script>

--
Gitblit v1.7.1