diff --git a/src/components/errrorMessageBox.vue b/src/components/errrorMessageBox.vue index ebe8383..057c780 100644 --- a/src/components/errrorMessageBox.vue +++ b/src/components/errrorMessageBox.vue @@ -57,7 +57,7 @@ import { onMounted, ref, watch } from 'vue'; import { queryAlarmInfoById } from 'src/api/DecisionInfo'; import { useQuasar } from 'quasar'; -const bgColor = 'yellow'; +let bgColor = ref('yellow'); const dialogWidth = window.screen.width * 0.4; const lineNetStore = useLineNetStore(); @@ -65,6 +65,7 @@ watch( () => lineNetStore.alarmInfo, (val) => { if (val.length) { + bgColor.value = 'orange'; search(); updata(); } diff --git a/src/graphics/trainWindow/TrainWindowDrawAssistant.ts b/src/graphics/trainWindow/TrainWindowDrawAssistant.ts index ffa95e2..fcb75f1 100644 --- a/src/graphics/trainWindow/TrainWindowDrawAssistant.ts +++ b/src/graphics/trainWindow/TrainWindowDrawAssistant.ts @@ -188,7 +188,7 @@ export class TrainWindowDraw extends GraphicDrawAssistant< ); this.app.deleteGraphics(...trainWindowAll); turnoutSections.forEach((section) => { - const ps = section.localToCanvasPoint(section.getStartPoint()); + const ps = section.datas.points[0] as Point; let direction = 1; if (ps.y > height.y) { direction = -1; diff --git a/src/pages/DecisionInfoManage.vue b/src/pages/DecisionInfoManage.vue index eef57df..69ef074 100644 --- a/src/pages/DecisionInfoManage.vue +++ b/src/pages/DecisionInfoManage.vue @@ -215,7 +215,7 @@ async function onRequest(props: any) { let response = await alarmInfoPageQuery({ current: page, size: rowsPerPage, - alertType: filter.alertType, + alertType: (saveAlertTypeData as never)[filter.alertType], }); const pageData = response; pagination.value.rowsNumber = pageData.total; diff --git a/src/pages/MonitorPage.vue b/src/pages/MonitorPage.vue index 3422e99..175a721 100644 --- a/src/pages/MonitorPage.vue +++ b/src/pages/MonitorPage.vue @@ -67,6 +67,9 @@ function onResize() { //报警信息弹框 const audio = ref(); +const $q = useQuasar(); +const dialogInstance = ref(); + watch( () => lineNetStore.alarmInfo, (val) => { @@ -79,15 +82,18 @@ watch( }, { deep: true } ); -const $q = useQuasar(); + function playAlarmMusic() { audio.value.play(); } + function alarm() { lineNetStore.alarmDialog = true; - $q.dialog({ component: errrorMessageBox }).onCancel(() => { - lineNetStore.alarmDialog = false; - }); + dialogInstance.value = $q + .dialog({ component: errrorMessageBox }) + .onCancel(() => { + lineNetStore.alarmDialog = false; + }); } onMounted(() => { @@ -101,5 +107,8 @@ onMounted(() => { onUnmounted(() => { lineNetStore.destroy(); + if (dialogInstance.value) { + dialogInstance.value.hide(); + } });