Jelajahi Sumber

红包记录导出

三七 3 hari lalu
induk
melakukan
584a29ed1b
1 mengubah file dengan 14 tambahan dan 3 penghapusan
  1. 14 3
      src/views/course/courseRedPacketLog/index.vue

+ 14 - 3
src/views/course/courseRedPacketLog/index.vue

@@ -410,12 +410,23 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
-          this.exportLoading = true;
-          return exportCourseRedPacketLog(queryParams);
+        const loadingInstance = this.$loading({
+          lock: true,
+          text: '正在导出数据,请稍候...',
+          background: 'rgba(0, 0, 0, 0.7)'
+        });
+
+        this.exportLoading = true;
+          // return exportCourseRedPacketLog(queryParams);
+        return exportCourseRedPacketLog(queryParams).finally(res=>{
+          loadingInstance.close();
+        })
         }).then(response => {
           this.download(response.msg);
           this.exportLoading = false;
-        }).catch(() => {});
+        }).catch(() => {}).finally(res=>{
+
+      });
     }
   }
 };