feat(员工培训): 完善新人入职培训聊天闭环交互
This commit is contained in:
1 parent
eb0466245b
commit
3f13bb5b46
19 files changed
+2975
-12
No files matched your search
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* features/chat/training/training.types.ts
|
||||
* 用途:定义入职培训聊天工作区的题库、考试进度、HR 统计记录等共享类型。
|
||||
* 依赖:被 useTrainingWorkspace 与 TrainingWorkspacePanel 共同引用。
|
||||
* 逻辑:统一约束“学员考试流”和“HR 管理流”的前端数据结构,避免组件内散落匿名对象。
|
||||
*/
|
||||
|
||||
export type TrainingStage = 'video' | 'summary' | 'exam' | 'result';
|
||||
|
||||
export type TrainingWorkspaceView = 'learner' | 'admin';
|
||||
|
||||
export type TrainingQuestionType = 'single' | 'boolean';
|
||||
|
||||
export interface TrainingQuestionOption {
|
||||
id: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
export interface TrainingQuestion {
|
||||
id: string;
|
||||
type: TrainingQuestionType;
|
||||
prompt: string;
|
||||
answer: string;
|
||||
explanation: string;
|
||||
options?: TrainingQuestionOption[];
|
||||
}
|
||||
|
||||
export interface TrainingAnswerRecord {
|
||||
questionId: string;
|
||||
selectedOptionId: string;
|
||||
correct: boolean;
|
||||
}
|
||||
|
||||
export type TrainingRecordStatus = 'passed' | 'failed' | 'in_progress';
|
||||
|
||||
export interface TrainingRecord {
|
||||
id: string;
|
||||
name: string;
|
||||
employeeId: string;
|
||||
department: string;
|
||||
joinDate: string;
|
||||
completionDate: string | null;
|
||||
score: number | null;
|
||||
attempts: number;
|
||||
status: TrainingRecordStatus;
|
||||
}
|
||||
Reference in new issue
Block a user