liuyu
22 小时以前 93c133349a5ccd7a328371fa113dce69d5611f21
apps/jnpf-web-apps-main/src/views/x/tms/onlineExam/types.ts
@@ -17,7 +17,17 @@
  durationMin?: number;
  /** 已交卷时的得分 */
  gotScore?: number;
  /** 1合格 / 0不合格 / 空=未出结果 */
  passFlag?: '0' | '1' | '';
  examId?: string;
  /** 当前/最近一次考试序号,1=首考 */
  attemptNo?: number;
  /** 首考 / 补考(第1次)…(补考序号不含首考) */
  attemptLabel?: string;
  submittedCount?: number;
  retakeLimit?: number;
  remainingRetakes?: number;
  canRetake?: boolean;
}
export interface MyPaperPageQuery {
@@ -35,16 +45,60 @@
  totalScore: number;
  passScore?: number;
  durationMin?: number;
  /** 开考时间,倒计时按此续算 */
  startTime?: string;
  /** 服务端剩余秒数 */
  remainSeconds?: number | null;
  /** 开考接口发现已超时并完成自动交卷 */
  autoSubmitted?: boolean;
  attemptNo?: number;
  attemptLabel?: string;
  questions: OnlineExamQuestionItem[];
}
export type OnlineQuestionType = 'single' | 'multi' | 'judge' | 'blank' | 'essay';
export interface OnlineExamQuestionItem {
  id: string;
  questionId?: string;
  questionNo?: string;
  questionType: 'single' | 'multi' | 'judge';
  questionType: OnlineQuestionType;
  stem: string;
  score: number;
  options: { optionLabel: string; optionContent: string; isCorrect: '0' | '1' }[];
  gotScore?: number | null;
  userAnswer?: string;
  options: { optionLabel: string; optionContent: string; isCorrect?: '0' | '1' }[];
  /** 交卷后回填 */
  right?: boolean | null;
  correctAnswer?: string;
  subjective?: boolean;
}
export interface OnlineExamSubmitResult {
  objectiveScore?: number;
  totalScore?: number;
  passFlag?: '0' | '1' | '';
  gradeStatus?: string;
  pendingGrade?: boolean;
  items?: {
    id: string;
    correctAnswer?: string;
    gotScore?: number | null;
    right?: boolean | null;
    subjective?: boolean;
  }[];
}
export interface OnlineExamAttempt {
  examId: string;
  attemptNo?: number;
  attemptLabel?: string;
  status?: MyPaperStatus;
  gradeStatus?: string;
  startTime?: string;
  submitTime?: string;
  gotScore?: number | null;
  passFlag?: '0' | '1' | '';
}
export interface OnlineExamDetail {
@@ -60,4 +114,16 @@
  startTime?: string;
  submitTime?: string;
  passFlag?: '0' | '1';
  gradeStatus?: string;
  examId?: string;
  attemptNo?: number;
  attemptLabel?: string;
  submittedCount?: number;
  retakeLimit?: number;
  remainingRetakes?: number;
  canRetake?: boolean;
  /** 历史答卷 */
  attempts?: OnlineExamAttempt[];
  /** 已交卷回顾 */
  questions?: OnlineExamQuestionItem[];
}