答辩级 UI 改造:指挥台驾驶舱/证据地图/演化生命线/成长路线图/候选审核台

- 驾驶舱改'人才能力变化指挥台':变化事件流主图+可信度卡+行动卡+播报卡
- 图谱子图同心分层布局、技能变化角标、系统发现折叠入右栏、主操作收敛
- 演化页双 Tab(岗位报告/全岗位扫描)+ 能力生命线 Swimlane + 更替流
- 学习路径成长路线图:概要条/示范路线/预计投入/标记完成联动
- 新增候选审核台抽屉 + GET /api/stats/credibility
- 简历裸姓名/专硕提取修复(桌面真实简历验收通过)+ BGE-M3 加载提示
This commit is contained in:
RoyirinRosmontis
2026-08-19 12:14:39 +08:00
parent ac6d08cdf2
commit 0b198e9976
9 changed files with 1002 additions and 238 deletions
+28
View File
@@ -336,6 +336,34 @@ def graph() -> dict:
# ---------- JD 导入(异步任务) ----------
@app.get("/api/stats/credibility")
def credibility_stats() -> dict:
"""数据可信度指标(驾驶舱「数据可信度」卡):
有效 JD 数 / 独立企业数 / 来源类型数 / 人工复核率 / 异常剔除率。
人工复核率 = 审核留痕数 / (留痕数 + 待审候选数)。"""
jd_dir = resolve(_cfg, "jd_raw_dir")
records, _ = load_jd_dir(jd_dir)
total = len(records)
valid = [r for r in records if not r.is_noise and not r.is_duplicate]
companies = {r.company for r in valid if r.company}
sources = sorted({r.source for r in valid if r.source})
audit = state_db.get_audit(_db_path(), limit=200)
reviewed = sum(1 for r in audit if r.get("kind") != "node_update")
pending = len(load_pending(_db_path()))
denom = reviewed + pending
return _ok({
"jd_total": total,
"jd_valid": len(valid),
"companies": len(companies),
"sources": len(sources),
"source_names": sources,
"reviewed": reviewed,
"pending": pending,
"review_rate": (reviewed / denom) if denom else None,
"excluded_rate": ((total - len(valid)) / total) if total else 0.0,
})
def _run_task(task_id: str) -> None:
task = _state["tasks"][task_id]
try: