diff --git a/src/drawApp/graphics/RunLineInteraction.ts b/src/drawApp/graphics/RunLineInteraction.ts index afd4138..518122d 100644 --- a/src/drawApp/graphics/RunLineInteraction.ts +++ b/src/drawApp/graphics/RunLineInteraction.ts @@ -23,6 +23,7 @@ import { RunLineGraphicHitArea } from 'src/graphics/runLine/RunLineDrawAssistant import { Dialog } from 'quasar'; import SetDashLineDialog from '../../components/draw-app/dialogs/SetDashLineDialog.vue'; import SetGaryLineDialog from '../../components/draw-app/dialogs/SetGaryLineDialog.vue'; +import { useLineNetStore } from 'src/stores/line-net-store'; export class RunLineData extends GraphicDataBase implements IRunLineData { constructor(data?: graphicData.RunLine) { @@ -235,7 +236,6 @@ export class DrawRunLinePlugin extends GraphicInteractionPlugin { }); }; setGrayLineConfig.handler = () => { - console.log(runLine.datas, '11111'); Dialog.create({ title: '设置灰线段', message: '', @@ -280,10 +280,22 @@ export class RunLineOperateInteraction extends GraphicInteractionPlugin g.cursor = 'pointer'; g.lineBody.hitArea = new RunLineGraphicHitArea(g); g.selectable = true; + g.on('_leftclick', this.leftClick, this); } unbind(g: RunLine): void { g.selectable = false; g.eventMode = 'none'; + g.off('_leftclick', this.leftClick, this); + } + + leftClick(e: FederatedMouseEvent) { + const target = e.target as DisplayObject; + const runLine = target.getGraphic() as RunLine; + const lineId = runLine.datas.lineId; + if (lineId) { + useLineNetStore().jumpLineCount++; + useLineNetStore().jumpLineId = lineId; + } } } 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..5b706e6 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -51,13 +51,26 @@ label="返回" @click="backConfirm" /> - + + + {{ + lineStore.faultStatistics + ? '关闭故障信息统计' + : '开启故障信息统计' + }} + + + + {{ $q.fullscreen.isActive ? '关闭全屏' : '开启全屏' }} + + > + 与同方连接状态 +
+ +
-
+
@@ -39,6 +93,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<{ @@ -51,6 +106,7 @@ const route = useRoute(); const lineStore = useLineStore(); const lineNetStore = useLineNetStore(); const faultInfo = ref(false); +const faultInfoMin = ref(false); const alarmInfoList: AlarmInfo[] = reactive([]); let timeInterval = null; let timeInfoLabel: string[] = reactive([]); @@ -124,6 +180,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 71af585..a132f6f 100644 --- a/src/pages/MonitorPage.vue +++ b/src/pages/MonitorPage.vue @@ -9,7 +9,6 @@