初始化12个产业教务系统项目
主要内容: - 包含12个产业的完整教务系统前端代码 - 智能启动脚本 (start-industry.sh) - 可视化产业导航页面 (index.html) - 项目文档 (README.md) 优化内容: - 删除所有node_modules和.yoyo文件夹,从7.5GB减少到2.7GB - 添加.gitignore文件避免上传不必要的文件 - 自动依赖管理和智能启动系统 产业列表: 1. 文旅产业 (5150) 2. 智能制造 (5151) 3. 智能开发 (5152) 4. 财经商贸 (5153) 5. 视觉设计 (5154) 6. 交通物流 (5155) 7. 大健康 (5156) 8. 土木水利 (5157) 9. 食品产业 (5158) 10. 化工产业 (5159) 11. 能源产业 (5160) 12. 环保产业 (5161) 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
114
frontend_财经商贸/analyzePositionLevels.mjs
Normal file
114
frontend_财经商贸/analyzePositionLevels.mjs
Normal file
@@ -0,0 +1,114 @@
|
||||
import fs from 'fs';
|
||||
|
||||
// 读取生成的项目库Mock数据
|
||||
const mockContent = fs.readFileSync('src/mocks/projectLibraryMock.js', 'utf8');
|
||||
|
||||
// 提取projectDetails对象
|
||||
const detailsMatch = mockContent.match(/const projectDetails = ({[\s\S]*?});[\s\S]*?const detail = projectDetails/);
|
||||
if (!detailsMatch) {
|
||||
console.error('无法提取projectDetails数据');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// 使用eval来解析JavaScript对象(注意:这只在受控环境中使用)
|
||||
let projectDetails;
|
||||
try {
|
||||
eval(`projectDetails = ${detailsMatch[1]}`);
|
||||
} catch (e) {
|
||||
console.error('解析projectDetails失败:', e);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// 统计不同等级的岗位
|
||||
const levelStats = {
|
||||
'普通岗': [],
|
||||
'技术骨干岗': [],
|
||||
'储备干部岗': []
|
||||
};
|
||||
|
||||
// 收集所有岗位信息
|
||||
Object.values(projectDetails).forEach(project => {
|
||||
project.applicablePositions.forEach(pos => {
|
||||
if (levelStats[pos.level]) {
|
||||
// 检查是否已存在该岗位
|
||||
const existing = levelStats[pos.level].find(p => p.name === pos.position);
|
||||
if (existing) {
|
||||
existing.projects.push(project.title);
|
||||
} else {
|
||||
levelStats[pos.level].push({
|
||||
name: pos.position,
|
||||
projects: [project.title]
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 输出统计结果
|
||||
console.log('=====================================');
|
||||
console.log('财经商贸项目库 - 岗位等级详细分析');
|
||||
console.log('=====================================\n');
|
||||
|
||||
console.log('【总体统计】');
|
||||
console.log(`- 普通岗:${levelStats['普通岗'].length} 种岗位`);
|
||||
console.log(`- 技术骨干岗:${levelStats['技术骨干岗'].length} 种岗位`);
|
||||
console.log(`- 储备干部岗:${levelStats['储备干部岗'].length} 种岗位`);
|
||||
console.log(`- 岗位总计:${levelStats['普通岗'].length + levelStats['技术骨干岗'].length + levelStats['储备干部岗'].length} 种岗位`);
|
||||
|
||||
console.log('\n=====================================');
|
||||
console.log('【普通岗位列表】(绿色标签)');
|
||||
console.log('=====================================');
|
||||
levelStats['普通岗'].forEach((pos, index) => {
|
||||
console.log(`${index + 1}. ${pos.name}`);
|
||||
console.log(` 适用项目:`);
|
||||
pos.projects.forEach(proj => {
|
||||
console.log(` - ${proj}`);
|
||||
});
|
||||
});
|
||||
|
||||
console.log('\n=====================================');
|
||||
console.log('【技术骨干岗位列表】(紫色标签)');
|
||||
console.log('=====================================');
|
||||
levelStats['技术骨干岗'].forEach((pos, index) => {
|
||||
console.log(`${index + 1}. ${pos.name}`);
|
||||
console.log(` 适用项目:`);
|
||||
pos.projects.forEach(proj => {
|
||||
console.log(` - ${proj}`);
|
||||
});
|
||||
});
|
||||
|
||||
console.log('\n=====================================');
|
||||
console.log('【储备干部岗位列表】(蓝色标签)');
|
||||
console.log('=====================================');
|
||||
levelStats['储备干部岗'].forEach((pos, index) => {
|
||||
console.log(`${index + 1}. ${pos.name}`);
|
||||
console.log(` 适用项目:`);
|
||||
pos.projects.forEach(proj => {
|
||||
console.log(` - ${proj}`);
|
||||
});
|
||||
});
|
||||
|
||||
// 输出项目与岗位的对应关系
|
||||
console.log('\n=====================================');
|
||||
console.log('【项目-岗位等级分布】');
|
||||
console.log('=====================================');
|
||||
Object.entries(projectDetails).forEach(([id, project]) => {
|
||||
const levelCount = {
|
||||
'普通岗': 0,
|
||||
'技术骨干岗': 0,
|
||||
'储备干部岗': 0
|
||||
};
|
||||
|
||||
project.applicablePositions.forEach(pos => {
|
||||
if (levelCount[pos.level] !== undefined) {
|
||||
levelCount[pos.level]++;
|
||||
}
|
||||
});
|
||||
|
||||
console.log(`\n${id}. ${project.title}`);
|
||||
console.log(` 普通岗: ${levelCount['普通岗']}个 | 技术骨干岗: ${levelCount['技术骨干岗']}个 | 储备干部岗: ${levelCount['储备干部岗']}个`);
|
||||
});
|
||||
|
||||
console.log('\n=====================================');
|
||||
console.log('分析完成!');
|
||||
console.log('=====================================');
|
||||
Reference in New Issue
Block a user