From ab04ec484fb2907cb75608280dcd4d12aa48d073 Mon Sep 17 00:00:00 2001
From: 董国庆 <364620639@qq.com>
Date: 星期六, 28 六月 2025 14:15:27 +0800
Subject: [PATCH] 详情文件下载

---
 laboratory/src/views/reportLibrary/verificationRelease/components/approval/index.vue |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/laboratory/src/views/reportLibrary/verificationRelease/components/approval/index.vue b/laboratory/src/views/reportLibrary/verificationRelease/components/approval/index.vue
index 2d392e1..582ec2b 100644
--- a/laboratory/src/views/reportLibrary/verificationRelease/components/approval/index.vue
+++ b/laboratory/src/views/reportLibrary/verificationRelease/components/approval/index.vue
@@ -65,6 +65,7 @@
                             <el-form-item prop="feasibilityReportFiles" style="margin-top: -18px">
                                 <el-upload
                                 disabled
+                                :on-preview="handlePreview"
                                     :file-list="fileList"
                                 />
                             </el-form-item>
@@ -118,6 +119,7 @@
 import AiEditor from '@/components/AiEditor'
 import { getDetail } from '../../service';
 import { customUploadRequest, getFullUrl } from "@/utils/utils";
+import apiConfig from '@/utils/baseurl';
 
 
 export default {
@@ -174,6 +176,17 @@
     },
     methods: {
         getFullUrl,
+        handlePreview(file) {
+            console.log('url', file)
+            if (file && file.url) {
+                if (file.url && file.url.startsWith(apiConfig.showImgUrl)) {
+                    window.open(file.url, '_blank');
+                }else{
+                    let newUrl=apiConfig.showImgUrl+file.url;
+                    window.open(newUrl, '_blank');
+                }
+            }
+        },
         open() {
             if (!this.obj.id) {
                 this.$message.error('缺少必要参数');

--
Gitblit v1.7.1