forked from github/dataease
Merge pull request #12774 from dataease/dev-v2@fixexportdata
fix: 【数据导出中心】文件下载体验优化
This commit is contained in:
commit
950c7a42e0
@ -288,22 +288,9 @@ const timestampFormatDate = value => {
|
||||
}
|
||||
return new Date(value).toLocaleString()
|
||||
}
|
||||
import { PATH_URL } from '@/config/axios/service'
|
||||
const downloadClick = item => {
|
||||
downloadFile(item.id)
|
||||
.then(res => {
|
||||
const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
|
||||
const link = document.createElement('a')
|
||||
link.style.display = 'none'
|
||||
link.href = URL.createObjectURL(blob)
|
||||
link.download = item.fileName // 下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
URL.revokeObjectURL(link.href)
|
||||
})
|
||||
.finally(() => {
|
||||
exportDatasetLoading.value = false
|
||||
})
|
||||
window.open(PATH_URL + '/exportCenter/download/' + item.id, '_blank')
|
||||
}
|
||||
|
||||
const retry = item => {
|
||||
|
@ -72,6 +72,7 @@ public class WhitelistUtils {
|
||||
|| StringUtils.startsWithAny(requestURI, "/typeface/download")
|
||||
|| StringUtils.startsWithAny(requestURI, "/typeface/defaultFont")
|
||||
|| StringUtils.startsWithAny(requestURI, "/typeface/listFont")
|
||||
|| StringUtils.startsWithAny(requestURI, "/exportCenter/download")
|
||||
|| StringUtils.startsWithAny(requestURI, "/communicate/image/")
|
||||
|| StringUtils.startsWithAny(requestURI, "/communicate/down/");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user