zhangjie 3 年 前
コミット
85f1c9a019

+ 6 - 2
src/features/examwork/StudentExamDetail/PreviewPaperDialog.vue

@@ -231,7 +231,11 @@ export default {
         });
       }
 
-      if (question.answer) {
+      // if (question.structType === STRUCT_TYPES.BOOLEAN_CHOICE) {
+      //   console.log(question.answer, question.studentAnswer);
+      // }
+
+      if (question.answer !== null) {
         contents.push({
           cls: "topic-answer",
           type: "json",
@@ -243,7 +247,7 @@ export default {
         });
       }
 
-      if (question.studentAnswer) {
+      if (question.studentAnswer !== null) {
         // 简答题的特殊处理,解决上传的大图无法分页问题。文字内容不受影响。
         if (question.structType === STRUCT_TYPES.TEXT) {
           // console.log(question.studentAnswer);

+ 1 - 1
src/features/examwork/StudentExamDetail/spins/TopicAnswer.vue

@@ -8,7 +8,7 @@
       v-if="data.structType === STRUCT_TYPES.BOOLEAN_CHOICE"
       class="cont-part-body"
     >
-      {{ data.answer ? "对" : "错" }}
+      {{ data.body ? "对" : "错" }}
     </div>
     <div
       v-else-if="data.structType === STRUCT_TYPES.FILL_BLANK"