优化批次下载逻辑,通过API获取所有数据以提升数据获取效率,简化错误提示信息

This commit is contained in:
zyh
2025-10-03 10:46:52 +08:00
parent ddb4092ebf
commit c4b642006f

View File

@@ -1045,13 +1045,17 @@ const downloadCurrentBatch = async () => {
try {
batchDownloadDialog.downloading = true
// 根据批次ID筛选当前批次的数据
const currentBatchData = linkList.value.filter(item =>
item.batchId === batchDownloadDialog.batchId
)
// 通过API获取该批次的所有数据不受分页限制
const response = await fetchLinks({
batchId: batchDownloadDialog.batchId,
page: 1,
pageSize: 1000 // 设置一个足够大的值以获取所有数据
})
const currentBatchData = response.data.items || []
if (currentBatchData.length === 0) {
ElMessage.warning('未找到当前批次的数据,请刷新列表后重试')
ElMessage.warning('未找到当前批次的数据,请重试')
return
}