- 包含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>
87 lines
3.3 KiB
Python
87 lines
3.3 KiB
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import os
|
|
import shutil
|
|
import json
|
|
|
|
print("配置面试状态动画文件...")
|
|
|
|
# 源文件夹和目标文件夹
|
|
source_dir = '/Users/apple/Documents/cursor/教务系统/frontend_大健康/网页未导入数据/岗位面试状态/'
|
|
animations_dir = '/Users/apple/Documents/cursor/教务系统/frontend_大健康/src/assets/animations/interviewStatus/'
|
|
|
|
# 确保目标目录存在
|
|
os.makedirs(animations_dir, exist_ok=True)
|
|
|
|
# 状态文件映射
|
|
status_files = {
|
|
'1-off_初筛未通过.json': '1-off_初筛未通过.json',
|
|
'2-off_面试未通过.json': '2-off_面试未通过.json',
|
|
'3-off_未参与面试.json': '3-off_未参与面试.json',
|
|
'4-off_拒绝Offer.json': '4-off_拒绝Offer.json',
|
|
'4-on_收到Offer.json': '4-on_收到Offer.json',
|
|
}
|
|
|
|
# 复制文件
|
|
copied_count = 0
|
|
for source_file, target_file in status_files.items():
|
|
source_path = os.path.join(source_dir, source_file)
|
|
target_path = os.path.join(animations_dir, target_file)
|
|
|
|
if os.path.exists(source_path):
|
|
shutil.copy2(source_path, target_path)
|
|
print(f"✓ 复制动画文件: {source_file}")
|
|
copied_count += 1
|
|
else:
|
|
print(f"✗ 文件不存在: {source_file}")
|
|
|
|
print(f"\n共复制了 {copied_count} 个动画文件到 src/assets/animations/interviewStatus/")
|
|
|
|
# 根据当前的面试状态数据,创建状态与动画的映射
|
|
print("\n分析面试状态数据,创建映射关系...")
|
|
|
|
with open('/Users/apple/Documents/cursor/教务系统/frontend_大健康/src/data/interviewStatus.json', 'r', encoding='utf-8') as f:
|
|
interview_status = json.load(f)
|
|
|
|
# 提取所有独特的状态文本
|
|
status_types = set()
|
|
for item in interview_status:
|
|
# 从"面试状态"字段提取主要状态类型
|
|
status_text = item['面试状态']
|
|
if '简历筛选未通过' in status_text or '简历未通过' in status_text:
|
|
status_types.add('简历筛选未通过')
|
|
elif '面试未通过' in status_text:
|
|
status_types.add('面试未通过')
|
|
elif '未参与面试' in status_text:
|
|
status_types.add('未参与面试')
|
|
elif 'Offer已拒绝' in status_text:
|
|
status_types.add('Offer已拒绝')
|
|
elif 'Offer已接收' in status_text or 'Offer已接受' in status_text:
|
|
status_types.add('Offer已接收')
|
|
|
|
print("\n识别到的状态类型:")
|
|
for status_type in status_types:
|
|
print(f" - {status_type}")
|
|
|
|
# 创建状态映射配置
|
|
status_animation_mapping = {
|
|
'简历筛选未通过': '1-off_初筛未通过.json',
|
|
'简历未通过': '1-off_初筛未通过.json',
|
|
'HR初筛未通过': '1-off_初筛未通过.json',
|
|
'面试未通过': '2-off_面试未通过.json',
|
|
'未参与面试': '3-off_未参与面试.json',
|
|
'Offer已拒绝': '4-off_拒绝Offer.json',
|
|
'拒绝Offer': '4-off_拒绝Offer.json',
|
|
'Offer已接收': '4-on_收到Offer.json',
|
|
'Offer已接受': '4-on_收到Offer.json',
|
|
'收到Offer': '4-on_收到Offer.json',
|
|
}
|
|
|
|
# 保存映射配置
|
|
mapping_file = '/Users/apple/Documents/cursor/教务系统/frontend_大健康/src/data/statusAnimationMapping.json'
|
|
with open(mapping_file, 'w', encoding='utf-8') as f:
|
|
json.dump(status_animation_mapping, f, ensure_ascii=False, indent=2)
|
|
|
|
print(f"\n✓ 状态动画映射配置已保存到: statusAnimationMapping.json")
|
|
print("\n面试状态动画配置完成!") |