代码调整

This commit is contained in:
dong 2023-09-22 10:03:02 +08:00
parent ff8a4f1c07
commit 03b8ebd4f1
2 changed files with 14 additions and 4 deletions

View File

@ -159,10 +159,14 @@ watch(
selectGraphic.push(...deviceFilter);
}
selectGraphic = Array.from(new Set(selectGraphic));
setAlartTextData.value.deviceCodes = selectGraphic.map((g) => g.code);
selectGraphic.forEach((g) => {
g.updateSelected(true);
val.forEach((item) => {
if (selectGraphic.includes(item as JlGraphic)) {
item.updateSelected(true);
} else {
item.updateSelected(false);
}
});
setAlartTextData.value.deviceCodes = selectGraphic.map((g) => g.code);
}
}
);

View File

@ -175,8 +175,14 @@ watch(
}
selectGraphic = Array.from(new Set(selectGraphic));
setAlartTextData.value.deviceInfos = [];
val.forEach((item) => {
if (selectGraphic.includes(item as JlGraphic)) {
item.updateSelected(true);
} else {
item.updateSelected(false);
}
});
selectGraphic.forEach((g) => {
g.updateSelected(true);
setAlartTextData.value.deviceInfos.push({
deviceName: g.code,
deviceType: (DeviceType as never)[g.type + ''],