feat: 修改导入处理逻辑以支持状态持久化
- handleFileSuccess: 清除旧数据,保存新任务初始状态 - handleImportComplete: 更新localStorage中的完整任务状态 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -687,6 +687,26 @@ export default {
|
||||
if (response.code === 200) {
|
||||
const taskId = response.data.taskId;
|
||||
|
||||
// 清除旧的导入记录(防止并发)
|
||||
if (this.pollingTimer) {
|
||||
clearInterval(this.pollingTimer);
|
||||
this.pollingTimer = null;
|
||||
}
|
||||
|
||||
this.clearImportTaskFromStorage();
|
||||
|
||||
// 保存新任务的初始状态
|
||||
this.saveImportTaskToStorage({
|
||||
taskId: taskId,
|
||||
status: 'PROCESSING',
|
||||
timestamp: Date.now(),
|
||||
hasFailures: false
|
||||
});
|
||||
|
||||
// 重置状态
|
||||
this.showFailureButton = false;
|
||||
this.currentTaskId = taskId;
|
||||
|
||||
// 显示后台处理提示
|
||||
this.$notify({
|
||||
title: '导入任务已提交',
|
||||
|
||||
Reference in New Issue
Block a user