From c514486354ea86e368a87ecf2e2720969704fd9e Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Wed, 20 Nov 2024 09:49:50 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E8=AF=AD=E9=9F=B3=E6=8A=A5=E8=AD=A6btn?= =?UTF-8?q?=E5=8A=A0=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/MainLayout.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index 0554807..54ba252 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -65,7 +65,13 @@ :color="lineNetStore.handlePlayAble ? 'white' : 'red'" :icon="lineNetStore.handlePlayAble ? 'alarm_on' : 'alarm_off'" @click="changeCanPlayAlarmMusic" - /> + > + + {{ + lineNetStore.handlePlayAble ? '关闭语音报警' : '开启语音报警' + }} + Date: Wed, 20 Nov 2024 09:53:19 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/MainLayout.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index 54ba252..e34aa13 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -70,8 +70,8 @@ {{ lineNetStore.handlePlayAble ? '关闭语音报警' : '开启语音报警' }} - + + Date: Wed, 20 Nov 2024 10:17:32 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E8=B7=B3=E8=BD=ACats=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/drawApp/graphics/RunLineInteraction.ts | 14 +++++++++++++- src/pages/MonitorPage.vue | 9 +++------ src/stores/line-net-store.ts | 2 ++ 3 files changed, 18 insertions(+), 7 deletions(-) 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/pages/MonitorPage.vue b/src/pages/MonitorPage.vue index 71af585..906b97b 100644 --- a/src/pages/MonitorPage.vue +++ b/src/pages/MonitorPage.vue @@ -35,13 +35,10 @@ watch( } ); watch( - () => lineNetStore.selectedGraphic, + () => lineNetStore.jumpLineCount, (val) => { - if (val && lineNetStore.selectedGraphicType == RunLine.Type) { - const lineId = (val as RunLine)?.datas.lineId; - if (lineId) { - router.replace(`/line/monitor/${lineId}`); - } + if (val) { + router.replace(`/line/monitor/${lineNetStore.jumpLineId}`); } } ); diff --git a/src/stores/line-net-store.ts b/src/stores/line-net-store.ts index 4db806c..ec2fbaa 100644 --- a/src/stores/line-net-store.ts +++ b/src/stores/line-net-store.ts @@ -38,6 +38,8 @@ export const useLineNetStore = defineStore('lineNet', { closeAllAlarmInfoDialog: false, connectButtonColor: 'green', connectInfo: null as state.WarnLineMessage | null, + jumpLineCount: 0, + jumpLineId: '', }), getters: { untreatedNum: (state) => { From 2070142e56d6a01934344b2234951b3dc8e5a4a2 Mon Sep 17 00:00:00 2001 From: joylink_fanyuhong <18706759286@163.com> Date: Wed, 20 Nov 2024 10:27:36 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E6=95=85=E9=9A=9C=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/graphics/platform/Platform.ts | 6 ++++-- src/layouts/MainLayout.vue | 12 ++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) 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; From 59ffd45dfb3b037dae85bcc12723d16c949a1766 Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Wed, 20 Nov 2024 10:32:18 +0800 Subject: [PATCH 5/9] =?UTF-8?q?btn=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/MainLayout.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index 15141dd..a78a338 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -81,6 +81,9 @@ @click="$q.fullscreen.toggle()" v-if="$q.screen.gt.sm" > + + {{ $q.fullscreen.isActive ? '关闭全屏' : '开启全屏' }} + + > + 与同方连接状态 + Date: Wed, 20 Nov 2024 10:42:51 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/MainLayout.vue | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index a78a338..dd34c11 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -51,13 +51,26 @@ label="返回" @click="backConfirm" /> - + + + {{ + lineStore.faultStatistics + ? '关闭故障信息统计' + : '开启故障信息统计' + }} + + Date: Wed, 20 Nov 2024 10:53:36 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E6=8A=A5=E9=94=99=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/MainLayout.vue | 12 ------------ src/pages/LineMonitorPage.vue | 13 +++++++++++++ src/pages/MonitorPage.vue | 1 - 3 files changed, 13 insertions(+), 13 deletions(-) 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 @@