diff --git a/src/api/modules/exam.ts b/src/api/modules/exam.ts index cb1bc0f..7dc8ca1 100644 --- a/src/api/modules/exam.ts +++ b/src/api/modules/exam.ts @@ -16,7 +16,7 @@ import type { UpdateQuestionAnswerRequest, CreateQuestionRepoRequest, UpdateQuestionRepoRequest, - ExamInfo, + ExamInfo } from '../types' /** diff --git a/src/api/types.ts b/src/api/types.ts index 3a3926b..be28d1a 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -890,3 +890,65 @@ export interface PaperInfo { updateBy: string updateTime: string } + +// 试卷创建请求类型 +export interface CreatePaperRequest { + /** + * 0固定组卷,1随机组卷,组卷模式 + */ + generateMode?: number; + /** + * 及格分 + */ + passScore?: number; + /** + * 题库id + */ + repoId?: string; + /** + * 是否需要批阅:0不需要 1需要,是否需要批阅 + */ + requireReview?: number; + /** + * 组卷规则 + * 示例: { + * "type0_count": 1, "type0_score": 10, + * "type1_count": 20, "type1_score": 20, + * "type2_count": 10, "type2_score": 10, + * "type3_count": 10, "type3_score": 10, + * "type4_count": 5, "type4_score": 5, + * "type5_count": 1, "type5_score": 1 + * } + */ + rules?: string; + /** + * 试卷标题 + */ + title?: string; + /** + * 总分 + */ + totalScore?: number; + [property: string]: any; +} + +// 试卷题目关联请求类型 +export interface AddPaperQuestionRequest { + /** + * 排序 + */ + orderNo?: number; + /** + * 试卷id + */ + paperId?: string; + /** + * 题目id + */ + questionId?: string; + /** + * 分值 + */ + score?: number; + [property: string]: any; +} diff --git a/src/components/teacher/SingleChoiceQuestion.vue b/src/components/teacher/SingleChoiceQuestion.vue index 75e7af5..638b99b 100644 --- a/src/components/teacher/SingleChoiceQuestion.vue +++ b/src/components/teacher/SingleChoiceQuestion.vue @@ -30,20 +30,22 @@ :class="{ 'is-selected': correctAnswer === index }">