diff --git a/gui_app.py b/gui_app.py index f95f657..e998b35 100644 --- a/gui_app.py +++ b/gui_app.py @@ -737,6 +737,8 @@ class MainWindow(QMainWindow): self.batch_total_tasks = 0 # 总任务数 self.batch_processed = 0 # 已处理任务数 self.batch_pending_tasks = 0 # 待处理任务数 + self.batch_success_count = 0 # 成功数量 + self.batch_failed_count = 0 # 失败数量 self.table_model = None self.table_proxy = None self.log_match_positions = [] @@ -3083,9 +3085,12 @@ class MainWindow(QMainWindow): self.current_batch_task_index = 0 # 4. 清空行映射(用于状态回写) self._row_map_by_user_index = {} - # 5. 重置所有状态卡片显示 + # 5. 重置成功/失败计数变量(确保导入新Excel时完全清空上一次的统计) + self.batch_success_count = 0 + self.batch_failed_count = 0 + # 6. 重置所有状态卡片显示 self.set_status_cards(update_text="未更新", pending=0, running=0, success=0, failed=0) - # 6. 重置进度条 + # 7. 重置进度条 if hasattr(self, "status_running_progress"): self.status_running_progress.setValue(0)