Squashed commit of the following:
All checks were successful
CI / Docker-Build (push) Successful in 2m54s

commit 8e62b39f34
Author: joylink_zhaoerwei <Bob_Engineer@163.com>
Date:   Tue Jun 25 09:16:17 2024 +0800

    继电器状态图显示调整+spks生成调整
This commit is contained in:
joylink_zhaoerwei 2024-06-25 09:45:26 +08:00
parent 99a7cdfae0
commit 4cc5330ec9
2 changed files with 44 additions and 10 deletions

View File

@ -119,7 +119,10 @@ let ciQdList = sceneCiCjQdListMap.get(
) as relayCabinetGraphicData.CiQd;
const dialogWidth = computed(() => {
return setCellMessage.value.cols * 134 + 85;
if (setCellMessage.value.cols * 134 + 85 <= 1157) {
return setCellMessage.value.cols * 134 + 85;
}
return 1157;
});
watch(
@ -143,8 +146,11 @@ watch(
);
onMounted(() => {
setCellMessage.value.rows = ciCjList.dsCount;
setCellMessage.value.cols = ciCjList.cjList.length;
setCellMessage.value.rows = Math.max(ciCjList.dsCount, ciQdList.dsCount);
setCellMessage.value.cols = Math.max(
ciCjList.cjList.length,
ciQdList.qdList.length
);
tabList.value[0].ListMap = updateCiCjListMap();
tabList.value[1].ListMap = updateCiQdListMap();
});

View File

@ -279,9 +279,14 @@ import {
ShowCodeType,
} from './GeneraterRelayLayoutConfig';
import { generateRelayLayout, GenerateRelaysCongig } from './GeneraterDevice';
import { getPublishMapInfoById, pageQuery } from 'src/api/PublishApi';
import {
getPublishMapInfoById,
getPublishMapInfoByName,
pageQuery,
} from 'src/api/PublishApi';
import { ciCjMap, CjData, PostionType } from './GeneraterCiCjConfig';
import { ciQdMap, QdData } from './GeneraterCiQdConfig';
import { ibpGraphicData } from 'src/protos/ibpGraphics';
const $q = useQuasar();
const route = useRoute();
@ -533,6 +538,7 @@ async function openGeneraterRelayLayoutDialog() {
let storage: graphicData.RtssGraphicStorage;
const stationMap = new Map<number, string>();
let hasSPKS = false;
async function onChoosePublishId() {
const response = await getPublishMapInfoById(
+generaterRelayLayout.value.publishId
@ -555,6 +561,31 @@ async function onChoosePublishId() {
screenDoorGroup.unshift(config.trainGroupAmount);
});
changeScreenDoorGroup.value = screenDoorGroup;
if (storage.ibpBoxs.length) {
checkIbpSpks(storage.ibpBoxs[0].refIbpMapCode).then((has) => {
if (has) {
hasSPKS = true;
}
});
}
}
async function checkIbpSpks(refIbpMapCode: string) {
const { proto } = await getPublishMapInfoByName({
name: refIbpMapCode,
detail: true,
});
if (proto) {
const storage = ibpGraphicData.IBPGraphicStorage.deserialize(
toUint8Array(proto)
);
for (let i = 0; i < storage.ibpKeys.length; i++) {
if (storage.ibpKeys[i].code.includes('SPKS')) {
return true;
}
}
return false;
}
}
const myForm = ref<QForm | null>(null);
@ -692,12 +723,9 @@ function oneClickGeneraterRelayLayout() {
}
}
//ibpBoxibpspks
for (let i = 0; i < storage.ibpBoxs.length; i++) {
if (station.common.id == storage.ibpBoxs[i].refStationId) {
hasEMP_MKX_SPKS.hasSPKS = true;
handleDeviceCombinations.push(deviceCombinations[1]);
break;
}
if (hasSPKS) {
hasEMP_MKX_SPKS.hasSPKS = true;
handleDeviceCombinations.push(deviceCombinations[1]);
}
creatDeviceRelateRelays(
handleDeviceCombinations,