From fcf1b378012eec8a4a3debe5d9e3120f36c7a507 Mon Sep 17 00:00:00 2001
From: tjx <t2856754968@163.com>
Date: 星期三, 05 十一月 2025 21:03:02 +0800
Subject: [PATCH] 样式调整1
---
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