From 2d3207495e609946f5838da3b12e78e3046ada7f Mon Sep 17 00:00:00 2001
From: 董国庆 <364620639@qq.com>
Date: 星期一, 21 四月 2025 15:57:27 +0800
Subject: [PATCH] 实验结果汇报列表

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

diff --git a/src/components/EvaluateTable/index.vue b/src/components/EvaluateTable/index.vue
index f42ee82..573acfd 100644
--- a/src/components/EvaluateTable/index.vue
+++ b/src/components/EvaluateTable/index.vue
@@ -149,12 +149,20 @@
             },
             deep: true
         },
-        isReadonly: {
+        viewJson: {
             handler(newVal, oldVal) {
-                if (newVal) {
-                    this.activeIndex = JSON.parse(this.viewJson)
+                console.log("viewJson changed:", newVal)
+                if (newVal && this.isReadonly) {
+                    try {
+                        const parsedData = JSON.parse(newVal)
+                        this.activeIndex = parsedData
+                        console.log("activeIndex updated:", this.activeIndex)
+                    } catch (e) {
+                        console.error("Failed to parse viewJson:", e)
+                    }
                 }
             },
+            immediate: true
         }
     },
     data() {

--
Gitblit v1.7.1