From 4abb93deab37da6416891f439d9ee8954d97df16 Mon Sep 17 00:00:00 2001 From: liutao <790864623@qq.com> Date: Thu, 7 May 2026 08:39:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/StatusDistributionChart.vue | 52 +++++++++++++++---- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/src/views/iot/runoverview/components/StatusDistributionChart.vue b/src/views/iot/runoverview/components/StatusDistributionChart.vue index 2dacea95..2b9ec06d 100644 --- a/src/views/iot/runoverview/components/StatusDistributionChart.vue +++ b/src/views/iot/runoverview/components/StatusDistributionChart.vue @@ -23,12 +23,17 @@
{{ t('DataCollection.RunOverview.summaryTitle') }}
- -
-
- - {{ statusLabelMap[item.status] }} - {{ item.percent.toFixed(2) }}% ({{ item.hours.toFixed(2) }}h) +
+ + +
+
+ + {{ statusLabelMap[item.status] }} + {{ item.percent.toFixed(2) }}% ({{ item.hours.toFixed(2) }}h) +
@@ -198,20 +203,34 @@ const pieOption = computed(() => ({ } .chart-panel__side { - padding: 8px 8px 0; + padding: 8px 12px 0; +} + +.chart-panel__summary-layout { + display: grid; + grid-template-columns: minmax(180px, 220px) minmax(180px, 1fr); + align-items: center; + gap: 8px 16px; + min-height: 280px; +} + +.chart-panel__pie { + display: flex; + align-items: center; + justify-content: center; } .chart-panel__legend { display: flex; flex-direction: column; - gap: 10px; - margin-top: -8px; + gap: 14px; + justify-content: center; } .chart-panel__legend-item { display: grid; - grid-template-columns: 12px 1fr auto; - gap: 8px; + grid-template-columns: 12px 52px 1fr; + gap: 10px; align-items: center; color: #344054; font-size: 13px; @@ -230,11 +249,22 @@ const pieOption = computed(() => ({ .value { color: #101828; font-weight: 600; + text-align: left; } @media (max-width: 1100px) { .chart-panel__body { grid-template-columns: 1fr; } + + .chart-panel__summary-layout { + grid-template-columns: 1fr; + justify-items: center; + } + + .chart-panel__legend { + width: 100%; + max-width: 320px; + } }