Commit c7fe08c5 authored by Data Governance Dev's avatar Data Governance Dev

feat(web2): IdCardTool 进度条 UI + 异步扫描轮询

配合后端三端点改造前端:
- POST 立即拿 scan_id → 不阻塞 UI
- setInterval 800ms 轮询 /progress 更新 el-progress
- status=done → 拉 /result → 渲染命中列清单 + 折叠问题表

UI 改造:
- 新增「扫描进度」卡片:旋转 Loading 图标 + el-progress 百分比 +
  done/total 计数 + 耗时 + 当前列名
- 「重置」按钮同时停轮询、清进度状态

onQuery 拆三个函数:
- onQuery()      启动 + 立即首次轮询
- pollProgress() 拉进度;status=done/error 自动收尾
- fetchResult()  拉最终结果

踩坑(production build 不会报 import 缺失):
之前改 IdCardTool 加 computed() 时漏了 import 'computed',
dev 模式 Vite 红屏能看出来,production build 只打包不校验,
运行时 ReferenceError 只出现在浏览器 console,server log 完全没痕迹。
这次提交补回 import。

踩坑见 work-logs/2026-08-17.md 第七章。
parent c4ed1b5c
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment