diff --git a/src/util/util.js b/src/util/util.js index fdc64e0..f1a1f73 100644 --- a/src/util/util.js +++ b/src/util/util.js @@ -379,6 +379,12 @@ export function exportMethodPost(url, name, data = {}) { responseType: "blob", }) .then((res) => { + console.log(res,'数据'); + if(res.size==0){ + this.$message.warning('当前报表没数据') + console.log('没数据'); + return + } let blob = new Blob([res], { type: "application/vnd.ms-excel" }); let date = new Date(); let time = date.toLocaleDateString(); diff --git a/src/views/Customer/index.vue b/src/views/Customer/index.vue index c01c371..abd75f5 100644 --- a/src/views/Customer/index.vue +++ b/src/views/Customer/index.vue @@ -449,7 +449,7 @@ export default { methods: { downLoad(){ // this.searchForm - // exportMethodPost() + exportMethodPost('autoSR/customer/customerManagementExport','客户管理',this.searchForm) }, // 跳转接待详情 Receivedetailsabout(row){ diff --git a/src/views/Equipment/equipmentDetailList.vue b/src/views/Equipment/equipmentDetailList.vue index 29c7bb9..fd07f4a 100644 --- a/src/views/Equipment/equipmentDetailList.vue +++ b/src/views/Equipment/equipmentDetailList.vue @@ -99,6 +99,9 @@ +