From 5cb2a8fc5e5b67097ccb2ecb4128a4b667b68567 Mon Sep 17 00:00:00 2001 From: kun <1422840143@qq.com> Date: Fri, 21 Jun 2024 17:22:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=87=E4=BB=B6=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A2=84=E8=A7=88=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/readonlyDialogDiv/index.vue | 13 +++++++++++++ .../components/fileListDialogDiv/index.vue | 2 +- .../components/readonlyDialogDiv/index.vue | 15 ++++++++++++++- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/views/goverment/huizhou/preProjectManagement/components/readonlyDialogDiv/index.vue b/src/views/goverment/huizhou/preProjectManagement/components/readonlyDialogDiv/index.vue index 110a8ed..74a872c 100644 --- a/src/views/goverment/huizhou/preProjectManagement/components/readonlyDialogDiv/index.vue +++ b/src/views/goverment/huizhou/preProjectManagement/components/readonlyDialogDiv/index.vue @@ -987,6 +987,7 @@ @@ -1002,6 +1003,10 @@ import { ElMessage, ElMessageBox } from "element-plus"; import { useDownload } from "@/hooks/useDownload"; import AreaSelected from "@/components/ChinaAreaData/index.vue"; import divDialogComponent from "@/components/divDialogComponent/index.vue"; +import { Base64 } from "js-base64"; +const uplUrl = import.meta.env.VITE_ULD_API_URL; +const baseUrl = window.location.protocol + "//" + window.location.host; +// const baseUrl = import.meta.env.VITE_API_URL; const emits = defineEmits(["update:ennMEssageVisible"]); const props = defineProps(["relativeId", "ennMEssageVisible"]); const current = ref([]); @@ -1197,6 +1202,14 @@ const onDowmload = row => { useDownload(exportApp, `${row.name}`, { fileUrl: row.response.fileUrl }) ); }; +const onPreview = (row: any) => { + const fileExtension = row.fileUrl.slice(row.fileUrl.lastIndexOf(".") + 1); + const url = Base64.encode(baseUrl + "/xmgl/file/preview?fileUrl=" + row.fileUrl + "&fullfilename=123." + fileExtension); + // 标记打包 + // const url1 = "http://182.90.224.147:8012/onlinePreview?url="; + // const url1 = "http://192.168.34.155:8012/onlinePreview?url="; + window.open(uplUrl + url); +}; // 附件信息的查看点击 const onAppendix = row => { console.log(row); diff --git a/src/views/goverment/huizhou/projectList/components/fileListDialogDiv/index.vue b/src/views/goverment/huizhou/projectList/components/fileListDialogDiv/index.vue index 7045bf2..d8d9df7 100644 --- a/src/views/goverment/huizhou/projectList/components/fileListDialogDiv/index.vue +++ b/src/views/goverment/huizhou/projectList/components/fileListDialogDiv/index.vue @@ -115,6 +115,7 @@ import { jxj_User } from "@/api/types"; import { useHandleData } from "@/hooks/useHandleData"; import divDialogComponent from "@/components/divDialogComponent/index.vue"; import { Base64 } from "js-base64"; +const uplUrl = import.meta.env.VITE_ULD_API_URL; const emits = defineEmits(["update:fileListVisible"]); const props = defineProps(["relativeId", "engineeringSn", "fileListVisible"]); const selectedAnnex = ref(); // 选中的查看附件 @@ -149,7 +150,6 @@ const addDialogVisible = ref(false); const dialogVisible = ref(false); const annexFiles = ref([]); const visible1 = ref(false); -const uplUrl = import.meta.env.VITE_ULD_API_URL; // 保存附件文件上传列表 const saveAnnexFile = async () => { let requestData = { diff --git a/src/views/goverment/huizhou/projectList/components/readonlyDialogDiv/index.vue b/src/views/goverment/huizhou/projectList/components/readonlyDialogDiv/index.vue index 9c126ba..425e9ad 100644 --- a/src/views/goverment/huizhou/projectList/components/readonlyDialogDiv/index.vue +++ b/src/views/goverment/huizhou/projectList/components/readonlyDialogDiv/index.vue @@ -290,6 +290,7 @@ @@ -305,6 +306,10 @@ import { ElMessage, ElMessageBox } from "element-plus"; import { useDownload } from "@/hooks/useDownload"; import AreaSelected from "@/components/ChinaAreaData/index.vue"; import divDialogComponent from "@/components/divDialogComponent/index.vue"; +import { Base64 } from "js-base64"; +const uplUrl = import.meta.env.VITE_ULD_API_URL; +const baseUrl = window.location.protocol + "//" + window.location.host; +// const baseUrl = import.meta.env.VITE_API_URL; const emits = defineEmits(["update:ennMEssageVisible"]); const props = defineProps(["relativeId", "ennMEssageVisible"]); const current = ref([]); @@ -320,6 +325,14 @@ const onDowmload = row => { useDownload(exportApp, `${row.fileName}`, { fileUrl: row.fileUrl }) ); }; +const onPreview = (row: any) => { + const fileExtension = row.fileUrl.slice(row.fileUrl.lastIndexOf(".") + 1); + const url = Base64.encode(baseUrl + "/xmgl/file/preview?fileUrl=" + row.fileUrl + "&fullfilename=123." + fileExtension); + // 标记打包 + // const url1 = "http://182.90.224.147:8012/onlinePreview?url="; + // const url1 = "http://192.168.34.155:8012/onlinePreview?url="; + window.open(uplUrl + url); +}; // 附件信息的查看点击 const onAppendix = row => { dialogVisible.value = true; @@ -521,7 +534,7 @@ onMounted(async () => { border-left: 2px solid #0f81ff; font-size: 24px; color: #333333; - width: 90%; + width: 97%; margin: 20px auto; > img { width: 16px;