zhangjie 2 days ago
parent
commit
28eeaaa792
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

@@ -197,6 +197,7 @@
                 <el-tabs
                   v-model="filterQuestionType"
                   :before-leave="(val) => filterQuestionTypeChange(val, true)"
+                  :key="questionKey"
                 >
                   <el-tab-pane
                     :label="`全部(${
@@ -521,7 +522,10 @@ export default {
     },
     onlyErrorQuestionChange() {
       this.parseQuestionStatData();
-      this.filterQuestionTypeChange(this.filterQuestionType, true);
+      const filterQuestionType = this.onlyErrorQuestion
+        ? "all"
+        : this.filterQuestionType;
+      this.filterQuestionTypeChange(filterQuestionType, true);
 
       this.questionKey = randomCode();
     },
@@ -992,6 +996,7 @@ export default {
     },
     updateCurTagPaperData() {
       let tagPaperData = this.$refs.QuestionImportPaperEdit?.getData();
+      if (!tagPaperData) return;
       const tagPaperMap = {};
       tagPaperData.forEach((detail) => {
         detail.questions.forEach((question) => {