Files
teach_sys_Demo/compare_calendar_with_json.cjs
KQL 1b964b3886 chore: 更新数据文件和组件优化
主要更新内容:
- 优化UI组件(视频播放器、HR访问模态框、岗位信息展示等)
- 更新数据文件(简历、岗位、项目案例等)
- 添加新的图片资源(面试状态图标等)
- 新增AgentPage等页面组件
- 清理旧的备份文件,提升代码库整洁度
- 优化岗位等级和面试状态的数据结构

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-15 15:55:25 +08:00

57 lines
2.6 KiB
JavaScript

const fs = require('fs');
const path = require('path');
// 读取日历课程列表
const calendarListPath = path.join(__dirname, 'calendar_courses_list.json');
const calendarCourses = JSON.parse(fs.readFileSync(calendarListPath, 'utf-8'));
// 读取作业海报JSON
const posterPath = path.join(__dirname, '网页未导入数据/文旅产业/文旅_作业海报.json');
const posterData = JSON.parse(fs.readFileSync(posterPath, 'utf-8'));
const posterNames = posterData.map(d => d['课程名称']);
console.log('===== 日历课程 vs 作业海报数据对比 =====\n');
// 复合技能课程对比
console.log('【复合技能阶段】');
console.log(`日历中的课程数: ${calendarCourses.compound.length}`);
const compoundMatched = calendarCourses.compound.filter(name => posterNames.includes(name));
const compoundNotMatched = calendarCourses.compound.filter(name => !posterNames.includes(name));
console.log(`在作业海报中找到的: ${compoundMatched.length}`);
console.log(`未找到海报的: ${compoundNotMatched.length}`);
if (compoundNotMatched.length > 0) {
console.log('\n未找到海报的复合技能课程:');
compoundNotMatched.forEach(name => console.log(` - ${name}`));
}
// 垂直方向课程对比
console.log('\n\n【垂直方向阶段】');
console.log(`日历中的课程数: ${calendarCourses.vertical.length}`);
const verticalMatched = calendarCourses.vertical.filter(name => posterNames.includes(name));
const verticalNotMatched = calendarCourses.vertical.filter(name => !posterNames.includes(name));
console.log(`在作业海报中找到的: ${verticalMatched.length}`);
console.log(`未找到海报的: ${verticalNotMatched.length}`);
if (verticalNotMatched.length > 0) {
console.log('\n未找到海报的垂直方向课程:');
verticalNotMatched.forEach(name => console.log(` - ${name}`));
}
// 总计
console.log('\n\n===== 总计 =====');
console.log(`日历总课程数: ${calendarCourses.all.length}`);
console.log(`可匹配海报的: ${compoundMatched.length + verticalMatched.length}`);
console.log(`无海报的: ${compoundNotMatched.length + verticalNotMatched.length}`);
// 作业海报中未被使用的
const allCalendarCourses = [...calendarCourses.compound, ...calendarCourses.vertical];
const unusedPosters = posterNames.filter(name => !allCalendarCourses.includes(name));
const uniqueUnused = [...new Set(unusedPosters)];
console.log(`\n作业海报中有但日历未使用的: ${uniqueUnused.length}`);
if (uniqueUnused.length < 50) {
console.log('\n未被日历使用的海报课程:');
uniqueUnused.forEach(name => console.log(` - ${name}`));
}