前端导出后端返回的数据流为xlsx文件
后端返回格式为PK开头
exportMonitor({ids:idsList}).then((res:any)=>{ const link = document.createElement('a') let blob = new Blob([res], { type: 'application/vnd.ms-excel' }) link.style.display = 'none' link.href = URL.createObjectURL(blob) let time = formatDate(new Date(),'YYYY-mm-dd HH:MM:SS'); link.download = '任务监控' + time + '.xlsx' //下载的文件名 document.body.appendChild(link) link.click() document.body.removeChild(link) })