初始化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:
KQL
2025-09-24 14:14:14 +08:00
commit cd2e307402
8380 changed files with 6105118 additions and 0 deletions

View File

@@ -0,0 +1,121 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json
import re
# 读取原始的mock文件来获取项目列表中的positions数据
with open('src/mocks/projectLibraryMock.js', 'r', encoding='utf-8') as f:
content = f.read()
# 提取projects数组
projects_match = re.search(r'const projects = (\[[\s\S]*?\]);', content)
if not projects_match:
print("未找到projects数组")
exit(1)
# 解析projects数组
projects_list = json.loads(projects_match.group(1))
# 创建ID到positions的映射
positions_map = {}
for project in projects_list:
project_id = project['id']
positions = []
# 将positions字符串数组转换为对象数组
if 'positions' in project and project['positions']:
for pos in project['positions']:
# 根据岗位名称判断等级
if '助理' in pos or '技术员' in pos or 'CAD制图员' in pos:
level = '普通岗'
elif '工程师' in pos or '主管' in pos or '设计师' in pos and '助理' not in pos:
level = '技术骨干岗'
elif '经理' in pos or '总监' in pos:
level = '储备干部岗'
else:
level = '技术骨干岗' # 默认为技术骨干岗
positions.append({
'level': level,
'position': pos
})
positions_map[project_id] = positions
# 现在更新getMockProjectDetail函数
# 找到getMockProjectDetail函数的起始位置
function_start = content.find('export const getMockProjectDetail = (id) => {')
if function_start == -1:
print("未找到getMockProjectDetail函数")
exit(1)
# 找到函数结束位置
function_end = content.find('\n};', function_start) + 3
# 提取函数内部的projects数组
inner_match = re.search(r'const projects = (\[[\s\S]*?\]);', content[function_start:function_end])
if not inner_match:
print("未找到函数内的projects数组")
exit(1)
# 解析内部projects数组
inner_projects = json.loads(inner_match.group(1))
# 更新每个项目的positions字段
for project in inner_projects:
if project['id'] in positions_map:
project['positions'] = positions_map[project['id']]
# 重新构建函数
new_function = '''// 项目详情Mock数据 - 智能制造
export const getMockProjectDetail = (id) => {
// 直接根据ID返回对应项目的详情
const projects = '''
new_function += json.dumps(inner_projects, ensure_ascii=False, indent=2)
new_function += ''';
const project = projects.find(p => p.id === parseInt(id));
if (project) {
return {
success: true,
data: {
id: project.id,
title: project.name,
overview: project.overview || '暂无项目概述',
applicablePositions: project.positions || [],
units: [project.unit],
process: project.process || '项目流程详情暂未录入',
keyPoints: project.keyPoints || '关键技术点暂未录入',
// 附件板块保留,但显示暂无附件
attachments: []
}
};
}
return {
success: false,
message: "项目不存在"
};
};'''
# 替换函数
new_content = content[:function_start] + new_function + content[function_end:]
# 写回文件
with open('src/mocks/projectLibraryMock.js', 'w', encoding='utf-8') as f:
f.write(new_content)
print("✅ 成功修复项目详情中的岗位数据!")
# 打印一些示例
for i in range(min(3, len(inner_projects))):
project = inner_projects[i]
print(f"\n项目 {project['id']}: {project['name']}")
print(f" 岗位数量: {len(project['positions'])}")
if project['positions']:
for pos in project['positions'][:3]:
print(f" - {pos['position']} ({pos['level']})")