From e4ce00f4a3b1a67a0af45b47fa2f9240ef1e20b6 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期五, 14 十一月 2025 11:13:03 +0800
Subject: [PATCH] 调试
---
components/EquipmentInspection.vue | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/components/EquipmentInspection.vue b/components/EquipmentInspection.vue
index 3012d9f..2dda798 100644
--- a/components/EquipmentInspection.vue
+++ b/components/EquipmentInspection.vue
@@ -165,13 +165,14 @@
// 纭繚姣忎釜瀛愭暟缁勯兘鏄湁鏁堢殑鏁扮粍
const isValid = record.dailyChecks.every(arr => Array.isArray(arr) && arr.length === 31)
if (isValid) {
- this.dailyChecks = record.dailyChecks
+ // 浣跨敤 $set 纭繚 Vue 鑳藉妫�娴嬪埌宓屽鏁扮粍鐨勫彉鍖�
+ this.$set(this, 'dailyChecks', record.dailyChecks.map(arr => [...arr]))
} else {
console.warn('鏃ュ父鐐规鏁版嵁鏍煎紡涓嶆纭紝浣跨敤榛樿鍊�')
- this.dailyChecks = this.dailyItems.map(() => Array(31).fill(false))
+ this.$set(this, 'dailyChecks', this.dailyItems.map(() => Array(31).fill(false)))
}
} else {
- this.dailyChecks = this.dailyItems.map(() => Array(31).fill(false))
+ this.$set(this, 'dailyChecks', this.dailyItems.map(() => Array(31).fill(false)))
}
// 楠岃瘉骞惰缃湀搴︾偣妫�鏁版嵁
@@ -179,13 +180,14 @@
// 纭繚姣忎釜瀛愭暟缁勯兘鏄湁鏁堢殑鏁扮粍
const isValid = record.monthlyChecks.every(arr => Array.isArray(arr) && arr.length === 31)
if (isValid) {
- this.monthlyChecks = record.monthlyChecks
+ // 浣跨敤 $set 纭繚 Vue 鑳藉妫�娴嬪埌宓屽鏁扮粍鐨勫彉鍖�
+ this.$set(this, 'monthlyChecks', record.monthlyChecks.map(arr => [...arr]))
} else {
console.warn('鏈堝害鐐规鏁版嵁鏍煎紡涓嶆纭紝浣跨敤榛樿鍊�')
- this.monthlyChecks = this.monthlyItems.map(() => Array(31).fill(false))
+ this.$set(this, 'monthlyChecks', this.monthlyItems.map(() => Array(31).fill(false)))
}
} else {
- this.monthlyChecks = this.monthlyItems.map(() => Array(31).fill(false))
+ this.$set(this, 'monthlyChecks', this.monthlyItems.map(() => Array(31).fill(false)))
}
this.dirty = false
--
Gitblit v1.9.3