Bladeren bron

导出增加loading

Liugl 3 jaren geleden
bovenliggende
commit
667d593691
1 gewijzigde bestanden met toevoegingen van 8 en 1 verwijderingen
  1. 8 1
      src/views/business/ticket/index.vue

+ 8 - 1
src/views/business/ticket/index.vue

@@ -366,6 +366,7 @@ export default {
     /** 导出按钮操作 */
     handleExport() {
       const boxIds = this.ids || [];
+      
       if (boxIds.length == 0) {
         this.$alert("请选择你要导出的盲票组!", "提示", { type: "warning" });
       } else {
@@ -375,14 +376,20 @@ export default {
           type: "warning",
         })
           .then(() => {
-            this.exportLoading = true;
+            this.vloading = this.$loading({
+              lock: true,
+              text: "正在导出.....",
+              background: "rgba(0, 0, 0, 0.7)",
+            });
             return exportTicket({ ids: boxIds });
           })
           .then((response) => {
+            this.vloading.close();
             this.download(response.msg);
             this.exportLoading = false;
           })
           .catch(() => {
+            this.vloading.close();
             this.exportLoading = false;
           });
       }