dev_forum
杨树林 5 years ago
parent 6e47803988
commit 6f6e4e4eaf

@ -1336,7 +1336,7 @@ class Listofworks extends Component {
}); });
} }
myBase64
// 导出实习报告批量 // 导出实习报告批量
internshipreport = (url)=>{ internshipreport = (url)=>{
console.log("internshipreport"); console.log("internshipreport");
@ -1366,7 +1366,7 @@ class Listofworks extends Component {
//后台再header中传文件名 //后台再header中传文件名
const name = decodeURI(response.headers['content-disposition'].split('=')[1]) const name = decodeURI(response.headers['content-disposition'].split('=')[1])
downloadElement.href = href downloadElement.href = href
downloadElement.download = name // downloadElement.download = name
document.body.appendChild(downloadElement) document.body.appendChild(downloadElement)
downloadElement.click() downloadElement.click()
document.body.removeChild(downloadElement) // 下载完成移除元素 document.body.removeChild(downloadElement) // 下载完成移除元素

Loading…
Cancel
Save