diff --git a/webui/app.js b/webui/app.js index 62f3875..cc12a9c 100644 --- a/webui/app.js +++ b/webui/app.js @@ -1301,7 +1301,7 @@ function renderEvoReplace(jobId) { } /* ================= 人岗匹配(三步向导) ================= */ -const matchState = { step: 1, skills: [], years: 0, result: null, profileText: "" }; +const matchState = { step: 1, skills: [], years: 0, result: null, profileText: "", scenarios: [] }; let lastProfile = null; // 最近一次解析的完整简历画像(结构化模板与导出用) function setMatchStep(n) { @@ -1387,6 +1387,7 @@ function applyParsedProfile(p, sourceDesc) { matchState.profileText = p.raw_masked_text || ""; matchState.skills = [...p.skills]; matchState.years = p.years || 0; + matchState.scenarios = [...(p.scenarios || [])]; // 场景经验参与匹配评分(此前解析后未传入) $("#resume-text").value = p.raw_masked_text || ""; const studentish = (p.education || "").includes("在读") || /应届|在读|大[一二三四]/.test(p.raw_masked_text || ""); @@ -1450,7 +1451,7 @@ $("#btn-run-match").onclick = async () => { try { const m = await post("/api/match", { job_id: jobId, skills: matchState.skills, years: matchState.years, - scenarios: [], + scenarios: matchState.scenarios, }); matchState.result = m; renderMatchResult(m); @@ -1622,7 +1623,7 @@ async function renderRecJobs(current) { box.innerHTML = `
计算中…
`; const others = CN.jobs.filter((j) => j.job_id !== current.job_id).slice(0, 12); const results = await Promise.all(others.map((j) => - post("/api/match", { job_id: j.job_id, skills: matchState.skills, years: matchState.years, scenarios: [] }) + post("/api/match", { job_id: j.job_id, skills: matchState.skills, years: matchState.years, scenarios: matchState.scenarios }) .then((m) => ({ job: j, m })).catch(() => null))); const top = results.filter(Boolean).sort((a, b) => b.m.total_score - a.m.total_score).slice(0, 3); box.innerHTML = top.map(({ job, m }) => ` diff --git a/webui/index.html b/webui/index.html index 4bfb7f1..57c1e09 100644 --- a/webui/index.html +++ b/webui/index.html @@ -705,7 +705,7 @@ - +