From ef0637003a674b0c60f9e1ee2a71e65fc11a7e75 Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Wed, 13 Mar 2024 16:15:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=97=E8=BD=A6=E6=9C=BA=E5=92=8C=E8=BD=A6?= =?UTF-8?q?=E5=BA=93=E9=97=A8=E7=BB=A7=E7=94=B5=E5=99=A8=E5=92=8C=E4=B8=80?= =?UTF-8?q?=E9=94=AE=E5=85=B3=E8=81=94=E9=9B=86=E4=B8=AD=E7=AB=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ConcentrationDividingLineUtils.ts | 6 + src/layouts/DrawLayout.vue | 8 + .../RelayCabinetLayout/GeneraterCiCjConfig.ts | 211 ++++++++++++++++++ .../RelayCabinetLayout/GeneraterCiQdConfig.ts | 16 ++ .../GeneraterRelayLayoutConfig.ts | 101 +++++++++ .../RelayCabinetLayout/RelayCabinetLayout.vue | 32 +++ 6 files changed, 374 insertions(+) diff --git a/src/graphics/concentrationDividingLine/ConcentrationDividingLineUtils.ts b/src/graphics/concentrationDividingLine/ConcentrationDividingLineUtils.ts index bcbf4d5..2146c9b 100644 --- a/src/graphics/concentrationDividingLine/ConcentrationDividingLineUtils.ts +++ b/src/graphics/concentrationDividingLine/ConcentrationDividingLineUtils.ts @@ -12,6 +12,10 @@ import { AxleCounting } from '../axleCounting/AxleCounting'; import { Transponder } from '../transponder/Transponder'; import { AxleCountingData } from 'src/drawApp/graphics/AxleCountingInteraction'; import { TransponderData } from 'src/drawApp/graphics/TransponderInteraction'; +import { GarageDoor } from '../garageDoor/GarageDoor'; +import { CarWashing } from '../carWashing/CarWashing'; +import { GarageDoorData } from 'src/drawApp/graphics/GarageDoorInteraction'; +import { CarWashingData } from 'src/drawApp/graphics/CarWashingInteraction'; //判断线段与线段有木有交点 export function isSegmentsIntersect( @@ -170,6 +174,8 @@ export function handleCentralizedStationsData( [Signal.Type, new SignalData()], [AxleCounting.Type, new AxleCountingData()], [Transponder.Type, new TransponderData()], + [GarageDoor.Type, new GarageDoorData()], + [CarWashing.Type, new CarWashingData()], ]); devices.forEach((device) => { const data = dataMap.get(device.type); diff --git a/src/layouts/DrawLayout.vue b/src/layouts/DrawLayout.vue index e80826f..734ac66 100644 --- a/src/layouts/DrawLayout.vue +++ b/src/layouts/DrawLayout.vue @@ -834,11 +834,19 @@ function oneClickRelateCentralizedStation() { } return false; }); + const garageDoors = drawApp.queryStore + .queryByType(GarageDoor.Type) + .filter((g) => containDeviceIds.includes(g.datas.linkSection)); + const carWashings = drawApp.queryStore + .queryByType(CarWashing.Type) + .filter((g) => containDeviceIds.includes(g.datas.linkSection)); const allSetCentralizedStationsDevice = [ ...containDevices, ...signals, ...transponders, ...axleCountings, + ...garageDoors, + ...carWashings, ]; allSetCentralizedStationsDevice.forEach( (g) => ((g as Signal).datas.centralizedStations = []) diff --git a/src/layouts/RelayCabinetLayout/GeneraterCiCjConfig.ts b/src/layouts/RelayCabinetLayout/GeneraterCiCjConfig.ts index d905797..51db77b 100644 --- a/src/layouts/RelayCabinetLayout/GeneraterCiCjConfig.ts +++ b/src/layouts/RelayCabinetLayout/GeneraterCiCjConfig.ts @@ -617,6 +617,215 @@ const powerScreenCjList = [ }, ]; +//车库门 +const garageDoorCjList = [ + { + code: 'CKM', + refDeviceCodesAndPos: [ + [ + { + code: 'MKJ', + position: PostionType.Q, + }, + ], + [ + { + code: 'MKJ', + position: PostionType.H, + }, + ], + [ + { + code: 'MGJ', + position: PostionType.Q, + }, + ], + [ + { + code: 'MGJ', + position: PostionType.H, + }, + ], + [ + { + code: 'MGZJ', + position: PostionType.Q, + }, + ], + [ + { + code: 'MGZJ', + position: PostionType.H, + }, + ], + [ + { + code: 'MPLJ', + position: PostionType.Q, + }, + ], + [ + { + code: 'MPLJ', + position: PostionType.H, + }, + ], + [ + { + code: 'MMSJ', + position: PostionType.Q, + }, + ], + [ + { + code: 'MMSJ', + position: PostionType.H, + }, + ], + [ + { + code: 'kMJ', + position: PostionType.Q, + }, + ], + [ + { + code: 'GMJ', + position: PostionType.Q, + }, + ], + ], + }, +]; + +//洗车机 +const carWashingCjList = [ + { + code: 'XCJ1', + refDeviceCodesAndPos: [ + [ + { + code: 'XQJ', + position: PostionType.Q, + }, + ], + [ + { + code: 'TWJ1', + position: PostionType.Q, + }, + ], + [ + { + code: 'TWJ2', + position: PostionType.Q, + }, + ], + [ + { + code: 'TWJ3', + position: PostionType.Q, + }, + ], + [ + { + code: 'TGQJ', + position: PostionType.Q, + }, + ], + ], + }, + { + code: 'XCJ2', + refDeviceCodesAndPos: [ + [ + { + code: 'XCIXJ', + position: PostionType.Q, + }, + ], + [ + { + code: 'XCIXJ', + position: PostionType.H, + }, + ], + [ + { + code: 'XCYXJ', + position: PostionType.Q, + }, + ], + [ + { + code: 'XCYXJ', + position: PostionType.H, + }, + ], + [ + { + code: 'CFJ1', + position: PostionType.Q, + }, + ], + [ + { + code: 'CFJ1', + position: PostionType.H, + }, + ], + [ + { + code: 'CFJ2', + position: PostionType.Q, + }, + ], + [ + { + code: 'CFJ2', + position: PostionType.H, + }, + ], + [ + { + code: 'CFJ3', + position: PostionType.Q, + }, + ], + [ + { + code: 'CFJ3', + position: PostionType.H, + }, + ], + [ + { + code: 'JTJ', + position: PostionType.Q, + }, + ], + [ + { + code: 'JTJ', + position: PostionType.H, + }, + ], + [ + { + code: 'TGYXJ', + position: PostionType.Q, + }, + ], + [ + { + code: 'TGYXJ', + position: PostionType.H, + }, + ], + ], + }, +]; + const DeviceType = graphicData.RelatedRef.DeviceType; export const ciCjMap = new Map([ [ @@ -659,4 +868,6 @@ export const ciCjMap = new Map([ [`${DeviceType.SignalFaultAlarm}+undefined`, signalFaultAlarmCjList], [`${DeviceType.Breakers}+undefined`, breakersCjList], [`${DeviceType.PowerScreen}+undefined`, powerScreenCjList], + [`${DeviceType.GarageDoor}+undefined`, garageDoorCjList], + [`${DeviceType.CarWashing}+undefined`, carWashingCjList], ]); diff --git a/src/layouts/RelayCabinetLayout/GeneraterCiQdConfig.ts b/src/layouts/RelayCabinetLayout/GeneraterCiQdConfig.ts index e11f49c..087b2b0 100644 --- a/src/layouts/RelayCabinetLayout/GeneraterCiQdConfig.ts +++ b/src/layouts/RelayCabinetLayout/GeneraterCiQdConfig.ts @@ -96,6 +96,20 @@ upScreenDoorQdList.forEach((qdData) => { }); }); +const garageDoorQdList = [ + { + code: 'CKM', + refDeviceCodes: [['kMJ'], ['GMJ']], + }, +]; + +const carWashingQdList = [ + { + code: 'XCJ1', + refDeviceCodes: [['XQJ'], ['TWJ1'], ['TWJ2'], ['TWJ3'], ['TGQJ']], + }, +]; + watch(changeScreenDoorGroup, (group) => { downScreenDoorQdList[0].refDeviceCodes = [['XGMJ']]; if (group?.length == 1) { @@ -160,4 +174,6 @@ export const ciQdMap = new Map([ ], [`${DeviceType.ScreenDoor}+down`, downScreenDoorQdList], [`${DeviceType.ScreenDoor}+up`, upScreenDoorQdList], + [`${DeviceType.GarageDoor}+undefined`, garageDoorQdList], + [`${DeviceType.CarWashing}+undefined`, carWashingQdList], ]); diff --git a/src/layouts/RelayCabinetLayout/GeneraterRelayLayoutConfig.ts b/src/layouts/RelayCabinetLayout/GeneraterRelayLayoutConfig.ts index 000bcc6..9a7904c 100644 --- a/src/layouts/RelayCabinetLayout/GeneraterRelayLayoutConfig.ts +++ b/src/layouts/RelayCabinetLayout/GeneraterRelayLayoutConfig.ts @@ -427,6 +427,105 @@ const powerScreenCombinations = [ }, ]; +//车库门 +const garageDoorCombinations = [ + { + code: 'CKM', + refDeviceCodesAndModel: [ + { + code: 'MKJ', + model: RelayModelType.JWXC_1700, + }, + { + code: 'MGJ', + model: RelayModelType.JWXC_1700, + }, + { + code: 'MGZJ', + model: RelayModelType.JWXC_1700, + }, + { + code: 'MPLJ', + model: RelayModelType.JWXC_1700, + }, + { + code: 'MMSJ', + model: RelayModelType.JWXC_1700, + }, + { + code: 'kMJ', + model: RelayModelType.JWXC_1700, + }, + { + code: 'GMJ', + model: RelayModelType.JWXC_1700, + }, + ], + }, +]; + +//洗车机 +const carWashingCombinations = [ + { + code: 'XCJ1', + refDeviceCodesAndModel: [ + { + code: 'XQJ', + model: RelayModelType.JWXC_1700, + }, + { + code: 'TWJ1', + model: RelayModelType.JWXC_1700, + }, + { + code: 'TWJ2', + model: RelayModelType.JWXC_1700, + }, + { + code: 'TWJ3', + model: RelayModelType.JWXC_1700, + }, + { + code: 'TGQJ', + model: RelayModelType.JWXC_1700, + }, + ], + }, + { + code: 'XCJ2', + refDeviceCodesAndModel: [ + { + code: 'XCIXJ', + model: RelayModelType.JWXC_1700, + }, + { + code: 'XCYXJ', + model: RelayModelType.JWXC_1700, + }, + { + code: 'CFJ1', + model: RelayModelType.JWXC_1700, + }, + { + code: 'CFJ2', + model: RelayModelType.JWXC_1700, + }, + { + code: 'CFJ3', + model: RelayModelType.JWXC_1700, + }, + { + code: 'JTJ', + model: RelayModelType.JWXC_1700, + }, + { + code: 'TGYXJ', + model: RelayModelType.JWXC_1700, + }, + ], + }, +]; + const DeviceType = graphicData.RelatedRef.DeviceType; export const combinationsMap = new Map([ [ @@ -469,4 +568,6 @@ export const combinationsMap = new Map([ [`${DeviceType.SignalFaultAlarm}`, signalFaultAlarmCombinations], [`${DeviceType.Breakers}`, breakersCombinations], [`${DeviceType.PowerScreen}`, powerScreenCombinations], + [`${DeviceType.GarageDoor}`, garageDoorCombinations], + [`${DeviceType.CarWashing}`, carWashingCombinations], ]); diff --git a/src/layouts/RelayCabinetLayout/RelayCabinetLayout.vue b/src/layouts/RelayCabinetLayout/RelayCabinetLayout.vue index cd445bb..39770dc 100644 --- a/src/layouts/RelayCabinetLayout/RelayCabinetLayout.vue +++ b/src/layouts/RelayCabinetLayout/RelayCabinetLayout.vue @@ -736,6 +736,38 @@ function oneClickGeneraterRelayLayout() { ); } }); + //车库门 + storage.garageDoors.forEach((garageDoor) => { + const deviceCombinations = combinationsMap.get( + `${DeviceType.GarageDoor}` + ); + if ( + garageDoor.centralizedStations.includes(concentrationStation) && + deviceCombinations + ) { + creatDeviceRelateRelays( + deviceCombinations, + DeviceType.GarageDoor, + garageDoor.code + ); + } + }); + //洗车机 + storage.carWashings.forEach((carWashing) => { + const deviceCombinations = combinationsMap.get( + `${DeviceType.CarWashing}` + ); + if ( + carWashing.centralizedStations.includes(concentrationStation) && + deviceCombinations + ) { + creatDeviceRelateRelays( + deviceCombinations, + DeviceType.CarWashing, + carWashing.code + ); + } + }); //信号机故障报警仪-电源屏-断路器 const aboveCombinations = [ {