diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index dd34c11..5b706e6 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -174,7 +174,6 @@ 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(); @@ -191,17 +190,6 @@ watch( } } ); -watch( - () => lineStore.faultStatistics, - () => { - const platfroms = lineStore - .getLineApp() - .queryStore.queryByType(Platform.Type); - platfroms.forEach((platfrom) => { - platfrom.changeState(); - }); - } -); function toggleLeftDrawer() { leftDrawerOpen.value = !leftDrawerOpen.value; diff --git a/src/pages/LineMonitorPage.vue b/src/pages/LineMonitorPage.vue index 94bd00e..bf49637 100644 --- a/src/pages/LineMonitorPage.vue +++ b/src/pages/LineMonitorPage.vue @@ -39,6 +39,7 @@ import { useLineStore } from 'src/stores/line-store'; import { useRoute } from 'vue-router'; import { AlarmInfo, useLineNetStore } from 'src/stores/line-net-store'; import { showAlertTypeData } from 'src/components/alarm/alarmInfoEnum'; +import { Platform } from 'src/graphics/platform/Platform'; const props = withDefaults( defineProps<{ @@ -124,6 +125,18 @@ watch( } ); +watch( + () => lineStore.faultStatistics, + () => { + const platfroms = lineStore + .getLineApp() + .queryStore.queryByType(Platform.Type); + platfroms.forEach((platfrom) => { + platfrom.changeState(); + }); + } +); + const lineId = Number(route.params.lineId); const lineApp = lineStore.initLineApp(lineId); diff --git a/src/pages/MonitorPage.vue b/src/pages/MonitorPage.vue index 906b97b..a132f6f 100644 --- a/src/pages/MonitorPage.vue +++ b/src/pages/MonitorPage.vue @@ -9,7 +9,6 @@