|
@@ -244,10 +244,12 @@ function handleReportCancel(item){
|
|
|
// type 1-pdf 2-长图
|
|
|
function downloadPdfImg(item,type){
|
|
|
showReportItemOpt.value=false
|
|
|
+ let name = `${item.Title}${moment().format('YYYYMMDD')}`
|
|
|
if(type == 1){
|
|
|
- window.open(item.DetailPdfUrl,"_blank")
|
|
|
+ // window.open(item.DetailPdfUrl,"_blank")
|
|
|
+ startDownload(item.DetailPdfUrl,name)
|
|
|
}else{
|
|
|
- startDownload(item.DetailImgUrl,`${item.Title}.jpeg`)
|
|
|
+ startDownload(item.DetailImgUrl,name)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -360,7 +362,15 @@ const downloadUrl = `${import.meta.env.VITE_APP_API_URL}/voice/download`
|
|
|
function handleDownloadAudio(item) {
|
|
|
showReportItemOpt.value = false;
|
|
|
let url = downloadUrl+`?ReportId=${parseInt(item.Id)}`;
|
|
|
- startDownload(url,item.VideoName);
|
|
|
+
|
|
|
+ const elink = document.createElement('a')
|
|
|
+ elink.download = item.VideoName
|
|
|
+ elink.style.display = 'none'
|
|
|
+ elink.href = url
|
|
|
+ document.body.appendChild(elink)
|
|
|
+ elink.click()
|
|
|
+ window.URL.revokeObjectURL(elink.href)
|
|
|
+ document.body.removeChild(elink)
|
|
|
}
|
|
|
|
|
|
|