Browse Source

url-load问题

zhangjie 2 years ago
parent
commit
d04060f7ff

+ 3 - 2
src/modules/exam/components/createExamAndPrintTask/InfoExamTask.vue

@@ -432,9 +432,8 @@ export default {
     },
     examChange(val) {
       console.log(val);
+      if (!val.id) return;
       this.examTask.examModel = val.examModel;
-      this.examTaskDetail.includePaper =
-        val.printContent.indexOf("PAPER") !== -1;
       this.paperAttachments.forEach(item => {
         item.cardId = "";
         item.cardType = "";
@@ -484,6 +483,8 @@ export default {
           orgId: teachingRoomId
         });
         this.examTask.cardRuleId = examPrintPlan.cardRuleId;
+        this.examTaskDetail.includePaper =
+          examPrintPlan.printContent.indexOf("PAPER") !== -1;
         this.updateTaskInfo({
           infoExamPrintPlan: Object.assign(
             {},

+ 3 - 1
vue.config.js

@@ -27,7 +27,9 @@ var config = {
       .rule("images")
       .use("url-loader")
       .loader("url-loader")
-      .tap(options => Object.assign(options, { limit: 20480 }));
+      .tap(options =>
+        Object.assign(options, { limit: 20480, esModule: false })
+      );
   }
 };