zhangjie 2 년 전
부모
커밋
0070998a37

+ 1 - 0
src/modules/card/assets/styles/card-preview.scss

@@ -31,6 +31,7 @@
   margin: 0 auto;
   font-weight: normal;
   font-family: "宋体", "宋体-简", Arial, sans-serif;
+  line-height: 20px;
 
   .page-main {
     height: 100%;

+ 1 - 0
src/modules/card/assets/styles/card-temp.css

@@ -31,6 +31,7 @@
   margin: 0 auto;
   font-weight: normal;
   font-family: "宋体", "宋体-简", Arial, sans-serif;
+  line-height: 20px;
 }
 
 .page-box .page-main {

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
src/modules/card/previewTemp.js


+ 0 - 1
src/modules/paper-export/previewTemp.js

@@ -17,7 +17,6 @@ export default (domeStr) => {
 
       </head>
       <style>${resetCss}${previewCss}${paperCss}${otherCss}</style>
-      <style>.rich-text{display:inline-block;vertical-align:top;line-height:20px}</style>
       <body>${domeStr}</body>
     </html>
   `;

+ 6 - 9
src/modules/question/components/QuestionImportEdit.vue

@@ -109,7 +109,7 @@
 // import paperRichTextJson from "../datas/paperRichText.json";
 // import paperParseData from "../datas/paperParseData.json";
 
-import { calcSum, deepCopy, randomCode } from "@/plugins/utils";
+import { calcSum, deepCopy, objTypeOf, randomCode } from "@/plugins/utils";
 import QuestionImportPaperEdit from "./QuestionImportPaperEdit.vue";
 import { isAnEmptyRichText } from "@/utils/utils";
 import {
@@ -273,19 +273,16 @@ export default {
       });
     },
     isNull(val) {
+      if (val) {
+        if (val === "[]") return true;
+        if (objTypeOf(val) === "array" && !val.length) return true;
+      }
       return val === null || val === "" || val === undefined;
     },
     mergeObjData(targetObj, cacheObj) {
       let data = { ...targetObj };
       Object.keys(cacheObj).forEach((k) => {
-        if (k === "quesAnswer") {
-          data[k] =
-            this.isNull(targetObj[k]) || targetObj[k] === "[]"
-              ? cacheObj[k]
-              : targetObj[k];
-        } else {
-          data[k] = this.isNull(targetObj[k]) ? cacheObj[k] : targetObj[k];
-        }
+        data[k] = this.isNull(targetObj[k]) ? cacheObj[k] : targetObj[k];
       });
       return data;
     },

+ 2 - 2
src/modules/question/components/QuestionImportPaperEdit.vue

@@ -79,7 +79,7 @@ export default {
           question.sourceDetailName = question.customizeQuestionType.name;
           question.questionType = question.customizeQuestionType.questionType;
           question.courseId = this.courseId;
-          question.score = question.score || detail.questionScore || 0;
+          question.score = question.score || 0;
           question.id = randomCode();
 
           if (question.subQuestions && question.subQuestions.length) {
@@ -89,7 +89,7 @@ export default {
               subq.sourceDetailId = subq.customizeQuestionType.id;
               subq.sourceDetailName = subq.customizeQuestionType.name;
               subq.courseId = this.courseId;
-              subq.score = subq.score || detail.questionScore || 0;
+              subq.score = subq.score || 0;
             });
           }
         });

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.