zhangjie 2 жил өмнө
parent
commit
1a0604de27

+ 5 - 0
src/modules/paper-export/views/PaperTemplateBuild.vue

@@ -71,6 +71,7 @@ export default {
       paperTempList: [],
       curPaperTemp: {},
       downloading: false,
+      fieldData: {},
     };
   },
   mounted() {
@@ -92,6 +93,10 @@ export default {
     async getPaperJson() {
       const res = await paperDetailInfoApi(this.paperId);
       this.paperJson = res.data;
+      this.fieldData = {
+        paperName: res.data.name,
+        courseName: `${res.data.course.name}(${res.data.course.code})`,
+      };
     },
     async getPaperTempList() {
       const res = await paperTemplateListApi("PAPER_EXPORT");

+ 4 - 4
src/modules/question/components/QuestionEditDialog.vue

@@ -123,9 +123,9 @@ export default {
       sourceDetailList: [],
       limitShowCount: 10,
       showMore: false,
-      // curQuestionType: "PARAGRAPH_MATCHING",
-      curQuestionType: "SINGLE_ANSWER_QUESTION",
-      questionModel: {},
+      questionModel: {
+        questionType: "SINGLE_ANSWER_QUESTION",
+      },
       detailName: "",
       questionKey: "",
       loading: false,
@@ -141,7 +141,7 @@ export default {
       return this.isEdit ? "编辑试题" : "创建试题";
     },
     structTypeComp() {
-      return STRUCT_TYPE_COMP_DICT[this.curQuestionType];
+      return STRUCT_TYPE_COMP_DICT[this.questionModel.questionType];
     },
   },
   methods: {