Files
online_sys/frontend_智能开发/taskListMockData.js
KQL a7242f0c69 Initial commit: 教务系统在线平台
- 包含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>
2025-12-12 18:16:55 +08:00

128 lines
4.3 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.

// TaskList组件的Mock数据示例
// 用于当日事项板块的数据格式参考
const taskListMockData = {
// 当日事项数据示例
tasks: [
{
id: 1,
title: '完成文旅产业分析报告',
type: 'HOMEWORK', // 类型: HOMEWORK(作业), PROJECT(项目), REPORT(报告), INTERVIEW(面试), OTHER(其他)
courseName: '文旅产业全景与文旅基础知识',
teacherName: '张老师',
teacherAvatar: 'https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp',
duration: '2小时',
time: '20:00', // 课程时间
date: '2025-09-01', // 日期
status: 'PENDING', // 状态: PENDING(待完成), IN_PROGRESS(进行中), COMPLETED(已完成)
description: '分析当前文旅产业的发展趋势和市场机会',
unit: '产业认知课'
},
{
id: 2,
title: '完成AIGC图像生成实践',
type: 'PROJECT',
courseName: 'AIGC人工智能生成内容',
teacherName: '李老师',
teacherAvatar: null, // 无头像时显示姓名首字母
duration: '1小时',
time: '19:00',
date: '2025-09-01',
status: 'IN_PROGRESS',
description: '使用Stable Diffusion完成一组文旅宣传海报设计',
unit: 'AIGC人工智能生成内容'
},
{
id: 3,
title: '提交活动策划方案',
type: 'REPORT',
courseName: '文旅活动企划与实施',
teacherName: '王老师',
teacherAvatar: 'https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp',
duration: '1.5小时',
time: '21:00',
date: '2025-09-01',
status: 'PENDING',
description: '完成文旅活动的完整策划方案,包括预算和执行计划',
unit: '文旅活动企划与实施'
},
{
id: 4,
title: '参加职业技能公开课',
type: 'OTHER', // 公开课类型
courseName: '数字营销趋势分享',
teacherName: '公开课讲师',
teacherAvatar: null,
duration: '1小时',
time: '20:00',
date: '2025-09-01',
status: 'PENDING',
description: '职业技能提升公开课',
unit: '公开课'
}
],
// 完整的从calendarEvents转换为tasks的示例
calendarEventToTask: (event) => ({
id: event.id,
title: event.fullTitle || event.title,
courseName: event.fullTitle || event.title,
time: event.startTime.split(" ")[1].replace('', ':'), // 处理中文冒号
type: event.type === 'public' ? 'OTHER' : 'HOMEWORK',
teacherName: event.teacher,
teacherAvatar: "https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp",
duration: "1小时",
status: event.status === 'completed' ? 'COMPLETED' :
event.status === 'upcoming' ? 'PENDING' : 'PENDING',
unit: event.unit,
color: event.color,
description: event.description
}),
// 示例:万圆的当日事项数据
wanYuanTasks: [
{
id: 1,
title: '完成岗位体系认知课程学习',
type: 'HOMEWORK',
courseName: '教育体系认知',
teacherName: '刘杰',
teacherAvatar: 'https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp',
duration: '1小时',
time: '20:00',
date: '2025-03-04',
status: 'COMPLETED',
description: '岗位体系认知 - 刘杰老师',
unit: '岗位体系认知'
},
{
id: 2,
title: '参加新媒体运营公开课',
type: 'OTHER',
courseName: '新媒体应用传播学',
teacherName: '公开课讲师',
teacherAvatar: null,
duration: '1小时',
time: '20:00',
date: '2025-10-09',
status: 'PENDING',
description: '职业技能公开课',
unit: '公开课'
}
]
};
// 导出供参考
export default taskListMockData;
// 使用示例:
// 在Dashboard组件中
// const getTasksForDate = (date) => {
// const dateStr = formatDate(date);
// const dayEvents = calendarEvents.filter(event => {
// const eventDate = event.startTime.split(" ")[0];
// return eventDate === dateStr;
// });
//
// return dayEvents.map(event => taskListMockData.calendarEventToTask(event));
// };