From 2070142e56d6a01934344b2234951b3dc8e5a4a2 Mon Sep 17 00:00:00 2001 From: joylink_fanyuhong <18706759286@163.com> Date: Wed, 20 Nov 2024 10:27:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=85=E9=9A=9C=E7=BB=9F=E8=AE=A1=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/graphics/platform/Platform.ts | 6 ++++-- src/layouts/MainLayout.vue | 12 ++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/graphics/platform/Platform.ts b/src/graphics/platform/Platform.ts index 768fb5e..c22f0d8 100644 --- a/src/graphics/platform/Platform.ts +++ b/src/graphics/platform/Platform.ts @@ -330,7 +330,7 @@ class codeGraph extends Container { this.stopTime.visible = true; this.stopTime.text = stateData.stopTime; } - if (stateData.bizWaitTimeSec && useLineStore().faultStatistics) { + if (useLineStore().faultStatistics) { const minutes = Math.floor(stateData.bizWaitTimeSec / 60); const seconds = stateData.bizWaitTimeSec % 60; let minutesString = '' + minutes; @@ -343,7 +343,9 @@ class codeGraph extends Container { } this.waitSec.visible = true; - this.waitSec.text = `乘客已经等待了${minutesString}:${secondsString}`; + this.waitSec.text = `${minutesString}:${secondsString}`; + } else { + this.waitSec.visible = false; } } } diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index e34aa13..15141dd 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -156,6 +156,7 @@ import { ApiError } from 'src/boot/axios'; import { useUserStore } from 'src/stores/user-store'; import { getMonitorPath } from 'src/router/routes'; import FaultQueryDialog from 'src/components/dialog/FaultQueryDialog.vue'; +import { Platform } from 'src/graphics/platform/Platform'; const leftDrawerOpen = ref(false); const router = useRouter(); @@ -172,6 +173,17 @@ watch( } } ); +watch( + () => lineStore.faultStatistics, + () => { + const platfroms = lineStore + .getLineApp() + .queryStore.queryByType(Platform.Type); + platfroms.forEach((platfrom) => { + platfrom.changeState(); + }); + } +); function toggleLeftDrawer() { leftDrawerOpen.value = !leftDrawerOpen.value;