From 95db3ac1352e1f98ba934da9e86fca00e661abe9 Mon Sep 17 00:00:00 2001
From: zjk <852185829@qq.com>
Date: 星期五, 12 九月 2025 15:01:07 +0800
Subject: [PATCH] feat: IP地址判断

---
 laboratory/src/views/reportLibrary/feasibilityStudy/components/approval/index.vue |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/laboratory/src/views/reportLibrary/feasibilityStudy/components/approval/index.vue b/laboratory/src/views/reportLibrary/feasibilityStudy/components/approval/index.vue
index 49e3da5..b177b84 100644
--- a/laboratory/src/views/reportLibrary/feasibilityStudy/components/approval/index.vue
+++ b/laboratory/src/views/reportLibrary/feasibilityStudy/components/approval/index.vue
@@ -1,6 +1,6 @@
 <template>
-  <el-dialog :title="dialogTitle" :visible.sync="visible" width="90%" top="5vh" @open="open"  :close-on-click-modal="false"
-    @close="handleClose">
+  <el-dialog :title="dialogTitle" :visible.sync="visible" width="90%" top="5vh" @open="open"
+    :close-on-click-modal="false" @close="handleClose">
     <div class="approval-dialog" :style="{ height: obj.isDetail ? '80vh' : '60vh' }">
       <!-- 左侧审批内容 -->
       <div class="approval-content">
@@ -109,7 +109,7 @@
 import ApprovalProcess from "@/components/approvalProcess";
 import AiEditor from "@/components/AiEditor";
 import { getDetail } from "../../service";
-import { customUploadRequest, getFullUrl } from "@/utils/utils";
+import { customUploadRequest, getFullUrl, getAllocateIp } from "@/utils/utils";
 import apiConfig from '@/utils/baseurl';
 
 export default {
@@ -169,10 +169,10 @@
     handlePreview(file) {
       console.log('url', file)
       if (file && file.url) {
-        if (file.url && file.url.startsWith(apiConfig.showImgUrl)) {
+        if (file.url && file.url.startsWith(getAllocateIp())) {
           window.open(file.url, '_blank');
         } else {
-          let newUrl = apiConfig.showImgUrl + file.url;
+          let newUrl = getAllocateIp() + file.url;
           window.open(newUrl, '_blank');
         }
       }

--
Gitblit v1.7.1