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 @@