Browse Source

导入word听力题校验修改

zhangjie 2 years ago
parent
commit
bd0ae7ce8b
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/modules/question/components/QuestionImportEdit.vue

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

@@ -415,6 +415,11 @@ export default {
         ...MATCHING_QUESTION,
         "READING_COMPREHENSION",
         "CLOZE",
+        "LISTENING_QUESTION",
+      ];
+      const ALLOW_EMPTY_BODY_QUESTION = [
+        "LISTENING_QUESTION",
+        ...MATCHING_QUESTION,
       ];
       let errInfos = [];
       paperData.forEach((detail) => {
@@ -424,7 +429,7 @@ export default {
           let qErrInfo = [];
           // 题干
           if (
-            !MATCHING_QUESTION.includes(questionType) &&
+            !ALLOW_EMPTY_BODY_QUESTION.includes(questionType) &&
             (!quesBody || isAnEmptyRichText(quesBody))
           ) {
             qErrInfo.push(`没有题干`);