chore: 更新数据文件和组件优化
主要更新内容: - 优化UI组件(视频播放器、HR访问模态框、岗位信息展示等) - 更新数据文件(简历、岗位、项目案例等) - 添加新的图片资源(面试状态图标等) - 新增AgentPage等页面组件 - 清理旧的备份文件,提升代码库整洁度 - 优化岗位等级和面试状态的数据结构 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,100 +1,37 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
// 读取文件
|
||||
const filePath = path.join(__dirname, 'src/mocks/resumeInterviewMock.js');
|
||||
const content = fs.readFileSync(filePath, 'utf-8');
|
||||
const content = fs.readFileSync('src/mocks/resumeInterviewMock.js', 'utf-8');
|
||||
|
||||
// 需要检查的岗位列表
|
||||
const positionsToCheck = [
|
||||
'民宿管家',
|
||||
'民宿客房管家',
|
||||
'民宿运营专员',
|
||||
'露营地运营专员',
|
||||
'新媒体运营专员',
|
||||
'文创产品设计师',
|
||||
'文创产品策划师',
|
||||
'文创产品设计师助理',
|
||||
'品牌策划运营专员',
|
||||
'品牌公关',
|
||||
'品牌推广专员',
|
||||
'ip运营',
|
||||
'IP运营总监助理',
|
||||
'品牌公关管培生'
|
||||
// 需要检查的岗位
|
||||
const positions = [
|
||||
'会展策划师',
|
||||
'会展讲解员',
|
||||
'会展执行助理',
|
||||
'活动执行',
|
||||
'活动策划师',
|
||||
'漫展策划师',
|
||||
'旅游规划师',
|
||||
'旅游计调专员',
|
||||
'景区运营专员',
|
||||
'文旅运营总监助理'
|
||||
];
|
||||
|
||||
console.log('检查岗位数据完整性...');
|
||||
console.log('=' * 50);
|
||||
|
||||
// 提取industries数据
|
||||
const industriesMatch = content.match(/const industries = \[([\s\S]*?)\];/);
|
||||
if (!industriesMatch) {
|
||||
console.log('未找到industries数据');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// 提取resumeTemplates数据
|
||||
const templatesMatch = content.match(/const resumeTemplates = \{([\s\S]*?)\n\};/);
|
||||
if (!templatesMatch) {
|
||||
console.log('未找到resumeTemplates数据');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// 分析每个岗位
|
||||
const results = [];
|
||||
for (const position of positionsToCheck) {
|
||||
// 在industries中查找
|
||||
const industryRegex = new RegExp(`title: "${position}"`, 'g');
|
||||
const industryMatches = [...content.matchAll(industryRegex)];
|
||||
// 检查每个岗位
|
||||
positions.forEach(position => {
|
||||
const regex = new RegExp(`position: "${position}"[\\s\\S]*?实习时间:([^\\n]+)[\\s\\S]*?实习单位:([^\\n]+)`, 'g');
|
||||
const match = regex.exec(content);
|
||||
|
||||
// 在resumeTemplates中查找
|
||||
const templateRegex = new RegExp(`position: "${position}"[\\s\\S]*?studentInfo:`, 'g');
|
||||
const templateMatches = [...content.matchAll(templateRegex)];
|
||||
|
||||
// 检查是否有studentInfo
|
||||
let hasStudentInfo = false;
|
||||
for (const match of templateMatches) {
|
||||
const afterMatch = content.substring(match.index, match.index + 1000);
|
||||
if (afterMatch.includes('studentInfo: {')) {
|
||||
// 检查studentInfo是否包含必要字段
|
||||
const studentInfoEnd = afterMatch.indexOf('},') + match.index;
|
||||
const studentInfoContent = content.substring(match.index, studentInfoEnd);
|
||||
|
||||
hasStudentInfo =
|
||||
studentInfoContent.includes('project_experience:') &&
|
||||
studentInfoContent.includes('core_skills:') &&
|
||||
studentInfoContent.includes('personal_summary:');
|
||||
if (match) {
|
||||
const time = match[1].trim();
|
||||
const company = match[2].trim();
|
||||
|
||||
if (time.includes('XXXX') || company.includes('某某')) {
|
||||
console.log(`❌ ${position}: 时间=${time}, 单位=${company} (包含占位符)`);
|
||||
} else {
|
||||
console.log(`✅ ${position}: 时间=${time}, 单位=${company}`);
|
||||
}
|
||||
} else {
|
||||
console.log(`⚠️ ${position}: 未找到匹配`);
|
||||
}
|
||||
|
||||
results.push({
|
||||
position,
|
||||
inIndustries: industryMatches.length > 0,
|
||||
inTemplates: templateMatches.length > 0,
|
||||
hasStudentInfo
|
||||
});
|
||||
}
|
||||
|
||||
// 输出结果
|
||||
console.log('\n检查结果:\n');
|
||||
console.log('岗位名称 | 在industries中 | 在templates中 | 有studentInfo');
|
||||
console.log('-'.repeat(60));
|
||||
|
||||
let missingCount = 0;
|
||||
for (const result of results) {
|
||||
const status = result.hasStudentInfo ? '✅' : '❌';
|
||||
console.log(`${result.position.padEnd(20)} | ${result.inIndustries ? '是' : '否'} | ${result.inTemplates ? '是' : '否'} | ${status}`);
|
||||
|
||||
if (!result.hasStudentInfo) {
|
||||
missingCount++;
|
||||
}
|
||||
}
|
||||
|
||||
console.log('\n' + '='.repeat(50));
|
||||
console.log(`总计:${results.length}个岗位,${missingCount}个缺少studentInfo数据`);
|
||||
});
|
||||
Reference in New Issue
Block a user