完善批量同步失败的设备

This commit is contained in:
ChenYi 2026-07-01 17:02:27 +08:00
parent f17cc21c57
commit cb3f0c1190

View File

@ -2705,23 +2705,31 @@ async function handleBatchSync() {
}
try {
//
batchSyncLoading.value = true;
pageLoading.value = true;
loadingTip.value = '正在提交批量同步任务...';
const body: any = { ioTPlatform: ioTPlatform!, ioTPlatformProductId };
if (selectedAddresses.length > 0) {
body.deviceAddresses = selectedAddresses;
}
const resp = await postAggregationDeviceBatchSyncFromOneNETAsync({ body });
if (resp.data) {
Message.success('批量同步设备信息成功');
gridApi.reload();
//
Message.success(
'批量同步任务已提交,正在后台执行,请稍后刷新列表查看同步结果',
);
} else {
Message.error('批量同步设备信息失败');
Message.error('批量同步任务提交失败');
}
} catch (error) {
console.error('批量同步设备信息失败:', error);
Message.error('批量同步设备信息失败');
console.error('批量同步任务提交失败:', error);
Message.error('批量同步任务提交失败');
} finally {
batchSyncLoading.value = false;
pageLoading.value = false;
loadingTip.value = '缓存刷新中...';
}
}