测试调整

This commit is contained in:
joylink_zhaoerwei 2023-12-27 09:47:24 +08:00
parent e97a677c3b
commit a0b9e27e71

View File

@ -134,10 +134,8 @@ const setAlartTextData = ref<{
groupId?: string;
status: string;
deviceInfos: {
groupId?: string;
deviceName: string;
deviceType: string;
status: string;
}[];
expanded: boolean;
}[];
@ -224,16 +222,11 @@ watch(
selectGraphic = Array.from(new Set(selectGraphic));
lineStore.getLineApp().updateSelected(...selectGraphic);
setAlartTextData.value.groupList[clickIndex].deviceInfos = [];
const status = setAlartTextData.value.groupList[clickIndex].status;
const groupId =
setAlartTextData.value.groupList[clickIndex].groupId || '';
selectGraphic.forEach((g) => {
setAlartTextData.value.groupList[clickIndex as number].deviceInfos.push(
{
deviceName: g.code,
deviceType: (DeviceType as never)[g.type + ''],
status,
groupId,
}
);
});
@ -262,7 +255,19 @@ async function onSubmit() {
myForm.value?.validate().then(async (res) => {
if (res) {
const deviceInfos = setAlartTextData.value.groupList
.map((item) => item.deviceInfos)
.map((group) => {
const deviceInfo = group.deviceInfos.map((deviceInfo) => {
const status = group.status;
const groupId = group.groupId || '';
return {
deviceName: deviceInfo.deviceName,
deviceType: deviceInfo.deviceType,
status,
groupId,
};
});
return deviceInfo;
})
.flat();
try {
const params = {