WANG il y a 6 ans
Parent
commit
cbd6620201
1 fichiers modifiés avec 6 ajouts et 7 suppressions
  1. 6 7
      src/modules/examwork/view/onlineExamOrgSettings.vue

+ 6 - 7
src/modules/examwork/view/onlineExamOrgSettings.vue

@@ -582,7 +582,7 @@ export default {
       );
     },
     importOrgSettings() {
-      this.fileList = [];
+      this.removeFile();
       this.orgSettingsImportDialog = true;
     },
 
@@ -595,8 +595,7 @@ export default {
         message: "上传成功",
         type: "success"
       });
-      this.fileLoading = false;
-      this.studentImportDialog = false;
+      this.orgSettingsImportDialog = false;
       this.resetPageAndSearch();
     },
     uploadError(response, file, fileList) {
@@ -611,12 +610,13 @@ export default {
           type: "error"
         });
       }
-      this.fileLoading = false;
     },
     //清空文件
     removeFile() {
-      // this.fileList = [];
-      this.$refs.upload.clearFiles();
+      this.fileList = [];
+      if (this.$refs.upload) {
+        this.$refs.upload.clearFiles();
+      }
     },
     //确定上传
     submitUpload() {
@@ -648,7 +648,6 @@ export default {
             message: "上传文件必须为xlsx格式",
             type: "error"
           });
-          this.fileList = [];
           return false;
         }
       }