From e00616caff36135428f95e9b55014f8e11028d86 Mon Sep 17 00:00:00 2001 From: huangjinysf Date: Fri, 19 Dec 2025 15:23:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8A=A5=E5=B7=A5=E8=BF=9B?= =?UTF-8?q?=E5=BA=A6=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/plan/EquipmentStatus.vue | 73 +++++++++++++++++++++++++++--- src/views/plan/index.vue | 52 +-------------------- 2 files changed, 67 insertions(+), 58 deletions(-) diff --git a/src/views/plan/EquipmentStatus.vue b/src/views/plan/EquipmentStatus.vue index 810a98f..7053186 100644 --- a/src/views/plan/EquipmentStatus.vue +++ b/src/views/plan/EquipmentStatus.vue @@ -9,7 +9,8 @@
+ class="axle-item" + :class="getCompletionClass(record.degree_of_completion)">
{{ record.axle_number }}
{{ record.specification }}
{{ record.model }}
@@ -18,7 +19,8 @@
+ class="axle-item" + :class="getCompletionClass(record.degree_of_completion)">
{{ record.axle_number }}
{{ record.specification }}
{{ record.model }}
@@ -64,6 +66,15 @@ const getRightAxles = (equipment) => { return axle.includes('右') || axle.includes('right'); }); }; + +// 根据完成度返回对应的CSS类名 +const getCompletionClass = (degree) => { + const percentage = degree * 100; + if (percentage < 25) return 'completion-low'; + if (percentage < 75) return 'completion-medium'; + if (percentage < 100) return 'completion-high'; + return 'completion-full'; +};