From 93c133349a5ccd7a328371fa113dce69d5611f21 Mon Sep 17 00:00:00 2001
From: liuyu <yu.liu@cqgbkj.com>
Date: 星期二, 22 九月 2026 09:25:39 +0800
Subject: [PATCH] feat(tms): 完成课程考试自测等页面与接口对接
---
apps/jnpf-web-apps-main/src/views/x/tms/onlineExam/types.ts | 70 ++++++++++++++++++++++++++++++++++-
1 files changed, 68 insertions(+), 2 deletions(-)
diff --git a/apps/jnpf-web-apps-main/src/views/x/tms/onlineExam/types.ts b/apps/jnpf-web-apps-main/src/views/x/tms/onlineExam/types.ts
index 26d2778..61ebd77 100644
--- a/apps/jnpf-web-apps-main/src/views/x/tms/onlineExam/types.ts
+++ b/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;
+ /** 寮�鑰冩帴鍙e彂鐜板凡瓒呮椂骞跺畬鎴愯嚜鍔ㄤ氦鍗� */
+ 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[];
}
--
Gitblit v1.8.0