|
@@ -124,6 +124,9 @@
|
|
|
|
|
|
<!-- table区域 -->
|
|
|
<a-card :bordered="false" style=" marginTop:10px;">
|
|
|
+ <div class="table-operator">
|
|
|
+ <a-button type="primary" @click="exportList('计划单统计表')" icon="plus">导出</a-button>
|
|
|
+ </div>
|
|
|
<a-table
|
|
|
bordered
|
|
|
rowKey="index"
|
|
@@ -507,6 +510,31 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ //导出
|
|
|
+ exportList(fileName){
|
|
|
+ var params = this.queryParam
|
|
|
+ downFile('/orderData/syCostLossReview/planExportXls', params).then(data => {
|
|
|
+ console.log('888')
|
|
|
+ if (!data) {
|
|
|
+ this.$message.warning('文件下载失败')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
|
|
+ window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xlsx')
|
|
|
+ } else {
|
|
|
+ let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
|
|
|
+ let link = document.createElement('a')
|
|
|
+ link.style.display = 'none'
|
|
|
+ link.href = url
|
|
|
+ link.setAttribute('download', fileName + '.xlsx')
|
|
|
+ document.body.appendChild(link)
|
|
|
+ link.click()
|
|
|
+ document.body.removeChild(link) // 下载完成移除元素
|
|
|
+ window.URL.revokeObjectURL(url) // 释放掉blob对象
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
handleTableChange(pagination, filters, sorter) {
|
|
|
this.queryParam.pageNo = pagination.current
|
|
|
this.queryParam.pageSize = pagination.pageSize
|