From 82a312bc359f5e6fa12583edb159e2fbe57a2222 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Tue, 31 Oct 2023 13:33:38 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=93=E5=B2=94=E7=8A=B6=E6=80=81=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/TurnoutState.vue | 92 +++++++++++-------- src/graphics/turnout/Turnout.ts | 4 +- src/protos/request.ts | 13 ++- 3 files changed, 64 insertions(+), 45 deletions(-) diff --git a/src/components/line-app/states/TurnoutState.vue b/src/components/line-app/states/TurnoutState.vue index 248f660..a4bc8eb 100644 --- a/src/components/line-app/states/TurnoutState.vue +++ b/src/components/line-app/states/TurnoutState.vue @@ -28,19 +28,12 @@ label="id" hint="" /> - +
@@ -48,7 +41,23 @@ + +
+ +
+
+
@@ -56,22 +65,19 @@ diff --git a/src/graphics/turnout/Turnout.ts b/src/graphics/turnout/Turnout.ts index 95fad1e..cff2e31 100644 --- a/src/graphics/turnout/Turnout.ts +++ b/src/graphics/turnout/Turnout.ts @@ -196,11 +196,11 @@ export class Turnout extends JlGraphic { doRepaint(): void { // console.log(this.states); const { pointB, pointC } = this.datas; - if (this.states.normal) { + if (this.states.dw) { this.graphics.fork.paint(pointB[0]); this.graphics.label.style.stroke = TurnoutConsts.normalLabelColor; this.graphics.fork.visible = true; - } else if (this.states.reverse) { + } else if (this.states.fw) { this.graphics.fork.paint(pointC[0]); this.graphics.label.style.stroke = TurnoutConsts.reverseLabelColor; this.graphics.fork.visible = true; diff --git a/src/protos/request.ts b/src/protos/request.ts index 87c51db..9cd1027 100644 --- a/src/protos/request.ts +++ b/src/protos/request.ts @@ -55,7 +55,10 @@ export namespace request { SetSB = 5, CancelSB = 6, SetJC = 7, - CancelJC = 8 + CancelJC = 8, + ForceDw = 9, + ForceFw = 10, + CancelForce = 11 } } export class TurnoutOperationReq extends pb_1.Message { @@ -293,9 +296,11 @@ export namespace request { export namespace Section { export enum AxleOperation { Drst = 0, - Pdrst = 1, - TrainIn = 2, - TrainOut = 3 + Pdrst = 1 + } + export enum SectionOperation { + SetFaultOcc = 0, + CancelFaultOcc = 1 } } }