Initial commit: 教务系统在线平台
- 包含4个产业方向的前端项目:智能开发、智能制造、大健康、财经商贸 - 已清理node_modules、.yoyo等大文件,项目大小从2.6GB优化至631MB - 配置完善的.gitignore文件 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
64
frontend_智能制造/check_data_integrity.cjs
Normal file
64
frontend_智能制造/check_data_integrity.cjs
Normal file
@@ -0,0 +1,64 @@
|
||||
const fs = require('fs');
|
||||
|
||||
// 读取文件
|
||||
const content = fs.readFileSync('src/mocks/resumeInterviewMock.js', 'utf8');
|
||||
|
||||
// 使用eval来执行JS代码(仅用于调试)
|
||||
try {
|
||||
// 移除export语句
|
||||
const cleanContent = content
|
||||
.replace(/export\s+function/g, 'function')
|
||||
.replace(/export\s+const/g, 'const')
|
||||
.replace(/export\s+\{[^}]+\};?/g, '');
|
||||
|
||||
// 执行代码
|
||||
eval(cleanContent);
|
||||
|
||||
// 检查数据
|
||||
console.log('=== 数据完整性检查 ===\n');
|
||||
|
||||
console.log('Industries数量:', industries.length);
|
||||
console.log('ResumeTemplates键数量:', Object.keys(resumeTemplates).length);
|
||||
|
||||
console.log('\n=== Industries列表 ===');
|
||||
industries.forEach(ind => {
|
||||
console.log(`- ${ind.name} (${ind.positions.length}个岗位, ${ind.questions.length}个面试题组)`);
|
||||
});
|
||||
|
||||
console.log('\n=== ResumeTemplates键列表 ===');
|
||||
Object.keys(resumeTemplates).forEach(key => {
|
||||
const templates = resumeTemplates[key];
|
||||
console.log(`- ${key}: ${templates.length}个模板`);
|
||||
});
|
||||
|
||||
console.log('\n=== 数据匹配检查 ===');
|
||||
industries.forEach(ind => {
|
||||
const hasTemplate = resumeTemplates.hasOwnProperty(ind.name);
|
||||
if (!hasTemplate) {
|
||||
console.log(`❌ ${ind.name} 没有对应的resumeTemplates`);
|
||||
} else {
|
||||
console.log(`✓ ${ind.name} 有 ${resumeTemplates[ind.name].length} 个简历模板`);
|
||||
}
|
||||
});
|
||||
|
||||
console.log('\n=== 简历模板数据结构检查 ===');
|
||||
Object.keys(resumeTemplates).forEach(key => {
|
||||
const templates = resumeTemplates[key];
|
||||
templates.forEach((template, idx) => {
|
||||
const hasContent = !!template.content;
|
||||
const hasOriginal = !!template.content?.original;
|
||||
const hasModified = !!template.content?.modified;
|
||||
const hasStudentInfo = !!template.studentInfo;
|
||||
|
||||
if (!hasContent) {
|
||||
console.log(`❌ ${key}[${idx}] (${template.position}) 缺少content字段`);
|
||||
} else if (!hasOriginal || !hasModified) {
|
||||
console.log(`⚠️ ${key}[${idx}] (${template.position}) content缺少original或modified`);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
} catch (error) {
|
||||
console.error('执行错误:', error.message);
|
||||
console.error('错误位置:', error.stack);
|
||||
}
|
||||
Reference in New Issue
Block a user