From 423daf9f8686c3e5982a3c73fda8099aaa8d50c9 Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Thu, 12 Oct 2023 11:07:18 +0800 Subject: [PATCH] =?UTF-8?q?1.=E7=BB=A7=E7=94=B5=E5=99=A8=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=BB=84=E5=90=88=E6=B7=BB=E5=8A=A0=E8=AE=BE=E5=A4=87=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=EF=BC=9A=E8=BD=A6=E7=AB=99=E3=80=81=E5=B1=8F=E8=94=BD?= =?UTF-8?q?=E9=97=A8=202.=E7=AB=99=E5=8F=B0=E5=85=B3=E8=81=94=E8=BD=A6?= =?UTF-8?q?=E7=AB=99=E3=80=81=E5=B1=8F=E8=94=BD=E9=97=A8=E5=85=B3=E8=81=94?= =?UTF-8?q?=E7=AB=99=E5=8F=B0=E3=80=81=E7=AB=99=E5=8F=B0=E5=85=B3=E8=81=94?= =?UTF-8?q?=E8=BD=A8=E9=81=93=E5=8C=BA=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dialogs/DeviceRelateRelayList.vue | 2 + .../draw-app/properties/PlatformProperty.vue | 32 +- .../draw-app/properties/RelateRelayConfig.vue | 2 + .../properties/ScreenDoorProperty.vue | 3 +- .../draw-app/properties/StationProperty.vue | 2 +- src/drawApp/graphics/PlatformInteraction.ts | 119 +----- src/graphics/CommonGraphics.ts | 4 + src/graphics/platform/Platform.ts | 344 ++++-------------- .../platform/PlatformDrawAssistant.ts | 3 - src/graphics/screenDoor/ScreenDoor.ts | 4 - .../screenDoor/ScreenDoorDrawAssistant.ts | 5 +- src/protos/stationLayoutGraphics.ts | 38 +- 12 files changed, 127 insertions(+), 431 deletions(-) diff --git a/src/components/draw-app/dialogs/DeviceRelateRelayList.vue b/src/components/draw-app/dialogs/DeviceRelateRelayList.vue index 682188b..f5ccdc2 100644 --- a/src/components/draw-app/dialogs/DeviceRelateRelayList.vue +++ b/src/components/draw-app/dialogs/DeviceRelateRelayList.vue @@ -61,6 +61,8 @@ const tableRef = ref(); const deviceTypeMap = { 1: '道岔', 5: '信号机', + 6: '车站', + 7: '屏蔽门', }; const columns: QTable['columns'] = [ { diff --git a/src/components/draw-app/properties/PlatformProperty.vue b/src/components/draw-app/properties/PlatformProperty.vue index 5ae08ed..b8902d3 100644 --- a/src/components/draw-app/properties/PlatformProperty.vue +++ b/src/components/draw-app/properties/PlatformProperty.vue @@ -17,14 +17,6 @@ @blur="onUpdate" label="索引" /> - @@ -36,6 +28,16 @@ + + + 关联的物理区段 +
+ + {{ sectionRelation }} + +
+
+
@@ -47,6 +49,7 @@ import { useDrawStore } from 'src/stores/draw-store'; import { computed } from 'vue'; import { Station } from 'src/graphics/station/Station'; import { Platform } from 'src/graphics/platform/Platform'; +import { Section } from 'src/graphics/section/Section'; const drawStore = useDrawStore(); const { data: platformModel, onUpdate } = useFormData( @@ -61,7 +64,18 @@ const stationRelation = computed(() => { .map((relation) => relation.getOtherGraphic(platform).datas.code); let refStation; if (refStations) { - return (refStation = refStations[0]); + refStation = refStations[0]; + } + return refStation; +}); +const sectionRelation = computed(() => { + const platform = drawStore.selectedGraphic as Platform; + const refSections = platform?.relationManage + .getRelationsOfGraphicAndOtherType(platform, Section.Type) + .map((relation) => relation.getOtherGraphic
(platform).datas.code); + let refStation; + if (refSections) { + refStation = refSections[0]; } return refStation; }); diff --git a/src/components/draw-app/properties/RelateRelayConfig.vue b/src/components/draw-app/properties/RelateRelayConfig.vue index 74c5afb..1c74716 100644 --- a/src/components/draw-app/properties/RelateRelayConfig.vue +++ b/src/components/draw-app/properties/RelateRelayConfig.vue @@ -131,6 +131,8 @@ const handleState = ref('新建设备关联继电器'); const optionsType = [ { label: '道岔', value: graphicData.RelatedRef.DeviceType.Turnout }, { label: '信号机', value: graphicData.RelatedRef.DeviceType.signal }, + { label: '车站', value: graphicData.RelatedRef.DeviceType.station }, + { label: '屏蔽门', value: graphicData.RelatedRef.DeviceType.ScreenDoor }, ]; let selectGraphic: JlGraphic[] = []; diff --git a/src/components/draw-app/properties/ScreenDoorProperty.vue b/src/components/draw-app/properties/ScreenDoorProperty.vue index ed8203b..739e5a2 100644 --- a/src/components/draw-app/properties/ScreenDoorProperty.vue +++ b/src/components/draw-app/properties/ScreenDoorProperty.vue @@ -11,7 +11,6 @@ autogrow /> { ); let refStation; if (refStations) { - return (refStation = refStations[0]); + refStation = refStations[0]; } return refStation; }); diff --git a/src/components/draw-app/properties/StationProperty.vue b/src/components/draw-app/properties/StationProperty.vue index e87c2a9..04264bb 100644 --- a/src/components/draw-app/properties/StationProperty.vue +++ b/src/components/draw-app/properties/StationProperty.vue @@ -1,6 +1,6 @@