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;