From 8a5b59a9adeef9e0a65890956885fd43ed678216 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 25 二月 2025 17:52:56 +0800
Subject: [PATCH] 质量监控计划
---
src/views/business/reportPreparation/index.vue | 27 +++++----------------------
1 files changed, 5 insertions(+), 22 deletions(-)
diff --git a/src/views/business/reportPreparation/index.vue b/src/views/business/reportPreparation/index.vue
index f1a6481..640fd87 100644
--- a/src/views/business/reportPreparation/index.vue
+++ b/src/views/business/reportPreparation/index.vue
@@ -555,13 +555,10 @@
let url = '';
if(res.data.type==1){
url = this.javaApi+'/img/'+res.data.fileUrl
- file.downloadIamge(url,row.fileName)
+ this.$download.saveAs(url, row.fileName);
}else{
url = this.javaApi+'/word/'+res.data.fileUrl
- const link = document.createElement('a');
- link.href = url;
- link.download = row.fileName;
- link.click();
+ this.$download.saveAs(url, row.fileName);
}
}
}).catch(error => {
@@ -603,17 +600,7 @@
downAll({ids: str}).then(res => {
this.outLoading = false
this.$message.success('瀵煎嚭鎴愬姛')
- // const blob = new Blob([res],{ type: 'application/octet-stream' });
- // const url = URL.createObjectURL(blob);
- // const link = document.createElement('a');
- // link.href = url;
- // link.download = '鎶ュ憡.zip';
- // link.click();
- const link = document.createElement('a');
- link.href = this.javaApi + res.message;
- link.target = '_blank';
- document.body.appendChild(link);
- link.click();
+ this.$download.saveAs(this.javaApi + res.message, row.fileName);
})
},
beforeUpload(file){
@@ -709,12 +696,8 @@
}
},
download(row) {
- let url = row.urlS ? row.urlS : row.url;
- const link = document.createElement('a');
- link.href = this.javaApi + url;
- link.target = '_blank';
- document.body.appendChild(link);
- link.click();
+ let url = this.javaApi+'/word/' + row.urlS ? row.urlS : row.url;
+ this.$download.saveAs(url, row.fileName);
},
// 杩樺師鎿嶄綔
handleRestore(row) {
--
Gitblit v1.9.3