소스 검색

试卷预览显示大题描述

zhangjie 2 년 전
부모
커밋
be7f439d52
1개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  1. 12 0
      src/features/examwork/StudentExamDetail/PreviewPaperDialog.vue

+ 12 - 0
src/features/examwork/StudentExamDetail/PreviewPaperDialog.vue

@@ -271,6 +271,8 @@ export default {
           type: "text",
           content: `${numberToChinese(detail.number)}、${detail.name}`,
         });
+        const dbodys = this.parseTopicDesc(detail.description);
+        renderStructList.push(...dbodys);
 
         detail.questions.forEach((question) => {
           if (question.subQuestions) {
@@ -348,6 +350,16 @@ export default {
 
       return contents;
     },
+    parseTopicDesc(richJson) {
+      const bodys = this.transformRichJson(richJson);
+      return bodys.map((body) => {
+        return {
+          cls: "detail-desc",
+          type: "json",
+          content: body,
+        };
+      });
+    },
     parseTopicTitle(richJson, numberVal) {
       if (!richJson) {
         return {