测试调整

This commit is contained in:
joylink_zhaoerwei 2023-12-27 13:21:10 +08:00
parent a0b9e27e71
commit 91d290abf1

View File

@ -306,7 +306,13 @@ function toggleItem(index: number) {
const select: JlGraphic[] = [];
setAlartTextData.value.groupList[index].deviceInfos.forEach(
(deviceInfo) => {
const g = lineApp.queryStore.queryById(deviceInfo.deviceName);
const deviceType = (
Object.keys(DeviceType) as Array<keyof typeof DeviceType>
).find((key) => DeviceType[key] === deviceInfo.deviceType) as string;
const g = lineApp.queryStore.queryByCodeAndType(
deviceInfo.deviceName,
deviceType
) as JlGraphic;
select.push(g);
}
);
@ -316,6 +322,21 @@ function toggleItem(index: number) {
}
}
function clickSelectCenter(index: number) {
const lineApp = lineStore.getLineApp();
const clickTarget = setAlartTextData.value.groupList[clickIndex as number];
const deviceType = (
Object.keys(DeviceType) as Array<keyof typeof DeviceType>
).find(
(key) => DeviceType[key] === clickTarget.deviceInfos[index].deviceType
) as string;
const clickGraphic = lineApp.queryStore.queryByCodeAndType(
clickTarget.deviceInfos[index].deviceName,
deviceType
) as JlGraphic;
lineApp.makeGraphicCenterShow(clickGraphic);
}
function removeSelect(removeIndex: number) {
const clickTarget = setAlartTextData.value.groupList[clickIndex as number];
selectGraphic.splice(removeIndex, 1);