防淹门一键关联集中站

This commit is contained in:
joylink_zhaoerwei 2024-03-14 09:46:05 +08:00
parent 2fb6f91372
commit 875a566b38
2 changed files with 7 additions and 0 deletions

View File

@ -16,6 +16,8 @@ import { GarageDoor } from '../garageDoor/GarageDoor';
import { CarWashing } from '../carWashing/CarWashing';
import { GarageDoorData } from 'src/drawApp/graphics/GarageDoorInteraction';
import { CarWashingData } from 'src/drawApp/graphics/CarWashingInteraction';
import { FloodGate } from '../floodGate/FloodGate';
import { FloodGateData } from 'src/drawApp/graphics/FloodGateInteraction';
//判断线段与线段有木有交点
export function isSegmentsIntersect(
@ -176,6 +178,7 @@ export function handleCentralizedStationsData(
[Transponder.Type, new TransponderData()],
[GarageDoor.Type, new GarageDoorData()],
[CarWashing.Type, new CarWashingData()],
[FloodGate.Type, new FloodGateData()],
]);
devices.forEach((device) => {
const data = dataMap.get(device.type);

View File

@ -840,6 +840,9 @@ function oneClickRelateCentralizedStation() {
const carWashings = drawApp.queryStore
.queryByType<CarWashing>(CarWashing.Type)
.filter((g) => containDeviceIds.includes(g.datas.linkSection));
const floodGates = drawApp.queryStore
.queryByType<FloodGate>(FloodGate.Type)
.filter((g) => containDeviceIds.includes(g.datas.linkSection));
const allSetCentralizedStationsDevice = [
...containDevices,
...signals,
@ -847,6 +850,7 @@ function oneClickRelateCentralizedStation() {
...axleCountings,
...garageDoors,
...carWashings,
...floodGates,
];
allSetCentralizedStationsDevice.forEach(
(g) => ((g as Signal).datas.centralizedStations = [])