更新12个教务系统并优化项目大小
主要更新: - 更新所有12个产业的教务系统数据和功能 - 删除所有 node_modules 文件夹(节省3.7GB) - 删除所有 .yoyo 缓存文件夹(节省1.2GB) - 删除所有 dist 构建文件(节省55MB) 项目优化: - 项目大小从 8.1GB 减少到 3.2GB(节省60%空间) - 保留完整的源代码和配置文件 - .gitignore 已配置,防止再次提交大文件 启动脚本: - start-industry.sh/bat/ps1 脚本会自动检测并安装依赖 - 首次启动时自动运行 npm install - 支持单个或批量启动产业系统 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
import companyJobsData from "@/mocks/companyJobsData.json";
|
||||
|
||||
// 将原始数据转换为前端格式
|
||||
function transformJobData(rawJob, index) {
|
||||
// 从招聘人数中提取数字
|
||||
const recruitNumberMatch = rawJob["招聘人数"]?.match(/\d+/);
|
||||
const remainingPositions = recruitNumberMatch ? recruitNumberMatch[0] : "若干";
|
||||
|
||||
return {
|
||||
id: index + 1,
|
||||
position: rawJob["内推岗位名称"],
|
||||
salary: rawJob["薪资"],
|
||||
location: rawJob["工作地点"],
|
||||
education: rawJob["学历要求"],
|
||||
recruitNumber: rawJob["招聘人数"],
|
||||
remainingPositions: remainingPositions,
|
||||
tags: rawJob["职位标签"] || [],
|
||||
benefits: rawJob["福利标签"] || [],
|
||||
deadline: rawJob["截止时间"],
|
||||
jobCategory: rawJob["岗位相关标签"],
|
||||
// details对象包含描述、要求、公司介绍和企业图片
|
||||
details: {
|
||||
description: rawJob["职位描述"] || "",
|
||||
requirementsText: rawJob["任职要求"] || "",
|
||||
companyInfo: rawJob["公司介绍"] || "",
|
||||
companyImages: rawJob["企业图片"] || [] // 添加企业图片字段
|
||||
},
|
||||
// 保留原始数据以备需要
|
||||
_raw: rawJob
|
||||
};
|
||||
}
|
||||
|
||||
// 获取所有岗位数据
|
||||
export function getAllCompanyJobs() {
|
||||
return companyJobsData.map((job, index) => transformJobData(job, index));
|
||||
}
|
||||
|
||||
// 根据岗位名称获取岗位详情
|
||||
export function getJobByPosition(positionName) {
|
||||
const allJobs = getAllCompanyJobs();
|
||||
return allJobs.find(job => job.position === positionName);
|
||||
}
|
||||
|
||||
// 根据ID获取岗位详情
|
||||
export function getJobById(id) {
|
||||
const allJobs = getAllCompanyJobs();
|
||||
return allJobs.find(job => job.id === id);
|
||||
}
|
||||
Reference in New Issue
Block a user