岗位覆盖扩充至 26 个 + 图谱岗位子图模式
- 新增 8 岗位族(大数据/机器学习/机器人/数据治理/边缘计算/物联网安全/智能系统架构/隐私计算),词表 161→179 - 图谱详情面板新增'岗位子图'模式(只看该岗位及一跳邻居,徽标可退出) - 测试集扩至 176 条、匹配标注 52 对;real_jd_500 F1 99.82%;合成三项 100% 保持
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
filters: { types: { Job: true, Skill: true, Industry: true, Scenario: true }, category: "", level: "",
|
||||
edges: { required: true, preferred: true, applies: true, belongs: true } },
|
||||
selected: null, // 选中节点 id
|
||||
soloJob: null, // 岗位子图模式:只看该岗位及其一跳邻居
|
||||
hover: null,
|
||||
navStack: [], // 详情面板导航栈
|
||||
drag: null, // {mode:'pan'|'node', ...}
|
||||
@@ -161,6 +162,9 @@
|
||||
}
|
||||
function visible(n) {
|
||||
if (!G.filters.types[n.type]) return false;
|
||||
if (G.soloJob) { // 岗位子图:只保留该岗位与一跳邻居
|
||||
if (n.id !== G.soloJob && !neighborsOf(G.soloJob).has(n.id)) return false;
|
||||
}
|
||||
if (n.type === "Job") {
|
||||
if (G.filters.category && n.category !== G.filters.category) return false;
|
||||
if (G.filters.level && jobLevel(n) !== G.filters.level) return false;
|
||||
@@ -597,6 +601,18 @@
|
||||
}
|
||||
CN.gotoNode = locateNode;
|
||||
|
||||
function updateSoloBadge() {
|
||||
const badge = $("#solo-badge");
|
||||
if (!badge) return;
|
||||
badge.classList.toggle("hidden", !G.soloJob);
|
||||
if (G.soloJob) {
|
||||
const n = G.nodes[G.idx[G.soloJob]];
|
||||
$("#solo-badge-text").textContent = `岗位子图:${(n && (n.title || n.id)) || G.soloJob}`;
|
||||
}
|
||||
}
|
||||
const soloExit = $("#solo-exit");
|
||||
if (soloExit) soloExit.onclick = () => { G.soloJob = null; updateSoloBadge(); requestDraw(); };
|
||||
|
||||
/* ================= 备注(localStorage) ================= */
|
||||
const getNotes = () => JSON.parse(localStorage.getItem(NOTES_KEY) || "{}");
|
||||
function nodeNotes(id) { return getNotes()[id] || []; }
|
||||
@@ -720,6 +736,7 @@
|
||||
<button class="btn btn-secondary btn-sm" id="dt-sources">查看来源</button>`}
|
||||
<button class="btn btn-secondary btn-sm" id="dt-note">添加备注</button>
|
||||
${n.type === "Job" && !isPending ? `<button class="btn btn-secondary btn-sm" id="dt-evo">查看演化</button>
|
||||
<button class="btn btn-secondary btn-sm" id="dt-solo">岗位子图</button>
|
||||
<button class="btn btn-primary btn-sm full" id="dt-learn">生成学习路径</button>` : ""}
|
||||
</div>
|
||||
</div>
|
||||
@@ -765,6 +782,13 @@
|
||||
$("#evo-job-select").value = id;
|
||||
$("#evo-job-select").dispatchEvent(new Event("change"));
|
||||
};
|
||||
const soloBtn = $("#dt-solo");
|
||||
if (soloBtn) soloBtn.onclick = () => {
|
||||
G.soloJob = G.soloJob === id ? null : id;
|
||||
updateSoloBadge();
|
||||
requestDraw();
|
||||
if (G.soloJob) toast(`已进入「${n.title || id}」岗位子图(只看该岗位与一跳技能/场景/行业)`, "success");
|
||||
};
|
||||
const learnBtn = $("#dt-learn");
|
||||
if (learnBtn) learnBtn.onclick = () => {
|
||||
CN.switchView("path");
|
||||
|
||||
Reference in New Issue
Block a user