初始化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:
283
frontend_视觉设计/src/constants/statusMap.js
Normal file
283
frontend_视觉设计/src/constants/statusMap.js
Normal file
@@ -0,0 +1,283 @@
|
||||
// Status mapping constants for converting between frontend and backend values
|
||||
|
||||
// Application status mapping
|
||||
export const APPLICATION_STATUS_MAP = {
|
||||
// Backend -> Frontend
|
||||
toFrontend: {
|
||||
'SCHEDULED': 'applied',
|
||||
'COMPLETED': 'interview_success',
|
||||
'CANCELLED': 'interview_failed',
|
||||
'NO_SHOW': 'not_applied',
|
||||
},
|
||||
// Frontend -> Backend
|
||||
toBackend: {
|
||||
'not_applied': null,
|
||||
'applied': 'SCHEDULED',
|
||||
'interview_success': 'COMPLETED',
|
||||
'accepted': 'COMPLETED',
|
||||
'interview_failed': 'CANCELLED',
|
||||
},
|
||||
};
|
||||
|
||||
// Enrollment status mapping
|
||||
export const ENROLLMENT_STATUS_MAP = {
|
||||
// Backend values
|
||||
NOT_STARTED: {
|
||||
text: '未开始',
|
||||
color: '#999999',
|
||||
progress: 0,
|
||||
},
|
||||
IN_PROGRESS: {
|
||||
text: '学习中',
|
||||
color: '#3b82f6',
|
||||
progress: 50,
|
||||
},
|
||||
COMPLETED: {
|
||||
text: '已完成',
|
||||
color: '#10b981',
|
||||
progress: 100,
|
||||
},
|
||||
};
|
||||
|
||||
// Interview status mapping
|
||||
export const INTERVIEW_STATUS_MAP = {
|
||||
// Backend values
|
||||
SCHEDULED: {
|
||||
text: '待面试',
|
||||
color: '#f59e0b',
|
||||
icon: 'clock',
|
||||
},
|
||||
COMPLETED: {
|
||||
text: '已完成',
|
||||
color: '#10b981',
|
||||
icon: 'check',
|
||||
},
|
||||
CANCELLED: {
|
||||
text: '已取消',
|
||||
color: '#ef4444',
|
||||
icon: 'close',
|
||||
},
|
||||
NO_SHOW: {
|
||||
text: '未到场',
|
||||
color: '#6b7280',
|
||||
icon: 'warning',
|
||||
},
|
||||
};
|
||||
|
||||
// Interview result mapping
|
||||
export const INTERVIEW_RESULT_MAP = {
|
||||
PASS: {
|
||||
text: '通过',
|
||||
color: '#10b981',
|
||||
applicationStatus: 'interview_success',
|
||||
},
|
||||
FAIL: {
|
||||
text: '未通过',
|
||||
color: '#ef4444',
|
||||
applicationStatus: 'interview_failed',
|
||||
},
|
||||
PENDING: {
|
||||
text: '待定',
|
||||
color: '#f59e0b',
|
||||
applicationStatus: 'applied',
|
||||
},
|
||||
OFFER: {
|
||||
text: '已发Offer',
|
||||
color: '#10b981',
|
||||
applicationStatus: 'accepted',
|
||||
},
|
||||
};
|
||||
|
||||
// Job type mapping
|
||||
export const JOB_TYPE_MAP = {
|
||||
// Backend -> Frontend display
|
||||
FULLTIME: {
|
||||
text: '全职',
|
||||
value: 'fulltime',
|
||||
color: '#3b82f6',
|
||||
},
|
||||
PARTTIME: {
|
||||
text: '兼职',
|
||||
value: 'parttime',
|
||||
color: '#8b5cf6',
|
||||
},
|
||||
INTERNSHIP: {
|
||||
text: '实习',
|
||||
value: 'internship',
|
||||
color: '#ec4899',
|
||||
},
|
||||
CONTRACT: {
|
||||
text: '合同制',
|
||||
value: 'contract',
|
||||
color: '#f59e0b',
|
||||
},
|
||||
REMOTE: {
|
||||
text: '远程',
|
||||
value: 'remote',
|
||||
color: '#10b981',
|
||||
},
|
||||
};
|
||||
|
||||
// Job level mapping
|
||||
export const JOB_LEVEL_MAP = {
|
||||
JUNIOR: {
|
||||
text: '普通岗',
|
||||
minExperience: 0,
|
||||
maxExperience: 2,
|
||||
},
|
||||
MID: {
|
||||
text: '技术骨干岗',
|
||||
minExperience: 2,
|
||||
maxExperience: 5,
|
||||
},
|
||||
SENIOR: {
|
||||
text: '储备干部岗',
|
||||
minExperience: 5,
|
||||
maxExperience: 10,
|
||||
},
|
||||
LEAD: {
|
||||
text: '资深',
|
||||
minExperience: 8,
|
||||
maxExperience: 15,
|
||||
},
|
||||
MANAGER: {
|
||||
text: '管理',
|
||||
minExperience: 5,
|
||||
maxExperience: null,
|
||||
},
|
||||
};
|
||||
|
||||
// Course category mapping
|
||||
export const COURSE_CATEGORY_MAP = {
|
||||
GENERAL: {
|
||||
text: '通识课程',
|
||||
color: '#6b7280',
|
||||
icon: 'book',
|
||||
},
|
||||
PROFESSIONAL: {
|
||||
text: '专业课程',
|
||||
color: '#3b82f6',
|
||||
icon: 'desktop',
|
||||
},
|
||||
PRACTICAL: {
|
||||
text: '实践课程',
|
||||
color: '#10b981',
|
||||
icon: 'tool',
|
||||
},
|
||||
COMPREHENSIVE: {
|
||||
text: '综合课程',
|
||||
color: '#8b5cf6',
|
||||
icon: 'layers',
|
||||
},
|
||||
};
|
||||
|
||||
// Course type mapping
|
||||
export const COURSE_TYPE_MAP = {
|
||||
LIVE: {
|
||||
text: '直播课',
|
||||
color: '#ef4444',
|
||||
icon: 'video',
|
||||
},
|
||||
RECORDED: {
|
||||
text: '录播课',
|
||||
color: '#3b82f6',
|
||||
icon: 'play',
|
||||
},
|
||||
HYBRID: {
|
||||
text: '混合式',
|
||||
color: '#8b5cf6',
|
||||
icon: 'mix',
|
||||
},
|
||||
OFFLINE: {
|
||||
text: '线下课',
|
||||
color: '#10b981',
|
||||
icon: 'location',
|
||||
},
|
||||
};
|
||||
|
||||
// Gender mapping
|
||||
export const GENDER_MAP = {
|
||||
MALE: '男',
|
||||
FEMALE: '女',
|
||||
};
|
||||
|
||||
// Company scale mapping
|
||||
export const COMPANY_SCALE_MAP = {
|
||||
SMALL: {
|
||||
text: '50人以下',
|
||||
min: 0,
|
||||
max: 50,
|
||||
},
|
||||
MEDIUM: {
|
||||
text: '50-200人',
|
||||
min: 50,
|
||||
max: 200,
|
||||
},
|
||||
LARGE: {
|
||||
text: '200-1000人',
|
||||
min: 200,
|
||||
max: 1000,
|
||||
},
|
||||
ENTERPRISE: {
|
||||
text: '1000人以上',
|
||||
min: 1000,
|
||||
max: null,
|
||||
},
|
||||
};
|
||||
|
||||
// Interview type mapping
|
||||
export const INTERVIEW_TYPE_MAP = {
|
||||
PHONE: {
|
||||
text: '电话面试',
|
||||
icon: 'phone',
|
||||
},
|
||||
VIDEO: {
|
||||
text: '视频面试',
|
||||
icon: 'video',
|
||||
},
|
||||
ONSITE: {
|
||||
text: '现场面试',
|
||||
icon: 'location',
|
||||
},
|
||||
TECHNICAL: {
|
||||
text: '技术面试',
|
||||
icon: 'code',
|
||||
},
|
||||
HR: {
|
||||
text: 'HR面试',
|
||||
icon: 'user',
|
||||
},
|
||||
};
|
||||
|
||||
// Helper functions
|
||||
export const getStatusText = (status, map) => {
|
||||
return map[status]?.text || status;
|
||||
};
|
||||
|
||||
export const getStatusColor = (status, map) => {
|
||||
return map[status]?.color || '#6b7280';
|
||||
};
|
||||
|
||||
export const mapApplicationStatus = (backendStatus, result = null) => {
|
||||
if (result && INTERVIEW_RESULT_MAP[result]) {
|
||||
return INTERVIEW_RESULT_MAP[result].applicationStatus;
|
||||
}
|
||||
return APPLICATION_STATUS_MAP.toFrontend[backendStatus] || 'not_applied';
|
||||
};
|
||||
|
||||
export default {
|
||||
APPLICATION_STATUS_MAP,
|
||||
ENROLLMENT_STATUS_MAP,
|
||||
INTERVIEW_STATUS_MAP,
|
||||
INTERVIEW_RESULT_MAP,
|
||||
JOB_TYPE_MAP,
|
||||
JOB_LEVEL_MAP,
|
||||
COURSE_CATEGORY_MAP,
|
||||
COURSE_TYPE_MAP,
|
||||
GENDER_MAP,
|
||||
COMPANY_SCALE_MAP,
|
||||
INTERVIEW_TYPE_MAP,
|
||||
getStatusText,
|
||||
getStatusColor,
|
||||
mapApplicationStatus,
|
||||
};
|
||||
Reference in New Issue
Block a user