|
|
@@ -632,6 +632,14 @@ export default {
|
|
|
if (this.isSuper || hasRole) {
|
|
|
const a = document.createElement('a')
|
|
|
a.href = this.optionFile.url
|
|
|
+
|
|
|
+ console.log('文件下载替换前地址:',a.href)
|
|
|
+ const url = new URL(a.href)
|
|
|
+ //替换文件下载路径为浏览器路径
|
|
|
+ url.host = window.location.host;
|
|
|
+ a.href = url.href
|
|
|
+ console.log('文件下载替换后地址:',a.href)
|
|
|
+
|
|
|
a.download = this.optionFile.data.fileName
|
|
|
document.body.appendChild(a)
|
|
|
a.click()
|