feat(purchase-transaction): 添加clearImportHistory方法
- 添加用户手动清除导入历史功能 - 确认对话框防止误操作 - 清除localStorage中的任务记录 - 重置失败按钮、任务ID和对话框状态 - 操作成功后显示提示消息 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1218,6 +1218,23 @@ export default {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 清除导入历史记录
|
||||
* 用户手动触发
|
||||
*/
|
||||
clearImportHistory() {
|
||||
this.$confirm('确认清除上次导入记录?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.clearImportTaskFromStorage();
|
||||
this.showFailureButton = false;
|
||||
this.currentTaskId = null;
|
||||
this.failureDialogVisible = false;
|
||||
this.$message.success('已清除');
|
||||
}).catch(() => {});
|
||||
},
|
||||
/**
|
||||
* 清除localStorage中的导入任务
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user