Commit 232852a7 authored by danfuman's avatar danfuman

修改

parent bb3fcb8d
......@@ -271,21 +271,27 @@
this.dataEXCEL.pageSize=this.tableDataTotal;
}
delete this.dataEXCEL.pageNum
//exportWinBid
exportWinBid(this.dataEXCEL).then(res=>{
console.log(res.data)
if(res.code === 200){
this.downloadFile(res.data.originalName,res.data.url)
this.downloadFile(res.data.url,res.data.originalName)
}
})
// this.$download.exportByPost('/combine/info/export/win/bid',this.dataEXCEL,'集团中标.xlsx');
},
downloadFile(fileName,fileUrl) {
const link = document.createElement('a');
link.href = fileUrl;
link.setAttribute('download', fileName);
link.click();
},
downloadFile(url, fileName) {
const x = new XMLHttpRequest()
x.open("GET", url, true)
x.responseType = 'blob'
x.onload=function(e) {
const url = window.URL.createObjectURL(x.response)
const a = document.createElement('a')
a.href = url
a.download = fileName
a.click()
a.remove()
}
x.send()
}
}
}
</script>
......
......@@ -363,7 +363,25 @@
this.dataEXCEL.pageSize=this.tableDataTotal;
}
delete this.dataEXCEL.pageNum
this.$download.exportByPost('/combine/info/export/bid',this.dataEXCEL,'集团招标.xlsx');
exportBid(this.dataEXCEL).then(res=>{
if(res.code === 200){
this.downloadFile(res.data.url,res.data.originalName)
}
})
},
downloadFile(url, fileName) {
const x = new XMLHttpRequest()
x.open("GET", url, true)
x.responseType = 'blob'
x.onload=function(e) {
const url = window.URL.createObjectURL(x.response)
const a = document.createElement('a')
a.href = url
a.download = fileName
a.click()
a.remove()
}
x.send()
},
clickFocus(e){
document.getElementById(e).classList.toggle('span-ba')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment