(function () { "use strict"; const palette = { green: "#176b4f", green2: "#2f8f6b", mint: "#72b893", lime: "#c6e66f", blue: "#4d7fa8", amber: "#d39a35", red: "#c65e51", violet: "#7f6aaa", ink: "#27362f", muted: "#718078", line: "#dfe7e1", soft: "#f4f7f4", }; const chartInstances = new Map(); const resizeObserver = typeof ResizeObserver === "function" ? new ResizeObserver((entries) => { entries.forEach((entry) => chartInstances.get(entry.target)?.resize()); }) : null; function clamp(value, min = 0, max = 100) { return Math.max(min, Math.min(max, value)); } function hashString(value) { return [...String(value)].reduce((hash, char) => (hash * 31 + char.charCodeAt(0)) >>> 0, 2166136261); } function firstNumber(value, fallback = 0) { const match = String(value ?? "").replace(/,/g, "").match(/-?\d+(?:\.\d+)?/); return match ? Number(match[0]) : fallback; } function reportScore(report) { if (report.type === "industry" && report.id === "gap-2026-03") return 76.8; if (report.id === "salary-2026-03") return 98; const metric = report.metrics.find((item) => /匹配度|质量评分|竞争力/.test(item.label)); return clamp(firstNumber(metric?.value, 78.6)); } function evidencePrefix(report) { const prefixes = { school: "SCH", college: "COL", profession: "PRO", industry: "IND", quality: "DQA", }; return prefixes[report.type] || "EVD"; } function profileStats(report, seed) { const commonSchoolStats = [ { code: "SCH-EDU-001", label: "全日制在校生", value: "12,860", unit: "人", note: "较上学年 +3.1%", source: "教务管理系统 · 学籍库", updated: "2026-03-20", owner: "教务处", definition: "统计学籍状态为“在籍”的全日制学生,休学学生单列、不重复计入。", }, { code: "SCH-GRA-002", label: "2026届毕业生", value: "4,218", unit: "人", note: "覆盖 32 个专业", source: "教务管理系统 · 毕业生库", updated: "2026-03-20", owner: "教务处", definition: "按预计毕业年份为2026、通过学籍有效性校验的学生去重统计。", }, { code: "SCH-MAJ-003", label: "招生专业", value: "32", unit: "个", note: "分属 6 个学院", source: "专业设置与招生计划", updated: "2026-03-18", owner: "发展规划处", definition: "统计本学年有在校生且处于有效状态的专业,不含停招无在校生专业。", }, { code: "SCH-TEA-004", label: "专任教师", value: "812", unit: "人", note: "双师型占比 64.7%", source: "人事系统 · 教师主数据", updated: "2026-03-15", owner: "人事处", definition: "按在岗专任教师主数据去重;双师型依据校级认定结果计算。", }, { code: "SCH-CRS-005", label: "本学年课程", value: "1,286", unit: "门次", note: "课程标准完整率 96.2%", source: "教务管理系统 · 开课计划", updated: "2026-03-20", owner: "教务处", definition: "按课程代码、教学班和学期统计开课门次;课程标准完整率按已归档标准计。", }, { code: "SCH-ENT-006", label: "有效合作企业", value: "126", unit: "家", note: "近12个月新增 18 家", source: "校企合作项目台账", updated: "2026-03-21", owner: "产教融合中心", definition: "合作协议有效,且近12个月至少有需求确认、课程、项目、实习或就业记录之一。", }, { code: "SCH-EMP-007", label: "2025届去向落实率", value: "93.2", unit: "%", note: "有效回执 3,864 份", source: "就业管理系统 · 去向回执", updated: "2025-12-31", owner: "就业处", definition: "按教育主管部门就业去向统计口径,分母排除经审核的暂不就业特殊样本。", }, { code: "SCH-INT-008", label: "岗位实习对口率", value: "78.4", unit: "%", note: "较上届 +4.6pct", source: "实习管理系统 · 岗位映射", updated: "2026-03-19", owner: "就业处", definition: "实习岗位标准分类与学生所属专业方向达到二级或以上匹配的学生占比。", }, ]; if (report.type === "school" || report.type === "industry" || report.type === "quality") { return commonSchoolStats; } const isCollege = report.type === "college"; const studentCount = isCollege ? 2860 + (seed % 520) : 438 + (seed % 310); const graduateCount = isCollege ? 880 + (seed % 240) : 132 + (seed % 96); const courseCount = isCollege ? 268 + (seed % 80) : 34 + (seed % 19); const teacherCount = isCollege ? 146 + (seed % 45) : 24 + (seed % 14); const enterpriseCount = firstNumber(report.metrics.find((item) => /企业/.test(item.label))?.value, 12); const prefix = evidencePrefix(report); return [ { code: `${prefix}-STU-001`, label: "在校生规模", value: studentCount.toLocaleString("zh-CN"), unit: "人", note: isCollege ? `${report.scope}在籍学生` : "三个年级全日制在籍", source: "教务管理系统 · 学籍库", updated: "2026-03-20", owner: report.author, definition: "按当前报告数据范围过滤后,对有效在籍学生学号去重统计。", }, { code: `${prefix}-GRA-002`, label: "2026届毕业生", value: graduateCount.toLocaleString("zh-CN"), unit: "人", note: "已通过学籍一致性校验", source: "教务管理系统 · 毕业生库", updated: "2026-03-20", owner: report.author, definition: "预计毕业年份为2026且学籍有效的学生,跨专业调整以当前专业归属为准。", }, { code: `${prefix}-CRS-003`, label: "有效开课", value: courseCount.toLocaleString("zh-CN"), unit: "门次", note: "含理论、实训与项目课程", source: "教务管理系统 · 开课计划", updated: "2026-03-20", owner: "教务处", definition: "本学年已经排课且有教学班的课程门次,取消或未开班课程不计入。", }, { code: `${prefix}-TEA-004`, label: "专任教师", value: teacherCount.toLocaleString("zh-CN"), unit: "人", note: `企业兼职导师 ${Math.max(8, Math.round(teacherCount * 0.28))} 人`, source: "教师主数据与导师台账", updated: "2026-03-18", owner: "人事处", definition: "专任教师按在岗主数据统计,企业兼职导师须存在有效聘任或授课记录。", }, { code: `${prefix}-ENT-005`, label: "关联合作企业", value: String(Math.max(enterpriseCount, isCollege ? 26 : 8)), unit: "家", note: `${Math.max(3, Math.round(enterpriseCount * 0.3))} 家有本学期项目`, source: "校企合作项目台账", updated: "2026-03-21", owner: "产教融合中心", definition: "与当前学院或专业存在有效课程、项目、实习、就业或导师关系的企业。", }, { code: `${prefix}-PRJ-006`, label: "企业项目实训", value: String(isCollege ? 18 + (seed % 8) : 6 + (seed % 6)), unit: "项", note: "均有企业任务书或验收记录", source: "项目实训与企业评价库", updated: "2026-03-19", owner: report.author, definition: "纳入统计的项目须具备企业任务书、学生过程产物和至少一项验收证据。", }, ]; } function buildEvidence(report) { const seed = hashString(report.id); const score = reportScore(report); const prefix = evidencePrefix(report); const dimensions = report.bars.slice(0, 5).map((bar, index) => { const school = clamp(firstNumber(bar.value, 72)); const regional = clamp(school - (3 + ((seed + index * 3) % 8))); const peer = clamp(school - (1.4 + ((seed + index * 5) % 5))); const coverageGap = 9 + ((seed + index * 7) % 24); return { name: bar.label, school, regional, peer, demand: school, coverage: clamp(school - coverageGap), attainment: clamp(school - Math.round(coverageGap * 0.68)), confirmed: clamp(school - 5 + ((index * 4) % 11)), }; }); const benchmarkSchoolCount = report.type === "profession" ? 27 : 18; const peerCount = report.type === "profession" ? 11 : 8; const rank = Math.max(1, Math.min(benchmarkSchoolCount, Math.round((100 - score) / 4.8))); const trendBase = clamp(score - 18, 45, 76); const trendLabels = ["2025 Q2", "2025 Q3", "2025 Q4", "2026.01", "2026.02", "2026.03"]; const demandTrend = trendLabels.map((_, index) => clamp(trendBase + index * 4 + ((seed + index) % 3))); const responseTrend = trendLabels.map((_, index) => clamp(trendBase - 7 + index * 3 + ((seed + index * 2) % 3)), ); const heatmap = []; dimensions.forEach((item, row) => { [item.demand, item.coverage, item.attainment, item.confirmed].forEach((value, column) => { heatmap.push([column, row, value]); }); }); const composition = [ { name: "数字技术", value: 34 + (seed % 5) }, { name: "智能制造", value: 28 + ((seed >> 2) % 5) }, { name: "商贸服务", value: 24 + ((seed >> 4) % 5) }, { name: "城建文创", value: 22 + ((seed >> 6) % 4) }, { name: "教育服务", value: 18 + ((seed >> 8) % 4) }, ]; const quadrant = dimensions.map((item, index) => ({ name: item.name, coverage: item.coverage, demand: item.demand, sample: 280 + ((seed + index * 337) % 1720), })); return { score, scoreLabel: report.type === "quality" ? "数据质量评分" : report.id === "salary-2026-03" ? "区域薪资竞争力" : "供需匹配度", benchmark: { regional: clamp(score - 4.8), peer: clamp(score - 2.7), rank, schoolCount: benchmarkSchoolCount, peerCount, sampleText: report.type === "profession" ? `区域 ${benchmarkSchoolCount} 所院校同名或相近专业、同类 ${peerCount} 个专业群` : `区域 ${benchmarkSchoolCount} 所同层次院校、同类 ${peerCount} 所院校`, }, snapshot: { id: "SNP-2026-03-22-0830", records: "128,642", quality: "92.6", coverage: "94.8%", generated: "2026-03-22 09:30", }, dimensions, trend: { labels: trendLabels, demand: demandTrend, response: responseTrend }, heatmap, composition, quadrant, profile: { name: report.type === "school" || report.type === "industry" || report.type === "quality" ? "杭州科技职业技术学院" : `杭州科技职业技术学院 · ${report.scope}`, attributes: [ ["分析对象", report.scope], ["统计周期", report.period], ["数据快照", "2026-03-22 08:30"], ["空间范围", "杭州都市圈 + 校企合作企业"], ], stats: profileStats(report, seed), }, sources: [ { code: `${prefix}-JOB-101`, asset: "互联网基础数据包", source: "区域招聘岗位与薪资基础包", sample: "77,520 条", updated: "2026-03-18", owner: "平台厂商(订阅授权)", confidence: "高", limitation: "反映招聘需求信号,不等于实际录用人数", }, { code: `${prefix}-EDU-102`, asset: "校级数据", source: "学籍、专业、课程与教师主数据", sample: "17,176 条", updated: "2026-03-20", owner: "学校", confidence: "高", limitation: "跨系统统计以学号、专业代码和课程代码归一", }, { code: `${prefix}-EMP-103`, asset: "校级数据", source: "实习、就业与薪资回执", sample: "25,596 条", updated: "2026-03-19", owner: "学校", confidence: "中高", limitation: "薪资缺失或区间异常记录已降权", }, { code: `${prefix}-ENT-104`, asset: "企业数据", source: "126家合作企业需求确认", sample: "8,350 条", updated: "2026-03-21", owner: "合作企业(按协议用途)", confidence: "高", limitation: "仅用于协议约定的专业建设分析", }, ], evidenceCodes: { overall: `${prefix}-CAL-201`, benchmark: `${prefix}-BAS-202`, radar: `${prefix}-SKL-203`, trend: `${prefix}-TRD-204`, matrix: `${prefix}-MAT-205`, composition: `${prefix}-ENT-206`, quadrant: `${prefix}-GAP-207`, threeD: `${prefix}-3DM-208`, }, }; } function svgFrame(content, height = 300, label = "") { return `${content}`; } function gaugeSvg(evidence) { const dash = clamp(evidence.score); return svgFrame( ` ${evidence.score.toFixed(1)} ${evidence.scoreLabel} 区域排名 ${evidence.benchmark.rank}/${evidence.benchmark.schoolCount} 低匹配 高匹配 `, 300, `${evidence.scoreLabel}${evidence.score.toFixed(1)}分`, ); } function groupedBarSvg(evidence) { const width = 680; const labelWidth = 118; const chartWidth = 470; const rowHeight = 47; const colors = [palette.green, palette.blue, palette.amber]; const rows = evidence.dimensions .map((item, index) => { const y = 65 + index * rowHeight; const bars = [item.school, item.regional, item.peer] .map( (value, seriesIndex) => ` ${value.toFixed(0)}`, ) .join(""); return `${item.name.slice(0, 9)}${bars}`; }) .join(""); return svgFrame( ` 本校/本专业 区域均值 同类均值 ${[0, 25, 50, 75, 100] .map( (tick) => ` ${tick}`, ) .join("")} ${rows} `, 325, "学校值、区域均值与同类院校均值对比", ); } function radarPoints(values, radius = 103, centerX = 210, centerY = 145) { return values .map((value, index) => { const angle = -Math.PI / 2 + (index * Math.PI * 2) / values.length; const distance = (value / 100) * radius; return `${centerX + Math.cos(angle) * distance},${centerY + Math.sin(angle) * distance}`; }) .join(" "); } function radarSvg(evidence) { const count = evidence.dimensions.length; const labels = evidence.dimensions .map((item, index) => { const angle = -Math.PI / 2 + (index * Math.PI * 2) / count; const x = 210 + Math.cos(angle) * 132; const y = 145 + Math.sin(angle) * 124; const anchor = x < 185 ? "end" : x > 235 ? "start" : "middle"; return `${item.name.slice(0, 8)}`; }) .join(""); const grids = [20, 40, 60, 80, 100] .map((value) => ``) .join(""); const demand = evidence.dimensions.map((item) => item.demand); const coverage = evidence.dimensions.map((item) => item.coverage); return svgFrame( ` ${grids}${labels} 企业需求强度 课程技能覆盖 最大结构性缺口 ${Math.max( ...evidence.dimensions.map((item) => item.demand - item.coverage), ).toFixed(0)} pct `, 300, "企业需求与课程技能覆盖雷达对比", ); } function linePoints(values, width = 540, height = 190, startX = 75, startY = 32) { return values .map((value, index) => { const x = startX + (index / (values.length - 1)) * width; const y = startY + height - ((value - 40) / 60) * height; return [x, y]; }) .map(([x, y]) => `${x},${y}`) .join(" "); } function trendSvg(evidence) { const demandPoints = linePoints(evidence.trend.demand); const responsePoints = linePoints(evidence.trend.response); const demandArea = `${demandPoints} 615,242 75,242`; return svgFrame( ` ${[40, 55, 70, 85, 100] .map((tick) => { const y = 32 + 190 - ((tick - 40) / 60) * 190; return `${tick}`; }) .join("")} ${evidence.trend.labels .map( (label, index) => `${label}`, ) .join("")} 产业需求 课程调整 `, 285, "产业需求与学校课程调整趋势", ); } function heatColor(value) { if (value >= 85) return "#176b4f"; if (value >= 75) return "#4f9677"; if (value >= 65) return "#9fc7ad"; if (value >= 55) return "#ead09b"; return "#dc897d"; } function heatmapSvg(evidence) { const columns = ["岗位需求", "课程覆盖", "学生达成", "企业确认"]; const cellWidth = 105; const cellHeight = 42; const startX = 190; const startY = 54; const cells = evidence.heatmap .map(([column, row, value]) => { const x = startX + column * cellWidth; const y = startY + row * cellHeight; return ` ${value.toFixed(0)}`; }) .join(""); return svgFrame( ` ${columns .map( (label, index) => `${label}`, ) .join("")} ${evidence.dimensions .map( (item, index) => `${item.name.slice(0, 10)}`, ) .join("")} ${cells} 低 ${["#dc897d", "#ead09b", "#9fc7ad", "#4f9677", "#176b4f"] .map((color, index) => ``) .join("")} 高 `, 300, "技能供需证据热力图", ); } function donutSvg(evidence) { const total = evidence.composition.reduce((sum, item) => sum + item.value, 0); let offset = 0; const colors = [palette.green, palette.blue, palette.amber, palette.violet, palette.mint]; const rings = evidence.composition .map((item, index) => { const percent = (item.value / total) * 100; const circle = ``; offset += percent; return circle; }) .join(""); return svgFrame( ` ${rings} 126 有效合作企业 ${evidence.composition .map( (item, index) => ` ${item.name} ${item.value} 家`, ) .join("")} `, 300, "合作企业产业结构", ); } function quadrantSvg(evidence) { const x = (value) => 70 + ((value - 40) / 60) * 540; const y = (value) => 245 - ((value - 40) / 60) * 200; return svgFrame( ` ${[40, 55, 70, 85, 100] .map( (tick) => ``, ) .join("")} 优势巩固区 高优补强区 ${evidence.quadrant .map((item, index) => { const radius = 11 + Math.sqrt(item.sample) / 8; const color = item.coverage < 70 && item.demand >= 75 ? palette.red : palette.green2; return ` ${item.name.slice(0, 7)}`; }) .join("")} 课程技能覆盖度 → 企业需求强度 → `, 300, "技能优势短板象限图", ); } function isometricSvg(evidence) { const dims = evidence.dimensions.slice(0, 4); const measures = ["需求", "课程", "达成", "确认"]; const colors = [palette.green, palette.blue, palette.amber, palette.violet]; const bars = []; dims.forEach((item, xIndex) => { [item.demand, item.coverage, item.attainment, item.confirmed].forEach((value, yIndex) => { const x = 100 + xIndex * 125 + yIndex * 15; const y = 238 - yIndex * 19; const height = value * 1.55; const color = colors[yIndex]; bars.push(` `); }); }); return svgFrame( ` ${bars.join("")} ${dims .map( (item, index) => `${item.name.slice(0, 7)}`, ) .join("")} ${measures .map( (item, index) => ` ${item}`, ) .join("")} `, 300, "岗位需求与课程覆盖对照图", ); } function chartCard(report, key, figure, title, caption, fallback, options = {}) { const evidence = buildEvidence(report); const interactive = options.interactive !== false; const wideClass = options.wide ? " wide" : ""; return `
FIG ${figure} ${title}
${interactive ? `` : ""}
${fallback}
证据 ${evidence.evidenceCodes[key]} ${caption}
`; } function renderExecutiveCharts(report, options = {}) { const evidence = buildEvidence(report); return `
${chartCard( report, "overall", "1-1", `${evidence.scoreLabel}与区域排名`, `本期得分使用快照 ${evidence.snapshot.id} 中的 ${evidence.snapshot.records} 条有效记录计算;区域排名采用 ${evidence.benchmark.sampleText}。`, gaugeSvg(evidence), options, )} ${chartCard( report, "benchmark", "1-2", "学校值、区域均值与同类均值", `区域基准样本为 ${evidence.benchmark.schoolCount} 所院校,同类基准为 ${evidence.benchmark.peerCount} 所院校;仅比较口径一致且样本量达阈值的指标。`, groupedBarSvg(evidence), options, )}
`; } function renderProfileEvidence(report, options = {}) { const evidence = buildEvidence(report); return `
INSTITUTION FACTS · 学校现状数据

${evidence.profile.name}

学校现状指标只使用校方业务数据;产业需求使用厂商订阅数据,企业确认使用合作授权数据。三类数据分开标识,不用互联网招聘信息替代学校业务数据。

${evidence.profile.attributes.map(([label, value]) => `${label}${value}`).join("")}
${evidence.profile.stats .map( (item) => `
${item.code} ${item.label} ${item.value}${item.unit} ${item.note}
查看证据口径
来源${item.source} 更新时间${item.updated} 责任部门${item.owner}

${item.definition}

`, ) .join("")}
${chartCard( report, "composition", "2-1", "学校合作企业产业结构", "企业须同时具备有效协议和近12个月业务记录;126家合作企业都能找到对应的协议、需求、课程、项目、实习或就业记录。", donutSvg(evidence), options, )} ${chartCard( report, "radar", "2-2", "企业需求与课程技能覆盖", "需求强度来自77,520条去重岗位和8,350条企业确认记录;课程覆盖来自1,286门次课程标准的技能映射,映射覆盖率94.8%。", radarSvg(evidence), options, )}
`; } function renderSupplyVisuals(report, options = {}) { const evidence = buildEvidence(report); return `
${chartCard( report, "trend", "4-1", "产业需求与课程调整趋势", "需求序列按每月新增岗位、企业确认和薪资变化计算;课程调整序列按课程覆盖、实训项目和学生考核结果计算,二者均以2025年二季度为对比起点。", trendSvg(evidence), options, )} ${chartCard( report, "matrix", "4-2", "技能供需证据热力矩阵", "每个单元格都列出对应的岗位样本、课程标准、学生项目结果和企业确认记录;低于60分时需要业务负责人复核。", heatmapSvg(evidence), options, )} ${chartCard( report, "quadrant", "4-3", "技能优势与短板优先级", "横轴为课程技能覆盖,纵轴为企业需求强度,气泡面积代表有效岗位样本量。左上象限为高需求、低覆盖的优先补强区。", quadrantSvg(evidence), options, )} ${chartCard( report, "threeD", "4-4", "岗位需求与课程覆盖数据表", "立体柱高同时呈现岗位需求、课程覆盖、学生达成和企业确认四个观察面。在线版支持拖拽旋转,下载版保留固定等距视图。", isometricSvg(evidence), { ...options, wide: false }, )}
`; } function renderEvidenceLedger(report) { const evidence = buildEvidence(report); return `
本报告快照${evidence.snapshot.id} 有效记录${evidence.snapshot.records} 质量评分${evidence.snapshot.quality} 技能映射覆盖${evidence.snapshot.coverage}
01原始记录保留来源、权属、时间戳 02数据处理去重、统一名称、降低异常数据权重 03指标计算样本阈值与基准校验 04结论复核AI生成、业务负责人确认
${evidence.sources .map( (source) => ` `, ) .join("")}
证据编号数据资产 / 来源有效样本更新时间权属责任置信度已知限制
${source.code} ${source.asset}${source.source} ${source.sample} ${source.updated} ${source.owner} ${source.confidence} ${source.limitation}
证据使用边界

校内学生、课程、教师、实习和就业数据以学校业务系统为准;互联网岗位只用于判断外部需求变化;企业数据只在协议授权范围内用于确认需求。任何单一来源都不能直接决定专业撤并或招生调整。

`; } function chartOption(kind, evidence) { const baseText = { color: palette.ink, fontFamily: '"PingFang SC","Microsoft YaHei",sans-serif', }; const axisLine = { lineStyle: { color: "#dfe7e1" } }; const axisLabel = { color: palette.muted, fontSize: 13 }; const splitLine = { lineStyle: { color: "#e8eee9" } }; if (kind === "overall") { return { animationDuration: 800, series: [ { type: "gauge", startAngle: 210, endAngle: -30, min: 0, max: 100, splitNumber: 5, center: ["50%", "58%"], radius: "82%", progress: { show: true, width: 18, roundCap: true, itemStyle: { color: palette.green } }, axisLine: { roundCap: true, lineStyle: { width: 18, color: [ [0.6, "#f2d7a5"], [0.8, "#9bc8b0"], [1, "#d9eba5"], ], }, }, pointer: { show: true, length: "56%", width: 5, itemStyle: { color: palette.ink }, }, anchor: { show: true, size: 12, itemStyle: { color: palette.ink } }, axisTick: { distance: -25, splitNumber: 2, length: 5, lineStyle: { color: "#82948a" } }, splitLine: { distance: -27, length: 10, lineStyle: { color: "#82948a", width: 1 } }, axisLabel: { distance: -43, color: palette.muted, fontSize: 13, formatter: (value) => (value === 0 || value === 100 ? "" : value), }, title: { offsetCenter: [0, "71%"], color: palette.muted, fontSize: 13 }, detail: { valueAnimation: true, offsetCenter: [0, "24%"], fontSize: 42, fontWeight: 800, color: palette.ink, formatter: "{value}", }, data: [{ value: evidence.score.toFixed(1), name: `${evidence.scoreLabel} · 排名 ${evidence.benchmark.rank}/${evidence.benchmark.schoolCount}` }], }, ], }; } if (kind === "benchmark") { return { animationDuration: 700, color: [palette.green, palette.blue, palette.amber], tooltip: { trigger: "axis", axisPointer: { type: "shadow" } }, legend: { top: 2, textStyle: baseText, itemWidth: 12, itemHeight: 8 }, grid: { left: 105, right: 25, top: 48, bottom: 24 }, xAxis: { type: "value", max: 100, axisLine, axisLabel, splitLine }, yAxis: { type: "category", inverse: true, data: evidence.dimensions.map((item) => item.name), axisLine, axisTick: { show: false }, axisLabel: { ...axisLabel, width: 88, overflow: "truncate" }, }, series: [ { name: "本校/本专业", type: "bar", data: evidence.dimensions.map((item) => item.school), barMaxWidth: 9 }, { name: "区域均值", type: "bar", data: evidence.dimensions.map((item) => item.regional), barMaxWidth: 9 }, { name: "同类均值", type: "bar", data: evidence.dimensions.map((item) => item.peer), barMaxWidth: 9 }, ], }; } if (kind === "composition") { return { animationDuration: 800, color: [palette.green, palette.blue, palette.amber, palette.violet, palette.mint], tooltip: { trigger: "item", formatter: "{b}
{c} 家 · {d}%" }, legend: { type: "scroll", orient: "vertical", right: 12, top: "center", textStyle: baseText }, graphic: [ { type: "text", left: "28%", top: "42%", style: { text: "126", fill: palette.ink, font: "800 30px sans-serif", textAlign: "center" } }, { type: "text", left: "25%", top: "55%", style: { text: "合作企业", fill: palette.muted, font: "12px sans-serif", textAlign: "center" } }, ], series: [ { type: "pie", radius: ["45%", "70%"], center: ["32%", "51%"], roseType: "radius", itemStyle: { borderColor: "#fff", borderWidth: 3, borderRadius: 5 }, label: { show: false }, data: evidence.composition, }, ], }; } if (kind === "radar") { return { animationDuration: 800, color: [palette.green, palette.amber], tooltip: { trigger: "item" }, legend: { top: 3, textStyle: baseText }, radar: { center: ["50%", "55%"], radius: "63%", indicator: evidence.dimensions.map((item) => ({ name: item.name, max: 100 })), axisName: { color: palette.muted, fontSize: 13 }, splitNumber: 5, splitArea: { areaStyle: { color: ["#fbfcfb", "#f4f8f5"] } }, splitLine, axisLine: { lineStyle: { color: "#dfe7e1" } }, }, series: [ { type: "radar", symbolSize: 6, lineStyle: { width: 2.5 }, areaStyle: { opacity: 0.14 }, data: [ { name: "企业需求强度", value: evidence.dimensions.map((item) => item.demand) }, { name: "课程技能覆盖", value: evidence.dimensions.map((item) => item.coverage) }, ], }, ], }; } if (kind === "trend") { return { animationDuration: 800, color: [palette.green, palette.amber], tooltip: { trigger: "axis" }, legend: { top: 2, textStyle: baseText }, grid: { left: 44, right: 18, top: 45, bottom: 38 }, xAxis: { type: "category", boundaryGap: false, data: evidence.trend.labels, axisLine, axisLabel }, yAxis: { type: "value", min: 40, max: 100, axisLine, axisLabel, splitLine }, dataZoom: [{ type: "inside" }], series: [ { name: "产业需求", type: "line", smooth: true, symbolSize: 7, data: evidence.trend.demand, lineStyle: { width: 3 }, areaStyle: { color: { type: "linear", x: 0, y: 0, x2: 0, y2: 1, colorStops: [ { offset: 0, color: "rgba(23,107,79,.28)" }, { offset: 1, color: "rgba(23,107,79,.02)" }, ], }, }, }, { name: "课程调整", type: "line", smooth: true, symbolSize: 7, data: evidence.trend.response, lineStyle: { width: 3, type: "dashed" }, }, ], }; } if (kind === "matrix") { return { animationDuration: 700, tooltip: { position: "top", formatter: (params) => `${evidence.dimensions[params.value[1]].name}
${["岗位需求", "课程覆盖", "学生达成", "企业确认"][params.value[0]]}:${params.value[2]}`, }, grid: { left: 105, right: 46, top: 26, bottom: 65 }, xAxis: { type: "category", data: ["岗位需求", "课程覆盖", "学生达成", "企业确认"], splitArea: { show: true }, axisLine, axisLabel: { ...axisLabel, interval: 0, rotate: 18 }, }, yAxis: { type: "category", data: evidence.dimensions.map((item) => item.name), splitArea: { show: true }, axisLine, axisLabel: { ...axisLabel, width: 88, overflow: "truncate" }, }, visualMap: { min: 40, max: 100, calculable: true, orient: "horizontal", left: "center", bottom: 2, inRange: { color: ["#dc897d", "#ead09b", "#9fc7ad", "#176b4f"] }, textStyle: axisLabel, itemWidth: 12, itemHeight: 110, }, series: [ { type: "heatmap", data: evidence.heatmap, label: { show: true, color: palette.ink, fontWeight: 700 }, itemStyle: { borderColor: "#fff", borderWidth: 3, borderRadius: 5 }, emphasis: { itemStyle: { shadowBlur: 10, shadowColor: "rgba(0,0,0,.2)" } }, }, ], }; } if (kind === "quadrant") { return { animationDuration: 800, tooltip: { formatter: (params) => `${params.data[3]}
课程覆盖:${params.data[0]}
需求强度:${params.data[1]}
岗位样本:${params.data[2]}条`, }, grid: { left: 48, right: 24, top: 25, bottom: 46 }, xAxis: { name: "课程技能覆盖度", min: 40, max: 100, axisLine, axisLabel, splitLine }, yAxis: { name: "企业需求强度", min: 40, max: 100, axisLine, axisLabel, splitLine }, visualMap: { show: false, min: 200, max: 2000, dimension: 2, inRange: { color: [palette.mint, palette.green], symbolSize: [16, 48] }, }, series: [ { type: "scatter", data: evidence.quadrant.map((item) => [item.coverage, item.demand, item.sample, item.name]), label: { show: true, position: "top", formatter: (params) => params.data[3], color: palette.ink, fontSize: 13 }, itemStyle: { borderColor: "#fff", borderWidth: 2, opacity: 0.86 }, markLine: { silent: true, symbol: "none", lineStyle: { color: palette.amber, type: "dashed" }, label: { color: palette.muted, fontSize: 13 }, data: [{ xAxis: 70, name: "覆盖阈值" }, { yAxis: 75, name: "需求阈值" }], }, }, ], }; } if (kind === "threeD") { const axis3D = { type: "category", axisLabel: { color: palette.muted, fontSize: 13, interval: 0 }, axisLine: { lineStyle: { color: "#bfcac3" } }, splitLine: { lineStyle: { color: "#e2e9e4" } }, }; const values = []; evidence.dimensions.slice(0, 5).forEach((item, xIndex) => { [item.demand, item.coverage, item.attainment, item.confirmed].forEach((value, yIndex) => { values.push([xIndex, yIndex, value]); }); }); return { animationDuration: 900, tooltip: { formatter: (params) => `${evidence.dimensions[params.value[0]].name}
${["岗位需求", "课程覆盖", "学生达成", "企业确认"][params.value[1]]}:${params.value[2]}`, }, visualMap: { min: 40, max: 100, calculable: true, orient: "vertical", right: 0, top: "center", inRange: { color: ["#e1a263", "#90bda2", "#176b4f", "#c6e66f"] }, textStyle: axisLabel, itemWidth: 12, itemHeight: 110, }, xAxis3D: { ...axis3D, data: evidence.dimensions.slice(0, 5).map((item) => item.name) }, yAxis3D: { ...axis3D, data: ["岗位需求", "课程覆盖", "学生达成", "企业确认"] }, zAxis3D: { type: "value", min: 0, max: 100, axisLabel: { color: palette.muted, fontSize: 13 }, axisLine: { lineStyle: { color: "#bfcac3" } }, splitLine: { lineStyle: { color: "#e2e9e4" } }, }, grid3D: { boxWidth: 125, boxDepth: 72, boxHeight: 72, environment: "#fbfcfb", light: { main: { intensity: 1.2, shadow: true }, ambient: { intensity: 0.55 } }, viewControl: { alpha: 24, beta: 35, distance: 180, autoRotate: false, rotateSensitivity: 1 }, }, series: [ { type: "bar3D", data: values, shading: "lambert", bevelSize: 0.3, bevelSmoothness: 3, itemStyle: { opacity: 0.94 }, emphasis: { itemStyle: { color: palette.lime } }, }, ], }; } return {}; } function dispose(root) { const scope = root || document; scope.querySelectorAll?.("[data-report-chart]").forEach((element) => { const instance = chartInstances.get(element); if (!instance) return; resizeObserver?.unobserve(element); instance.dispose(); chartInstances.delete(element); }); } function init(report, root) { if (!window.echarts || !root) return; const evidence = buildEvidence(report); root.querySelectorAll("[data-report-chart]").forEach((element) => { const kind = element.dataset.reportChart; let instance; try { instance = window.echarts.init(element, null, { renderer: "canvas", devicePixelRatio: Math.min(window.devicePixelRatio || 1, 2), }); instance.setOption(chartOption(kind, evidence), true); chartInstances.set(element, instance); resizeObserver?.observe(element); element.closest(".report-chart-stage")?.classList.add("is-interactive"); } catch (error) { instance?.dispose(); console.warn(`图表 ${kind} 使用静态降级视图`, error); } }); } function resizeAll() { chartInstances.forEach((instance) => instance.resize()); } window.addEventListener("resize", resizeAll, { passive: true }); window.ReportVisuals = Object.freeze({ buildEvidence, renderExecutiveCharts, renderProfileEvidence, renderSupplyVisuals, renderEvidenceLedger, init, dispose, resizeAll, }); })();