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/components/Attachment/lims-attachment.vue | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/components/Attachment/lims-attachment.vue b/src/components/Attachment/lims-attachment.vue
index 62ae50d..ae6a8b0 100644
--- a/src/components/Attachment/lims-attachment.vue
+++ b/src/components/Attachment/lims-attachment.vue
@@ -60,6 +60,7 @@
<script>
import request from '@/utils/request'
+import { resolveAttachmentUrl } from '@/utils/attachment'
import filePreview from '@/components/Preview/filePreview.vue'
/**
@@ -298,7 +299,7 @@
this.previewVisible = true
},
downloadFile(row) {
- this.$download.saveAs(this.fullUrl(row.fileUrl), row.fileName)
+ return this.$download.attachment(row, row.fileName)
},
removeFile(row) {
this.$confirm('鏄惁鍒犻櫎璇ラ檮浠讹紵', '鎻愮ず', { type: 'warning' }).then(() => {
@@ -314,8 +315,7 @@
},
// 闈欐�佸湴鍧�鎷兼帴锛屼笌鍚庣涓婁紶缁熶竴璺敱淇濇寔涓�鑷达細鍥剧墖鍦� /img锛屽叾瀹冮兘鍦� /word
fullUrl(fileUrl) {
- const base = /\.(jpg|jpeg|png|gif)$/i.test(fileUrl) ? '/img/' : '/word/'
- return this.javaApi + base + fileUrl
+ return resolveAttachmentUrl(fileUrl)
}
}
}
--
Gitblit v1.9.3