From 5c5465e7718a84d5b2a39f4e5fae7d220bd4d8ed Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 05 三月 2025 10:13:14 +0800
Subject: [PATCH] 检验任务复核检验任务下载报告,下载的内容以后缀.htm形式出现
---
src/views/business/materialOrderComponents/materialOrder/downFileDialog.vue | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/views/business/materialOrderComponents/materialOrder/downFileDialog.vue b/src/views/business/materialOrderComponents/materialOrder/downFileDialog.vue
index 1f2faab..6ff5627 100644
--- a/src/views/business/materialOrderComponents/materialOrder/downFileDialog.vue
+++ b/src/views/business/materialOrderComponents/materialOrder/downFileDialog.vue
@@ -46,13 +46,27 @@
methods: {
// 杩涘巶妫�楠屾姤鍛婁笅杞�
downLoad0 () {
- let url = this.javaApi+'/word/' + this.downLoadInfo.enterUrlS ? this.downLoadInfo.enterUrlS : this.downLoadInfo.enterUrl
- this.$download.saveAs(url, this.downLoadInfo.fileName);
+ let url = this.downLoadInfo.enterUrlS ? this.downLoadInfo.enterUrlS : this.downLoadInfo.enterUrl
+ if(url){
+ url = url.split('.')[0]+'.pdf'
+ const link = document.createElement('a');
+ link.href = this.javaApi + url;
+ link.target = '_blank';
+ document.body.appendChild(link);
+ link.click();
+ }
},
// 瀛e害妫�楠屾姤鍛婁笅杞�
downLoad1 () {
- let url = this.javaApi+'/word/' + this.downLoadInfo.quarterUrlS ? this.downLoadInfo.quarterUrlS : this.downLoadInfo.quarterUrl
- this.$download.saveAs(url, this.downLoadInfo.fileName);
+ let url = this.downLoadInfo.quarterUrlS ? this.downLoadInfo.quarterUrlS : this.downLoadInfo.quarterUrl
+ if(url){
+ url = url.split('.')[0]+'.pdf'
+ const link = document.createElement('a');
+ link.href = this.javaApi + url;
+ link.target = '_blank';
+ document.body.appendChild(link);
+ link.click();
+ }
}
},
}
--
Gitblit v1.9.3