feat(培训课程相关调整):1.培训计划中的形式”线上/线下“与课程中的”线上/线下“独立字段!,培训计划中是指线上培训还是线下培训,课程中是指该课程是线上课还是线下课,两者不能共用相互独立!
deploy-hxtesting / build-and-deploy (push) Successful in 1m18s

2.创建课程时课程默认是”线上“,发布课程时必须要有课件!
3.课程管理中的课件上传预览下载交互样式,按维护”试题“交互样式风格来!列表中增加一列”试题“,列表中”试题“、”课件“按实际情况只展示”有/无“即可!
This commit is contained in:
runny committed 2026-11-25 10:23:10 +08:00
1 parent ea0524c445
commit 9950a28346
13 files changed
+769 -169

No files matched your search

+23 -3
View File
@@ -165,9 +165,9 @@ export const TRAINING_MOCK = {
// 课程管理(课程资产主数据):预览 harness 演示数据(编号 CRS-#### 与后端一致)
const COURSE_LIBRARY_MOCK = [
{ id: 'lib-1', code: 'CRS-0001', name: '新员工入职通识培训', owner_dept_id: 'dept-b', owner_dept_name: '技术部', description: '公司制度、企业文化与办公系统入门', suitable_members: '新入职员工', category: '企业文化与制度类', type: 'required', mode: 'online', lecturer_id: 'u-m1', hours: 2, material_name: '入职通识手册.pptx', file_name: '', file_size: 0, lecturer_name: '', created_at: month(-3, 1), updated_at: month(0, 2) },
{ id: 'lib-2', code: 'CRS-0002', name: '冲压设备安全操作实操', owner_dept_id: 'dept-a', owner_dept_name: '冲压车间', description: '冲压机安全操作与应急处置实操训练', suitable_members: '冲压操作员', category: '安全与健康类', type: 'required', mode: 'offline', lecturer_id: 'u-m2', hours: 4, material_name: '安全操作规程.docx、实操考核表.xlsx', file_name: '', file_size: 0, lecturer_name: '', created_at: month(-2, 5), updated_at: month(-1, 8) },
{ id: 'lib-3', code: 'CRS-0003', name: 'TS16949 质量体系知识', owner_dept_id: '', owner_dept_name: '', description: 'IATF 16949 体系条款与内审要点', suitable_members: '品质岗', category: '专业技能类', type: 'elective', mode: 'online', lecturer_id: '', lecturer_external: '王顾问', hours: 3, material_name: '', file_name: '', file_size: 0, lecturer_name: '', created_at: month(-1, 12), updated_at: month(-1, 12) },
{ id: 'lib-1', code: 'CRS-0001', name: '新员工入职通识培训', owner_dept_id: 'dept-b', owner_dept_name: '技术部', description: '公司制度、企业文化与办公系统入门', suitable_members: '新入职员工', category: '企业文化与制度类', type: 'required', mode: 'online', lecturer_id: 'u-m1', hours: 2, material_name: '入职通识手册.pptx', file_name: '入职通识手册.pptx', file_size: 839680, knowledge_id: 'kb-lib1', question_bank_count: 1, verify_status: 'confirmed', publish_status: 'draft', lecturer_name: '', created_at: month(-3, 1), updated_at: month(0, 2) },
{ id: 'lib-2', code: 'CRS-0002', name: '冲压设备安全操作实操', owner_dept_id: 'dept-a', owner_dept_name: '冲压车间', description: '冲压机安全操作与应急处置实操训练', suitable_members: '冲压操作员', category: '安全与健康类', type: 'required', mode: 'offline', lecturer_id: 'u-m2', hours: 4, material_name: '安全操作规程.docx、实操考核表.xlsx', file_name: '安全操作规程.docx', file_size: 512000, question_bank_count: 1, verify_status: 'confirmed', publish_status: 'draft', lecturer_name: '', created_at: month(-2, 5), updated_at: month(-1, 8) },
{ id: 'lib-3', code: 'CRS-0003', name: 'TS16949 质量体系知识', owner_dept_id: '', owner_dept_name: '', description: 'IATF 16949 体系条款与内审要点', suitable_members: '品质岗', category: '专业技能类', type: 'elective', mode: 'online', lecturer_id: '', lecturer_external: '王顾问', hours: 3, material_name: '', file_name: '', file_size: 0, question_bank_count: 0, verify_status: 'confirmed', publish_status: 'draft', lecturer_name: '', created_at: month(-1, 12), updated_at: month(-1, 12) },
]
// 课程管理 · 试题管理(000153):题库与题目演示数据(编号 QB-####)
@@ -313,6 +313,26 @@ export function resolveTrainingMock(method: string, url: string): { status: numb
if (url.includes('/question-banks/') && url.includes('/questions')) {
return ok({ id: `q-new-${Date.now()}`, seq_no: 0 })
}
// 课件管理抽屉:上传/知识库挂接/移除回显对应课程条目并模拟文件字段变更
if (url.includes('/course-library/') && url.includes('/material/remove')) {
const course = COURSE_LIBRARY_MOCK.find((c) => url.includes(`/course-library/${c.id}/`))
if (course) {
course.file_name = ''
course.file_size = 0
course.knowledge_id = ''
course.verify_status = 'pending'
}
return ok(course || { id: `c-new-${Date.now()}` })
}
if (url.includes('/course-library/') && url.includes('/material')) {
const course = COURSE_LIBRARY_MOCK.find((c) => url.includes(`/course-library/${c.id}/`))
if (course) {
course.file_name = '预览课件.pdf'
course.file_size = 1024 * 820
course.verify_status = 'pending'
}
return ok(course || { id: `c-new-${Date.now()}` })
}
if (url.includes('/course-library/') && url.includes('/question-banks/import')) {
return ok({ id: `b-new-${Date.now()}`, code: `QB-${String(QUESTION_BANKS_MOCK.length + 1).padStart(4, '0')}`, name: '新导入题库', question_count: 5 })
}