From 14657a074be5e7abda4dffd51b8c99cc506435d1 Mon Sep 17 00:00:00 2001 From: dkwang Date: Fri, 30 Oct 2026 20:09:43 +0800 Subject: [PATCH] update --- src/utils/yunying.js | 7 +-- src/views/home/components/ModuleSeven.vue | 58 ++++++++++++++++------- 2 files changed, 45 insertions(+), 20 deletions(-) diff --git a/src/utils/yunying.js b/src/utils/yunying.js index 5859419..adb5ea4 100644 --- a/src/utils/yunying.js +++ b/src/utils/yunying.js @@ -26,10 +26,11 @@ export function processYunyingInfo(dataList) { const redData = getTimeValues(item.maxDay) const maxValue = redData[currentTimeIndex] - const comparePercent = item.compareDay?.totalSum ? parseFloat(item.compareDay.totalSum) : 0 + // 对比日同时刻累计客流,仅用于百分比计算 + const comparePercent = item.comparePercent?.totalSum ? parseFloat(item.comparePercent.totalSum) : 0 + // 今日累计客流(接口 totalSum 字段,time1~time10 是累计值不能相加) const totalSum = item.today?.totalSum ? parseFloat(item.today.totalSum) : 0 - const total = barData.reduce((sum, val) => sum + val, 0) - const totalStr = Math.floor(total).toString() + const totalStr = Math.floor(totalSum).toString() return { lineId: parseInt(item.line, 10), diff --git a/src/views/home/components/ModuleSeven.vue b/src/views/home/components/ModuleSeven.vue index 3218d78..00bf302 100644 --- a/src/views/home/components/ModuleSeven.vue +++ b/src/views/home/components/ModuleSeven.vue @@ -3,21 +3,31 @@
({{ currentDate }})
+
+ + <7 + 7~30 + >30 +
- 站台门2 + 站台门 + 281
- 火灾自动报警系统16 + 火灾自动报警系统 + 370
- 给水和排水35 + 给水和排水 + 172
- 站内客运设备49 + 站内客运设备 + 280
@@ -223,21 +233,35 @@ const chartOption = computed(() => ({ .txt { position: absolute; top: 0px; - left: 50%; - width: 50%; + left: 40%; + width: 60%; height: 50%; // background-color: yellow; + .txt-header, .txt-item { position: absolute; - color: #FFFFFF; - font-family: Alibaba PuHuiTi 3.0; - font-size: 20px; - font-weight: 400; + left: 0px; + margin-top: 32px; + width: calc(100% - 140px); display: flex; align-items: center; - width: calc(100% - 140px); - left: 40px; + font-family: Alibaba PuHuiTi 3.0; + } + + .txt-header { + top: 32px; + left: 220px; + padding-left: 48px; + font-size: 18px; + font-weight: 600; + color: rgba(150, 210, 255, 0.85); + } + + .txt-item { + color: #FFFFFF; + font-size: 20px; + font-weight: 400; img { width: 28px; @@ -249,12 +273,12 @@ const chartOption = computed(() => ({ .txt-label { flex: 1; } + } - .txt-number { - min-width: 60px; - text-align: right; - flex-shrink: 0; - } + .txt-col { + width: 60px; + text-align: right; + flex-shrink: 0; } .txt-item-1 {