Browse Source

Merge branch 'master' into dev-calendar

test
dai 3 years ago
parent
commit
36c6ae9aad
  1. 11
      src/views/modules/cpts/baobiao/index.vue

11
src/views/modules/cpts/baobiao/index.vue

@ -148,6 +148,14 @@ export default {
async exportAll(reportId, paramKey, reportName) { async exportAll(reportId, paramKey, reportName) {
const url = "/oper/customize/icCustomerReport/batch-export"; const url = "/oper/customize/icCustomerReport/batch-export";
const loading = this.$loading({
lock: true,
text: "批量导出中",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.5)",
});
axios({ axios({
url: window.SITE_CONFIG["apiURL"] + url, url: window.SITE_CONFIG["apiURL"] + url,
method: "post", method: "post",
@ -158,6 +166,7 @@ export default {
responseType: "blob", responseType: "blob",
}) })
.then((res) => { .then((res) => {
loading.close();
console.log("批量导出接口返回", res); console.log("批量导出接口返回", res);
// let fileName = window.decodeURI( // let fileName = window.decodeURI(
// res.headers["content-disposition"].split(";")[1].split("=")[1] // res.headers["content-disposition"].split(";")[1].split("=")[1]
@ -177,6 +186,8 @@ export default {
}) })
.catch((err) => { .catch((err) => {
console.log("批量导出失败", err); console.log("批量导出失败", err);
loading.close();
return this.$message.error("网络错误"); return this.$message.error("网络错误");
}); });
}, },

Loading…
Cancel
Save