From 82754e40d942f43fdc15845d42cc1ebaf99b201a Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Tue, 2 Apr 2024 14:43:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E6=AE=B5=E6=95=B0=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E7=94=9F=E6=88=90=E6=B4=97=E8=BD=A6=E6=9C=BA=E7=BB=A7?= =?UTF-8?q?=E7=94=B5=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RelayCabinetLayout/GeneraterCiCjConfig.ts | 28 ++++++++++++++++--- .../RelayCabinetLayout/GeneraterCiQdConfig.ts | 20 +++++++++++-- .../GeneraterRelayLayoutConfig.ts | 26 +++++++++++++++-- .../RelayCabinetLayout/RelayCabinetLayout.vue | 7 ++++- 4 files changed, 71 insertions(+), 10 deletions(-) diff --git a/src/layouts/RelayCabinetLayout/GeneraterCiCjConfig.ts b/src/layouts/RelayCabinetLayout/GeneraterCiCjConfig.ts index 8e4a655..0677db3 100644 --- a/src/layouts/RelayCabinetLayout/GeneraterCiCjConfig.ts +++ b/src/layouts/RelayCabinetLayout/GeneraterCiCjConfig.ts @@ -702,7 +702,7 @@ const garageDoorCjList = [ const floodGateCjList = garageDoorCjList; //洗车机 -const carWashingCjList = [ +const threecarWashingCjList = [ { code: 'XCJ1', refDeviceCodesAndPos: [ @@ -743,13 +743,13 @@ const carWashingCjList = [ refDeviceCodesAndPos: [ [ { - code: 'XCIXJ', + code: 'XCJXJ', position: PostionType.Q, }, ], [ { - code: 'XCIXJ', + code: 'XCJXJ', position: PostionType.H, }, ], @@ -829,6 +829,24 @@ const carWashingCjList = [ }, ]; +const twocarWashingCjList = threecarWashingCjList.map((cjData) => ({ + code: cjData.code, + refDeviceCodesAndPos: cjData.refDeviceCodesAndPos + .map((device) => + device.filter((item) => item.code !== 'TWJ3' && item.code !== 'CFJ3') + ) + .filter((item) => item.length > 0), +})); + +const onecarWashingCjList = twocarWashingCjList.map((cjData) => ({ + code: cjData.code, + refDeviceCodesAndPos: cjData.refDeviceCodesAndPos + .map((device) => + device.filter((item) => item.code !== 'TWJ2' && item.code !== 'CFJ2') + ) + .filter((item) => item.length > 0), +})); + const DeviceType = graphicData.RelatedRef.DeviceType; export const ciCjMap = new Map([ [ @@ -872,6 +890,8 @@ export const ciCjMap = new Map([ [`${DeviceType.Breakers}+undefined`, breakersCjList], [`${DeviceType.PowerScreen}+undefined`, powerScreenCjList], [`${DeviceType.GarageDoor}+undefined`, garageDoorCjList], - [`${DeviceType.CarWashing}+undefined`, carWashingCjList], + [`${DeviceType.CarWashing}+3`, threecarWashingCjList], + [`${DeviceType.CarWashing}+2`, twocarWashingCjList], + [`${DeviceType.CarWashing}+1`, onecarWashingCjList], [`${DeviceType.FloodGate}+undefined`, floodGateCjList], ]); diff --git a/src/layouts/RelayCabinetLayout/GeneraterCiQdConfig.ts b/src/layouts/RelayCabinetLayout/GeneraterCiQdConfig.ts index 4656973..fc534b6 100644 --- a/src/layouts/RelayCabinetLayout/GeneraterCiQdConfig.ts +++ b/src/layouts/RelayCabinetLayout/GeneraterCiQdConfig.ts @@ -105,13 +105,27 @@ const garageDoorQdList = [ const floodGateQdList = garageDoorQdList; -const carWashingQdList = [ +const threecarWashingQdList = [ { code: 'XCJ1', refDeviceCodes: [['XQJ'], ['TWJ1'], ['TWJ2'], ['TWJ3'], ['TGQJ']], }, ]; +const twocarWashingQdList = [ + { + code: 'XCJ1', + refDeviceCodes: [['XQJ'], ['TWJ1'], ['TWJ2'], ['TGQJ']], + }, +]; + +const onecarWashingQdList = [ + { + code: 'XCJ1', + refDeviceCodes: [['XQJ'], ['TWJ1'], ['TGQJ']], + }, +]; + watch(changeScreenDoorGroup, (group) => { downScreenDoorQdList[0].refDeviceCodes = [['XGMJ']]; if (group?.length == 1) { @@ -177,6 +191,8 @@ export const ciQdMap = new Map([ [`${DeviceType.ScreenDoor}+down`, downScreenDoorQdList], [`${DeviceType.ScreenDoor}+up`, upScreenDoorQdList], [`${DeviceType.GarageDoor}+undefined`, garageDoorQdList], - [`${DeviceType.CarWashing}+undefined`, carWashingQdList], + [`${DeviceType.CarWashing}+3`, threecarWashingQdList], + [`${DeviceType.CarWashing}+2`, twocarWashingQdList], + [`${DeviceType.CarWashing}+1`, onecarWashingQdList], [`${DeviceType.FloodGate}+undefined`, floodGateQdList], ]); diff --git a/src/layouts/RelayCabinetLayout/GeneraterRelayLayoutConfig.ts b/src/layouts/RelayCabinetLayout/GeneraterRelayLayoutConfig.ts index 622acb1..7501b79 100644 --- a/src/layouts/RelayCabinetLayout/GeneraterRelayLayoutConfig.ts +++ b/src/layouts/RelayCabinetLayout/GeneraterRelayLayoutConfig.ts @@ -468,7 +468,7 @@ const garageDoorCombinations = [ const floodGateCombinations = garageDoorCombinations; //洗车机 -const carWashingCombinations = [ +const threeCarWashingCombinations = [ { code: 'XCJ1', refDeviceCodesAndModel: [ @@ -498,7 +498,7 @@ const carWashingCombinations = [ code: 'XCJ2', refDeviceCodesAndModel: [ { - code: 'XCIXJ', + code: 'XCJXJ', model: RelayModelType.JWXC_1700, }, { @@ -529,6 +529,24 @@ const carWashingCombinations = [ }, ]; +const twoCarWashingCombinations = threeCarWashingCombinations.map( + (combination) => ({ + code: combination.code, + refDeviceCodesAndModel: combination.refDeviceCodesAndModel.filter( + (item) => item.code !== 'TWJ3' && item.code !== 'CFJ3' + ), + }) +); + +const oneCarWashingCombinations = twoCarWashingCombinations.map( + (combination) => ({ + code: combination.code, + refDeviceCodesAndModel: combination.refDeviceCodesAndModel.filter( + (item) => item.code !== 'TWJ2' && item.code !== 'CFJ2' + ), + }) +); + const DeviceType = graphicData.RelatedRef.DeviceType; export const combinationsMap = new Map([ [ @@ -572,6 +590,8 @@ export const combinationsMap = new Map([ [`${DeviceType.Breakers}`, breakersCombinations], [`${DeviceType.PowerScreen}`, powerScreenCombinations], [`${DeviceType.GarageDoor}`, garageDoorCombinations], - [`${DeviceType.CarWashing}`, carWashingCombinations], + [`${DeviceType.CarWashing + '+' + '3'}`, threeCarWashingCombinations], + [`${DeviceType.CarWashing + '+' + '2'}`, twoCarWashingCombinations], + [`${DeviceType.CarWashing + '+' + '1'}`, oneCarWashingCombinations], [`${DeviceType.FloodGate}`, floodGateCombinations], ]); diff --git a/src/layouts/RelayCabinetLayout/RelayCabinetLayout.vue b/src/layouts/RelayCabinetLayout/RelayCabinetLayout.vue index af3529c..b586db8 100644 --- a/src/layouts/RelayCabinetLayout/RelayCabinetLayout.vue +++ b/src/layouts/RelayCabinetLayout/RelayCabinetLayout.vue @@ -770,8 +770,9 @@ function oneClickGeneraterRelayLayout() { }); //洗车机 storage.carWashings.forEach((carWashing) => { + const duanNum = carWashing.duanNum || 3; const deviceCombinations = combinationsMap.get( - `${DeviceType.CarWashing}` + `${DeviceType.CarWashing}+${duanNum}` ); if ( carWashing.centralizedStations.includes(concentrationStation) && @@ -782,6 +783,10 @@ function oneClickGeneraterRelayLayout() { DeviceType.CarWashing, carWashing.code ); + allDeviceModelMap.set( + `${DeviceType.CarWashing}+${carWashing.code}`, + `${carWashing.duanNum}` + ); } }); //信号机故障报警仪-电源屏-断路器