瀏覽代碼

红包记录导出

三七 3 天之前
父節點
當前提交
584a29ed1b
共有 1 個文件被更改,包括 14 次插入3 次删除
  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=>{
+
+      });
     }
   }
 };