主要内容: - 包含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>
79 lines
2.3 KiB
JavaScript
79 lines
2.3 KiB
JavaScript
import interviewQuestionsData from '@/data/interviewQuestions.json';
|
||
|
||
// 创建岗位群名称到面试题内容的映射
|
||
const createInterviewQuestionsMap = () => {
|
||
const map = {};
|
||
|
||
interviewQuestionsData.forEach(item => {
|
||
// 根据岗位群名称创建映射
|
||
map[item['岗位群名称']] = {
|
||
groupName: item['岗位群名称'],
|
||
questionTitle: item['面试题名称'],
|
||
content: item['面试题内容']
|
||
};
|
||
});
|
||
|
||
return map;
|
||
};
|
||
|
||
// 导出映射
|
||
export const interviewQuestionsMap = createInterviewQuestionsMap();
|
||
|
||
// 根据岗位群名称获取面试题内容
|
||
export const getInterviewQuestionsByGroup = (groupName) => {
|
||
return interviewQuestionsMap[groupName] || null;
|
||
};
|
||
|
||
// 将Markdown格式的内容解析为结构化数据(用于简单展示)
|
||
export const parseInterviewContent = (content) => {
|
||
if (!content) return [];
|
||
|
||
const sections = [];
|
||
const lines = content.split('\n');
|
||
let currentSection = null;
|
||
let currentQuestion = null;
|
||
|
||
lines.forEach(line => {
|
||
// 匹配一级标题(章节)
|
||
if (line.startsWith('# ')) {
|
||
if (currentSection) {
|
||
sections.push(currentSection);
|
||
}
|
||
currentSection = {
|
||
title: line.replace('# ', '').trim(),
|
||
questions: []
|
||
};
|
||
currentQuestion = null;
|
||
}
|
||
// 匹配问题(数字开头)
|
||
else if (/^\d+\.\s/.test(line)) {
|
||
if (currentQuestion && currentSection) {
|
||
currentSection.questions.push(currentQuestion);
|
||
}
|
||
currentQuestion = {
|
||
question: line.replace(/^\d+\.\s/, '').trim(),
|
||
answer: ''
|
||
};
|
||
}
|
||
// 匹配答案或示例回答
|
||
else if (line.includes('答案:') || line.includes('示例回答:') || line.includes('参考答案:')) {
|
||
if (currentQuestion) {
|
||
currentQuestion.answer = line.replace(/^(答案:|示例回答:|参考答案:)/, '').trim();
|
||
}
|
||
}
|
||
// 继续收集答案内容
|
||
else if (currentQuestion && currentQuestion.answer && line.trim()) {
|
||
currentQuestion.answer += '\n' + line.trim();
|
||
}
|
||
});
|
||
|
||
// 添加最后的section和question
|
||
if (currentQuestion && currentSection) {
|
||
currentSection.questions.push(currentQuestion);
|
||
}
|
||
if (currentSection) {
|
||
sections.push(currentSection);
|
||
}
|
||
|
||
return sections;
|
||
}; |