修改继电器布局
This commit is contained in:
parent
8e62b39f34
commit
94060bd5e8
@ -159,11 +159,15 @@ export function generateRelayLayout(relays: GenerateRelaysCongig[]) {
|
||||
relays[i].deviceCode == relays[i - 1].deviceCode &&
|
||||
relays[i].combinationCode == relays[i - 1].combinationCode &&
|
||||
relays[i].code != 'GJ' &&
|
||||
relays[i].combinationCode != 'GJ'
|
||||
relays[i].combinationCode != 'GJ' &&
|
||||
relays[i].code != 'IKCJ' &&
|
||||
relays[i].combinationCode != 'IKC'
|
||||
) {
|
||||
relayGroupElement.push(relays[i]);
|
||||
} else if (relays[i].code == 'GJ' && relays[i].combinationCode == 'GJ') {
|
||||
relayGroupElement.push(relays[i]);
|
||||
} else if (relays[i].code == 'IKCJ' && relays[i].combinationCode == 'IKC') {
|
||||
relayGroupElement.push(relays[i]);
|
||||
} else {
|
||||
relayGroup.push(relayGroupElement);
|
||||
relayGroupElement = [];
|
||||
@ -175,7 +179,9 @@ export function generateRelayLayout(relays: GenerateRelaysCongig[]) {
|
||||
(item) =>
|
||||
item.deviceCode !== undefined &&
|
||||
item.code !== 'GJ' &&
|
||||
item.combinationCode !== 'GJ'
|
||||
item.combinationCode !== 'GJ' &&
|
||||
item.code !== 'IKCJ' &&
|
||||
item.combinationCode !== 'IKC'
|
||||
);
|
||||
const LSCombination = relayGroupElement.filter(
|
||||
(item) => item.deviceCode == undefined
|
||||
@ -183,15 +189,21 @@ export function generateRelayLayout(relays: GenerateRelaysCongig[]) {
|
||||
const allSectionCombination = relayGroupElement.filter(
|
||||
(item) => item.code == 'GJ' && item.combinationCode == 'GJ'
|
||||
);
|
||||
const allPlatfoemCombination = relayGroupElement.filter(
|
||||
(item) => item.code == 'IKCJ' && item.combinationCode == 'IKC'
|
||||
);
|
||||
relayGroup.push(lastCombination);
|
||||
if (allSectionCombination.length) {
|
||||
relayGroup.push(lastCombination);
|
||||
for (let i = 0; i < allSectionCombination.length; i += 11) {
|
||||
relayGroup.push(allSectionCombination.slice(i, i + 11));
|
||||
}
|
||||
relayGroup.push(LSCombination);
|
||||
} else {
|
||||
relayGroup.push(lastCombination, LSCombination);
|
||||
}
|
||||
if (allPlatfoemCombination.length) {
|
||||
for (let i = 0; i < allPlatfoemCombination.length; i += 11) {
|
||||
relayGroup.push(allPlatfoemCombination.slice(i, i + 11));
|
||||
}
|
||||
}
|
||||
relayGroup.push(LSCombination);
|
||||
|
||||
const relayCabinet = generateRelayCabinet(relayGroup.length / 10);
|
||||
for (let i = 0; i < relayCabinet.length; i++) {
|
||||
|
@ -287,6 +287,7 @@ import {
|
||||
import { ciCjMap, CjData, PostionType } from './GeneraterCiCjConfig';
|
||||
import { ciQdMap, QdData } from './GeneraterCiQdConfig';
|
||||
import { ibpGraphicData } from 'src/protos/ibpGraphics';
|
||||
import { platform } from 'os';
|
||||
|
||||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
@ -670,6 +671,7 @@ function oneClickGeneraterRelayLayout() {
|
||||
hasMKX: false,
|
||||
hasSPKS: false,
|
||||
};
|
||||
const allNeedGenaratePlatform: graphicData.Platform[] = [];
|
||||
storage.stations.forEach((station) => {
|
||||
const deviceCombinations = combinationsMap.get(`${DeviceType.station}`);
|
||||
if (manageStations.includes(station.common.id) && deviceCombinations) {
|
||||
@ -683,20 +685,7 @@ function oneClickGeneraterRelayLayout() {
|
||||
stationManagePlatformsRefEsb = Array.from(
|
||||
new Set(stationManagePlatformsRefEsb)
|
||||
);
|
||||
//站台--关联的扣车继电器
|
||||
const deviceCombinationsOfPlatform = combinationsMap.get(
|
||||
`${DeviceType.Platform}`
|
||||
);
|
||||
if (
|
||||
generaterRelayLayout.value.generateIKCJRelay &&
|
||||
deviceCombinationsOfPlatform
|
||||
) {
|
||||
creatDeviceRelateRelays(
|
||||
deviceCombinationsOfPlatform,
|
||||
DeviceType.Platform,
|
||||
platform.code
|
||||
);
|
||||
}
|
||||
allNeedGenaratePlatform.push(platform);
|
||||
}
|
||||
});
|
||||
const stationManageScreenDoor: number[] = [];
|
||||
@ -864,6 +853,7 @@ function oneClickGeneraterRelayLayout() {
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
//区段继电器
|
||||
if (generaterRelayLayout.value.generateSectionRelay) {
|
||||
storage.section.forEach((section) => {
|
||||
@ -881,6 +871,21 @@ function oneClickGeneraterRelayLayout() {
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
//站台--关联的扣车继电器
|
||||
if (generaterRelayLayout.value.generateIKCJRelay) {
|
||||
const deviceCombinationsOfPlatform = combinationsMap.get(
|
||||
`${DeviceType.Platform}`
|
||||
);
|
||||
if (deviceCombinationsOfPlatform) {
|
||||
allNeedGenaratePlatform.forEach((platform) => {
|
||||
creatDeviceRelateRelays(
|
||||
deviceCombinationsOfPlatform,
|
||||
DeviceType.Platform,
|
||||
platform.code
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
//信号机故障报警仪-电源屏-断路器-LS设备
|
||||
const aboveCombinations = [
|
||||
|
Loading…
Reference in New Issue
Block a user