洗车机和车库门继电器和一键关联集中站
This commit is contained in:
parent
53f1be79e9
commit
ef0637003a
@ -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);
|
||||
|
@ -834,11 +834,19 @@ function oneClickRelateCentralizedStation() {
|
||||
}
|
||||
return false;
|
||||
});
|
||||
const garageDoors = drawApp.queryStore
|
||||
.queryByType<GarageDoor>(GarageDoor.Type)
|
||||
.filter((g) => containDeviceIds.includes(g.datas.linkSection));
|
||||
const carWashings = drawApp.queryStore
|
||||
.queryByType<CarWashing>(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 = [])
|
||||
|
@ -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<string, CjData[]>([
|
||||
[
|
||||
@ -659,4 +868,6 @@ export const ciCjMap = new Map<string, CjData[]>([
|
||||
[`${DeviceType.SignalFaultAlarm}+undefined`, signalFaultAlarmCjList],
|
||||
[`${DeviceType.Breakers}+undefined`, breakersCjList],
|
||||
[`${DeviceType.PowerScreen}+undefined`, powerScreenCjList],
|
||||
[`${DeviceType.GarageDoor}+undefined`, garageDoorCjList],
|
||||
[`${DeviceType.CarWashing}+undefined`, carWashingCjList],
|
||||
]);
|
||||
|
@ -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<string, QdData[]>([
|
||||
],
|
||||
[`${DeviceType.ScreenDoor}+down`, downScreenDoorQdList],
|
||||
[`${DeviceType.ScreenDoor}+up`, upScreenDoorQdList],
|
||||
[`${DeviceType.GarageDoor}+undefined`, garageDoorQdList],
|
||||
[`${DeviceType.CarWashing}+undefined`, carWashingQdList],
|
||||
]);
|
||||
|
@ -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<string, Combinationtype[]>([
|
||||
[
|
||||
@ -469,4 +568,6 @@ export const combinationsMap = new Map<string, Combinationtype[]>([
|
||||
[`${DeviceType.SignalFaultAlarm}`, signalFaultAlarmCombinations],
|
||||
[`${DeviceType.Breakers}`, breakersCombinations],
|
||||
[`${DeviceType.PowerScreen}`, powerScreenCombinations],
|
||||
[`${DeviceType.GarageDoor}`, garageDoorCombinations],
|
||||
[`${DeviceType.CarWashing}`, carWashingCombinations],
|
||||
]);
|
||||
|
@ -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 = [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user