Files
ALL-teach_sys/frontend_智能开发/updateExpertSupportData.cjs
KQL cd2e307402 初始化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>
2025-09-24 14:14:14 +08:00

176 lines
7.2 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const fs = require('fs');
const path = require('path');
// 读取智能开发内容问答.json
const smartDevQA = JSON.parse(
fs.readFileSync('./网页未导入数据/智能开发产业/智能开发内容问答.json', 'utf-8')
);
console.log(`找到 ${smartDevQA.length} 条智能开发产业问答数据`);
// 导师头像映射
const mentorAvatars = {
"何思远": "https://ddcz-1315997005.cos.ap-nanjing.myqcloud.com/static/img/teach_sys_teacher-avatar/recuW7dxJ5LTXW.png",
"王振宇": "https://ddcz-1315997005.cos.ap-nanjing.myqcloud.com/static/img/teach_sys_teacher-avatar/recuW7dxJ5GfLu.png",
"赵立新": "https://ddcz-1315997005.cos.ap-nanjing.myqcloud.com/static/img/teach_sys_teacher-avatar/recuW7dxJ5BeLt.png",
"谢宇程": "https://ddcz-1315997005.cos.ap-nanjing.myqcloud.com/static/img/teach_sys_teacher-avatar/recuW7dxJ5xnc9.png",
"多多畅职机器人": "https://ddcz-1315997005.cos.ap-nanjing.myqcloud.com/static/img/teach_sys_icon/recuWmDuekBTlr.png"
};
// 转换数据格式
const conversations = [];
let conversationId = 1;
smartDevQA.forEach((qa, index) => {
const messages = [];
// 获取日期(从第一个时间戳提取)
let conversationDate = "2024年3月";
if (qa['流程1_时间']) {
const dateMatch = qa['流程1_时间'].match(/(\d{4})\/(\d{1,2})/);
if (dateMatch) {
const months = ['', '1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'];
conversationDate = `${dateMatch[1]}${months[parseInt(dateMatch[2])]}`;
}
}
// 添加问答流程最多6轮
for (let i = 1; i <= 6; i++) {
const questionKey = i === 1 ? '问题_流程1' : `问题_流程${i}`;
const answerKey = `回答_流程${i * 2}`;
const questionTimeKey = `流程${i}_时间`;
const answerTimeKey = `流程${i * 2}_时间`;
// 添加用户问题
if (qa[questionKey] && qa[questionKey].trim()) {
messages.push({
type: "user",
content: qa[questionKey],
time: qa[questionTimeKey] || `2024/3/${10 + i} ${10 + i}:00`
});
}
// 添加回答
if (qa[answerKey] && qa[answerKey].trim()) {
const mentorName = qa['查询导师名称'] || "多多畅职机器人";
const displayName = mentorName === "" ? "多多畅职机器人" :
mentorName.includes("老师") ? mentorName : `${mentorName}老师`;
messages.push({
type: "assistant",
content: qa[answerKey],
mentor: displayName,
time: qa[answerTimeKey] || `2024/3/${10 + i} ${10 + i}:01`,
mentorAvatar: mentorAvatars[mentorName] || mentorAvatars["多多畅职机器人"]
});
}
}
// 只添加有内容的对话
if (messages.length > 0) {
conversations.push({
id: conversationId++,
title: qa['问题标题'] || `智能开发问题${index + 1}`,
status: "finish",
date: conversationDate,
type: qa['问题类型'] || "常规问题",
messages: messages
});
}
});
// 构建完整的expertSupportData对象
const expertSupportData = {
conversations: conversations,
// 预设的FAQ问题
faqs: [
{
id: 1,
question: "什么是AI大前端开发",
answer: "AI大前端开发是将人工智能技术与前端开发相结合的新兴领域。它不仅包括传统的Web前端、移动端开发还涉及AI模型的前端集成、智能交互设计、以及利用大模型优化用户体验等方面。",
category: "AI技术"
},
{
id: 2,
question: "AIOps智能运维主要做什么",
answer: "AIOps智能运维通过机器学习和大数据分析实现IT系统的自动化监控、故障预测、根因分析和自动修复。它能够帮助企业提升运维效率降低故障率实现智能化的IT管理。",
category: "运维技术"
},
{
id: 3,
question: "网络安全在智能开发中的重要性?",
answer: "随着AI技术的广泛应用网络安全变得更加重要。需要防护AI模型被攻击、数据泄露、以及新型的AI驱动攻击。同时也可以利用AI技术提升安全防护能力如智能威胁检测、自动化响应等。",
category: "安全技术"
},
{
id: 4,
question: "如何入门AI智能应用开发",
answer: "建议从Python编程基础开始学习机器学习和深度学习的基本概念掌握主流框架如TensorFlow、PyTorch。然后学习大模型应用、RAG技术并通过实际项目练习逐步提升实战能力。",
category: "学习路径"
},
{
id: 5,
question: "智能开发产业的就业前景如何?",
answer: "智能开发产业正处于快速发展期人才需求旺盛。无论是AI应用开发、智能运维、网络安全还是大前端开发都有广阔的就业空间。掌握AI+专业技能的复合型人才尤其受欢迎。",
category: "就业指导"
}
],
// 专家信息
expertProfiles: [
{
id: 1,
name: "何思远",
title: "网络安全专家",
avatar: "https://ddcz-1315997005.cos.ap-nanjing.myqcloud.com/static/img/teach_sys_teacher-avatar/recuW7dxJ5LTXW.png",
expertise: ["网络安全架构", "威胁情报分析", "零信任架构", "AI安全防护"],
introduction: "15年网络安全经验省部级科技奖得主"
},
{
id: 2,
name: "王振宇",
title: "AI大前端专家",
avatar: "https://ddcz-1315997005.cos.ap-nanjing.myqcloud.com/static/img/teach_sys_teacher-avatar/recuW7dxJ5GfLu.png",
expertise: ["AI前端融合", "跨平台开发", "智能交互设计", "性能优化"],
introduction: "7年AI大前端经验企业创新奖得主"
},
{
id: 3,
name: "赵立新",
title: "AI应用开发专家",
avatar: "https://ddcz-1315997005.cos.ap-nanjing.myqcloud.com/static/img/teach_sys_teacher-avatar/recuW7dxJ5BeLt.png",
expertise: ["大模型应用", "RAG技术", "多模态交互", "知识图谱"],
introduction: "8年AI应用开发经验省级科技奖得主"
},
{
id: 4,
name: "谢宇程",
title: "AIOps智能运维专家",
avatar: "https://ddcz-1315997005.cos.ap-nanjing.myqcloud.com/static/img/teach_sys_teacher-avatar/recuW7dxJ5xnc9.png",
expertise: ["智能监控", "故障预测", "自动化运维", "云原生技术"],
introduction: "15年智能运维经验故障修复时间缩短40%"
}
]
};
// 生成expertSupportData.js文件内容
const fileContent = `// 智能开发产业专家支持中心数据
const expertSupportData = ${JSON.stringify(expertSupportData, null, 2)};
export { expertSupportData };
export default expertSupportData;`;
// 写入文件
fs.writeFileSync('./src/data/expertSupportData.js', fileContent, 'utf-8');
console.log('✅ 专家支持中心数据更新成功!');
console.log(`- 生成了 ${conversations.length} 个对话`);
console.log(`- 包含 ${expertSupportData.faqs.length} 个FAQ`);
console.log(`- 包含 ${expertSupportData.expertProfiles.length} 位专家信息`);
// 输出前3个对话标题作为示例
console.log('\n对话示例');
conversations.slice(0, 3).forEach(conv => {
console.log(` - ${conv.title} (${conv.type})`);
});