getData('exportCollision',{
params:{
humanNo:that.inputID,
archiveId:that.inputTxt,
description:that.queryOptions,
page:that.pageable.page - 1,
size:that.pageable.rows
},
headers: {
'Authorization': 'Bearer ' + sessionStorage.getItem("access_token"),
},
responseType:'blob'
}).then(res=>{
// console.log(res)
if(res.status==200){
that.exportModalVisible = false
that.$message.success('下载成功')
var disposition = res.headers['content-disposition'];
const content = res.request.response;
const blob = new Blob([content]);
var matches = disposition.split(';')[1].split('=')[1]; //不固定
var filename = decodeURI((matches != null && matches ? matches : 'file.xls').replace(/\"/g, ''));
var link = document.createElement('a');
link.href = window.URL.createObjectURL(blob);
link.download = filename;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}else{
that.$message.error(res.data.msg)
}
}).catch(err=>{
console.log(err)
if(err.response.status==401){
location.href = '/login.html';
}
})