shmily1213 14 годин тому
батько
коміт
a36f82d542

+ 2 - 1
src/composables/useExam.ts

@@ -746,7 +746,8 @@ export const useExam = () => {
         virtualIndex: 0,
         duration: 0,
         activeSubIndex: 0,
-        hasSubQuestions: item.subQuestions?.length > 0
+        hasSubQuestions: item.subQuestions?.length > 0,
+        typeTitle: item.typeTitle
       } as Study.Question
     }
     questionList.value = transerQuestions(list.map((item, index) => transerQuestion(item, index)));

+ 2 - 2
src/pagesStudy/pages/exam-start/components/question-title.vue

@@ -1,7 +1,7 @@
 <template>
   <view class="question-title">
     <view v-if="question.typeId && !isSubQuestion" class="question-type">
-      <text>{{ questionTypeDesc[question.typeId as EnumQuestionType] }}</text>
+      <text>{{ question.typeTitle || questionTypeDesc[question.typeId as EnumQuestionType] }}</text>
       <!-- 考试模式下显示分数 -->
       <text v-if="showScore">({{ getScore }}分)</text>
     </view>
@@ -49,7 +49,7 @@ const getScore = computed(() => {
 const getQuestionTitle = () => {
   if (isSubQuestion.value) {
     const prefix = questionTypeDesc[props.question.typeId as EnumQuestionType].slice(0, 2);
-    return `[${prefix}]`;
+    return `[${props.question.typeTitle || prefix}]`;
   }
   return '';
 };

+ 5 - 1
src/types/study.ts

@@ -19,7 +19,7 @@ export interface StudentStat {
 /**
  * 班级知识点记录
  */
-  export interface ClassKnowledgeRecord {
+export interface ClassKnowledgeRecord {
   rate: number;
   list: StudentPlanStudyRecord[];
 }
@@ -185,6 +185,8 @@ export interface ExamineeQuestion {
   subQuestions: ExamineeQuestion[];
   parse?: string;
   totalScore: number;
+  // 原始题型名称
+  typeTitle?: string;
 }
 export interface Examinee {
   examineeId: number;
@@ -296,6 +298,8 @@ export interface Question extends QuestionState {
   duration: number;
   // 是否有子题
   hasSubQuestions: boolean;
+  // 原始题型名称
+  typeTitle?: string;
 }
 
 export interface SubjectListRequestDTO {