liuyu
22 小时以前 8534025c45b4736975730678b9ccf23570a75f95
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import type { Difficulty } from '#/views/x/tms/question/types';
import type { SelfTestDifficulty } from './constants';
 
/** 自我检测抽题条件 */
export interface SelfTestTypeSetting {
  count: number;
  difficulty: SelfTestDifficulty;
}
 
export interface SelfTestFormModel {
  bankId?: string;
  single: SelfTestTypeSetting;
  multi: SelfTestTypeSetting;
  judge: SelfTestTypeSetting;
}
 
export interface SelfTestStartPayload {
  bankId: string;
  bankName?: string;
  single: SelfTestTypeSetting;
  multi: SelfTestTypeSetting;
  judge: SelfTestTypeSetting;
}
 
/** 抽题结果 / 检测详情 */
export interface SelfTestPaper {
  paperId: string;
  bankId: string;
  bankName: string;
  testStatus?: string;
  totalCount?: number;
  correctCount?: number;
  scoreRate?: number;
  startTime?: string;
  submitTime?: string;
  questions: SelfTestQuestionItem[];
}
 
export interface SelfTestQuestionItem {
  id: string;
  questionNo?: string;
  questionType: 'single' | 'multi' | 'judge';
  difficulty?: Difficulty;
  stem: string;
  options: { optionLabel: string; optionContent: string; isCorrect: '0' | '1' }[];
  /** 回顾字段 */
  correctAnswer?: string;
  userAnswer?: string;
  isRight?: '0' | '1';
  sortNo?: number;
}
 
export interface SelfTestSubmitPayload {
  answers: Record<string, string | string[]>;
}
 
export interface SelfTestSubmitResult {
  paperId: string;
  totalCount: number;
  correctCount: number;
  scoreRate: number;
}
 
export interface SelfTestRecordItem {
  id: string;
  bankId: string;
  bankName: string;
  totalCount: number;
  correctCount?: number;
  scoreRate?: number;
  testStatus: string;
  startTime?: string;
  submitTime?: string;
}