接收文件流>转new Blob>利用a标签下载
wcycOut(params).then(res =>{
self.loadingOut = false
let binaryData = [];
binaryData.push(res.data);
const blob = new Blob(binaryData);
let reader = new FileReader();
reader.readAsDataURL(blob);
reader.onload = function (e) {
let _ele = document.createElement('a');
document.body.appendChild(_ele);
_ele.setAttribute('href', e.target.result);
_ele.setAttribute('download', '导出文件.xlsx');
_ele.click();
_ele.remove();
};
}).catch(err =>{
self.loadingOut = false
self.$message.error(err.message)
})