|
|
@@ -49,6 +49,9 @@
|
|
|
<div class="form-group m-2">
|
|
|
<button class="form-control btn btn-sm btn-info" @click="searchData()">查询</button>
|
|
|
</div>
|
|
|
+ <div class="form-group m-2">
|
|
|
+ <button class="form-control btn btn-sm btn-success" @click="downExcel()">导出EXCEL</button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<!-- 表格-->
|
|
|
<table class="table table-striped table-bordered table-hover text-nowrap waybill-table td-min-width-80"
|
|
|
@@ -457,6 +460,28 @@
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ downExcel() {
|
|
|
+ let url = this.getBaseUrl();
|
|
|
+ url += '/api/device/check/receiveBoard/export';
|
|
|
+ let search = this.getSearch();
|
|
|
+ axios.post(url, search).then(res => {
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ let filename = res.data.data;
|
|
|
+ let downUrl = this.getBaseUrl() + '/api/device/check/receiveBoard/download?filename=' + filename;
|
|
|
+ let link = document.createElement('a');
|
|
|
+ link.style.display = 'none';
|
|
|
+ link.href = downUrl;
|
|
|
+ link.download = `${filename}.xlsx`;
|
|
|
+ document.body.appendChild(link);
|
|
|
+ link.click();
|
|
|
+ document.body.removeChild(link);
|
|
|
+ tempTip.showSuccess('导出成功!');
|
|
|
+ } else {
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show(res.data.data);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
},
|
|
|
|