学生性别分布/api/stats/student/gender
${barChart(genderRows, true)}
成绩概览全部班级
${detailList([
['成绩记录', `${score.total} 条`],
['平均分', `
${fixed(score.avg_score)}`],
['最高分', fixed(score.max_score)],
['最低分', fixed(score.min_score)],
['及格率', `${pct(score.pass_rate)}(${score.pass_count} 人)`],
])}
就业概览/api/stats/employ/summary
${detailList([
['就业率', `
${pct(emp.employment_rate)}`],
['已就业', `${emp.employed_count} 人`],
['平均月薪', money(emp.avg_salary)],
['最高月薪', money(emp.max_salary)],
['最低月薪', money(emp.min_salary)],
])}
`;
}
/** 统计分析页 */
let statsClsFilter = '';
async function renderStats() {
const main = $('#main');
main.innerHTML = `
性别分布student/gender
${barChart(gender.map((x) => ({ label: x.gender, value: x.count })), true)}
学历分布student/education
${barChart(edu.map((x) => ({ label: x.education, value: x.count })), true)}
就读状态分布student/state
${barChart(state.map((x) => ({ label: x.state, value: x.count })), true)}
生源地 Top 8student/hometown
${barChart(home.map((x) => ({ label: x.hometown, value: x.count })), true)}
成绩等级分布score/distribution
${barChart(sd.map((x) => ({ label: x.score_level, value: x.count })), true)}
就业薪资概览employ/summary
${detailList([
['就业率', `
${pct(emp.employment_rate)}`],
['已就业人数', `${emp.employed_count} 人`],
['平均月薪', money(emp.avg_salary)],
['最高月薪', money(emp.max_salary)],
['最低月薪', money(emp.min_salary)],
])}