zhangjie 3 жил өмнө
parent
commit
5462036352

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

@@ -92,8 +92,12 @@ export default {
       });
       });
     },
     },
     parsePaperStruct(data) {
     parsePaperStruct(data) {
-      const paperStructJson = JSON.parse(data.paperStructJson);
-      const answerJson = JSON.parse(data.answerJson);
+      const paperStructJson = data.paperStructJson
+        ? JSON.parse(data.paperStructJson)
+        : { details: [] };
+      const answerJson = data.answerJson
+        ? JSON.parse(data.answerJson)
+        : { details: [] };
       const examStudentAnswerJson = data.examStudentAnswerJson
       const examStudentAnswerJson = data.examStudentAnswerJson
         ? JSON.parse(data.examStudentAnswerJson)
         ? JSON.parse(data.examStudentAnswerJson)
         : [];
         : [];