From c16edc131625d4d7dd3624cc1485695bfb89707d Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期一, 26 十月 2026 17:43:23 +0800
Subject: [PATCH] refactor(download): 统一附件下载逻辑到 download 插件
---
src/views/CNAS/resourceDemand/device/component/check.vue | 13 +------------
1 files changed, 1 insertions(+), 12 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/device/component/check.vue b/src/views/CNAS/resourceDemand/device/component/check.vue
index b6257eb..e0038cc 100644
--- a/src/views/CNAS/resourceDemand/device/component/check.vue
+++ b/src/views/CNAS/resourceDemand/device/component/check.vue
@@ -516,10 +516,7 @@
},
// end
handleAttachmentClick(row) {
- // 妯℃嫙涓嬭浇闄勪欢
- const imageUrl = this.javaApi + '/img/' + row.systemFileName; // 鍥剧墖 URL
- file.downloadIamge(imageUrl, row.fileName)
- // downloadImage(imageUrl, row.fileName);
+ return this.$download.attachment({ fileUrl: row.systemFileName }, row.fileName)
},
// 娣诲姞鏍告煡璁板綍
add(type) {
@@ -583,14 +580,6 @@
}
}
-function downloadImage(url, name) {
- const link = document.createElement('a');
- link.href = url;
- link.download = name; // 鏂囦欢鍚�
- document.body.appendChild(link);
- link.click();
- document.body.removeChild(link);
-}
</script>
<style scoped>
.dialog-content {
--
Gitblit v1.9.3