handleClick(str){
downLoadReport({
id:str.id
},{responseType:'blob'}).then((response) => {
console.log(response.headers['content-disposition'])
// debugger
// let data = res.data
// let url = window.URL.createObjectURL(new Blob([data]))
// let link = document.createElement('a')
// link.style.display = 'none'
// link.href = url
// link.setAttribute('download', 'test.rar')
// document.body.appendChild(link)
// link.click()
var blob = new Blob([response.data], {type: 'application/xlsx;charset=utf-8'});
console.log(blob, response,)
let fileName = response.headers['content-disposition'].split(';')[1]
fileName = decodeURI(fileName).substring(9)
var downloadElement = document.createElement('a');
var href = window.URL.createObjectURL(blob); // 创建下载的链接
downloadElement.href = href;
downloadElement.download = fileName // 下载后文件名
document.body.appendChild(downloadElement);
downloadElement.click(); // 点击下载
document.body.removeChild(downloadElement); // 下载完成移除元素
window.URL.revokeObjectURL(href); // 释放掉blob对象
})
},