From c64045452e51b0f27a8e8be278c7d419c6a3cb17 Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Wed, 24 Jan 2024 13:53:06 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../line-app/states/ScreenDoorState.vue | 77 ++++++++++--------- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/src/components/line-app/states/ScreenDoorState.vue b/src/components/line-app/states/ScreenDoorState.vue index 6f51b15..1b62e8c 100644 --- a/src/components/line-app/states/ScreenDoorState.vue +++ b/src/components/line-app/states/ScreenDoorState.vue @@ -44,46 +44,38 @@ label="屏蔽门有障碍物" :disable="true" /> -
-
-
屏蔽门强制:
- +
屏蔽门强制:
+ +
+
+
设置故障:
+ +
+
+
选择子门:
+
@@ -265,3 +257,12 @@ watch( } ); + + From fc8ddeecb7b42b2b6ace46a715b0436463ffa813 Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Wed, 24 Jan 2024 14:17:17 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=B1=8F=E8=94=BD=E9=97=A8=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../line-app/states/ScreenDoorState.vue | 24 +-------------- .../line-app/states/TurnoutState.vue | 29 +++++++++++++------ 2 files changed, 21 insertions(+), 32 deletions(-) diff --git a/src/components/line-app/states/ScreenDoorState.vue b/src/components/line-app/states/ScreenDoorState.vue index 1b62e8c..831be0d 100644 --- a/src/components/line-app/states/ScreenDoorState.vue +++ b/src/components/line-app/states/ScreenDoorState.vue @@ -93,35 +93,13 @@ /> - - - - - - - - - - diff --git a/src/components/line-app/states/TurnoutState.vue b/src/components/line-app/states/TurnoutState.vue index ee82196..86d2bd9 100644 --- a/src/components/line-app/states/TurnoutState.vue +++ b/src/components/line-app/states/TurnoutState.vue @@ -143,15 +143,17 @@ - +
+
道岔强制:
+ +
@@ -263,3 +265,12 @@ onUnmounted(() => { } }); + + From cde11aa2bbefd7a77e14cb8ac676e019d3f4fd1d Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Wed, 24 Jan 2024 15:36:46 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E7=BB=A7=E7=94=B5=E5=99=A8=E3=80=81?= =?UTF-8?q?=E9=81=93=E5=B2=94=E3=80=81=E5=8C=BA=E6=AE=B5=E3=80=81=E5=B1=8F?= =?UTF-8?q?=E8=94=BD=E9=97=A8=E7=8A=B6=E6=80=81=E7=BB=84=E4=BB=B6=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96=E7=BB=9F=E4=B8=80=E5=8F=8A=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/line-app/states/RelayState.vue | 23 +++--- .../line-app/states/ScreenDoorState.vue | 63 ++++++++------- .../line-app/states/SectionState.vue | 79 +++++++++++-------- .../line-app/states/TurnoutState.vue | 44 ++++++----- 4 files changed, 115 insertions(+), 94 deletions(-) diff --git a/src/components/line-app/states/RelayState.vue b/src/components/line-app/states/RelayState.vue index f8c4036..935e7e8 100644 --- a/src/components/line-app/states/RelayState.vue +++ b/src/components/line-app/states/RelayState.vue @@ -61,7 +61,7 @@ watch( } if (val?.length == 1 && val[0] instanceof Relay) { copySelectGraphic = toRaw(val[0]); - setNewRelayState(val[0]); + initRelayState(val[0]); } else { copySelectGraphic = null; } @@ -70,11 +70,12 @@ watch( onMounted(() => { if (lineStore.selectedGraphics) { - setNewRelayState(lineStore.selectedGraphics[0] as Relay); + initRelayState(lineStore.selectedGraphics[0] as Relay); } }); -function setNewRelayState(relay: Relay) { +function initRelayState(relay: Relay) { + copySelectGraphic = toRaw(relay); relayState.value = { id: relay.datas.id, code: relay.datas.code, @@ -84,14 +85,6 @@ function setNewRelayState(relay: Relay) { subscribeState(relay); } -function subscribeState(g: Relay) { - g.on('stateupdate', updateState); -} - -function unSubscribeState(g: Relay) { - g.off('stateupdate', updateState); -} - function updateState(newVal: RelayState) { relayState.value.xh = newVal.states.xh || false; } @@ -117,6 +110,14 @@ function changePosition(operation: request.Relay.Operation) { } } +function subscribeState(g: Relay) { + g.on('stateupdate', updateState); +} + +function unSubscribeState(g: Relay) { + g.off('stateupdate', updateState); +} + onUnmounted(() => { if (copySelectGraphic) { unSubscribeState(copySelectGraphic); diff --git a/src/components/line-app/states/ScreenDoorState.vue b/src/components/line-app/states/ScreenDoorState.vue index 831be0d..7dd64b9 100644 --- a/src/components/line-app/states/ScreenDoorState.vue +++ b/src/components/line-app/states/ScreenDoorState.vue @@ -41,7 +41,7 @@ style="margin-top: 10px; margin-left: 10px" v-model="screenDoorState.obstacle" outlined - label="屏蔽门有障碍物" + label="间隙探测障碍物" :disable="true" />
@@ -113,7 +113,7 @@