Files
ALL-teach_sys/frontend_环保/testTeacherMapping.js

50 lines
1.7 KiB
JavaScript
Raw Normal View History

import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
// 读取日历数据
const calendarPath = path.join(__dirname, 'src/data/intelligentManufacturingCalendar.json');
const calendarData = JSON.parse(fs.readFileSync(calendarPath, 'utf-8'));
// 统计企业高管公开课
console.log('企业高管公开课的导师分配情况:');
const executiveCourses = {};
calendarData.forEach(event => {
if (event['企业高管公开课'] && event['企业高管公开课'].trim()) {
const courseName = event['企业高管公开课'];
const teacherName = event['导师姓名查询'] || '未分配';
if (!executiveCourses[courseName]) {
executiveCourses[courseName] = teacherName;
}
}
});
Object.entries(executiveCourses).forEach(([course, teacher]) => {
console.log(` ${course}: ${teacher}`);
});
// 统计营销能力课
console.log('\n营销能力课的导师分配情况');
const marketingCourses = {};
calendarData.forEach(event => {
if (event['公共课'] && event['课程阶段(公共课)'] === '营销能力课') {
const courseName = event['公共课'];
const teacherName = event['导师姓名查询'] || '未分配';
if (!marketingCourses[courseName]) {
marketingCourses[courseName] = teacherName;
}
}
});
Object.entries(marketingCourses).forEach(([course, teacher]) => {
console.log(` ${course}: ${teacher}`);
});
// 检查mockData.js中的教师数据
console.log('\n\nmockData.js应该包含以下导师');
console.log('- 周伏波 (公共课导师)');
console.log('- 孙应战 (营销课导师)');
console.log('- 何晓凯 (有营销经验,可作为备用营销课导师)');