故障统计调整

This commit is contained in:
joylink_fanyuhong 2024-11-20 10:27:36 +08:00
parent 48c9adc9dc
commit 2070142e56
2 changed files with 16 additions and 2 deletions

View File

@ -330,7 +330,7 @@ class codeGraph extends Container {
this.stopTime.visible = true; this.stopTime.visible = true;
this.stopTime.text = stateData.stopTime; this.stopTime.text = stateData.stopTime;
} }
if (stateData.bizWaitTimeSec && useLineStore().faultStatistics) { if (useLineStore().faultStatistics) {
const minutes = Math.floor(stateData.bizWaitTimeSec / 60); const minutes = Math.floor(stateData.bizWaitTimeSec / 60);
const seconds = stateData.bizWaitTimeSec % 60; const seconds = stateData.bizWaitTimeSec % 60;
let minutesString = '' + minutes; let minutesString = '' + minutes;
@ -343,7 +343,9 @@ class codeGraph extends Container {
} }
this.waitSec.visible = true; this.waitSec.visible = true;
this.waitSec.text = `乘客已经等待了${minutesString}:${secondsString}`; this.waitSec.text = `${minutesString}:${secondsString}`;
} else {
this.waitSec.visible = false;
} }
} }
} }

View File

@ -156,6 +156,7 @@ import { ApiError } from 'src/boot/axios';
import { useUserStore } from 'src/stores/user-store'; import { useUserStore } from 'src/stores/user-store';
import { getMonitorPath } from 'src/router/routes'; import { getMonitorPath } from 'src/router/routes';
import FaultQueryDialog from 'src/components/dialog/FaultQueryDialog.vue'; import FaultQueryDialog from 'src/components/dialog/FaultQueryDialog.vue';
import { Platform } from 'src/graphics/platform/Platform';
const leftDrawerOpen = ref(false); const leftDrawerOpen = ref(false);
const router = useRouter(); const router = useRouter();
@ -172,6 +173,17 @@ watch(
} }
} }
); );
watch(
() => lineStore.faultStatistics,
() => {
const platfroms = lineStore
.getLineApp()
.queryStore.queryByType<Platform>(Platform.Type);
platfroms.forEach((platfrom) => {
platfrom.changeState();
});
}
);
function toggleLeftDrawer() { function toggleLeftDrawer() {
leftDrawerOpen.value = !leftDrawerOpen.value; leftDrawerOpen.value = !leftDrawerOpen.value;