From 7454813b2c00fae382b0449c971d0e0994a57cc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=A6=8F=E8=B4=A2?= <1471584931@qq.com> Date: Tue, 2 Dec 2025 18:14:47 +0800 Subject: [PATCH 1/6] =?UTF-8?q?---=E8=B7=AF=E7=94=B1=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/routes/basic.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/router/routes/basic.ts b/src/router/routes/basic.ts index d53957b..fff8355 100644 --- a/src/router/routes/basic.ts +++ b/src/router/routes/basic.ts @@ -224,14 +224,14 @@ export const FLOW_ROUTE: AppRouteRecordRaw[] = [{ title: (route) => '查看'+(route.query.formName||'表单') } }, - { - path: 'createFormCustomer', - name: 'createFormCustomer', - component: () => import('/@/views/sales/Customer/formCreatePage.vue'), - meta: { - title: (route) => '新建'+(route.query.formName||'表单') - } - } + // { + // path: 'createFormCustomer', + // name: 'createFormCustomer', + // component: () => import('/@/views/sales/Customer/formCreatePage.vue'), + // meta: { + // title: (route) => '新建'+(route.query.formName||'表单') + // } + // } ] }]; export const PROCESS_MONITORING: AppRouteRecordRaw[] = [{ From 2a38e484b62c3e97b589b0f78ae5c33f0f377f85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=A6=8F=E8=B4=A2?= <1471584931@qq.com> Date: Fri, 5 Dec 2025 10:10:10 +0800 Subject: [PATCH 2/6] =?UTF-8?q?---=E4=BF=AE=E6=94=B9=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.production b/.env.production index 98cc140..de84268 100644 --- a/.env.production +++ b/.env.production @@ -25,7 +25,7 @@ VITE_GLOB_REQUEST_TIMEOUT=600000 # 文件上传地址 可以由nginx做转发或者直接写实际地址 -VITE_GLOB_UPLOAD_URL = /system/oss/upload +VITE_GLOB_UPLOAD_URL = /system/file/upload # 文件预览接口 可选 VITE_GLOB_UPLOAD_PREVIEW = /preview/onlinePreview?url= @@ -42,7 +42,7 @@ VITE_GLOB_API_URL_PREFIX = # 打包是否开启pwa功能 VITE_USE_PWA = false #租户开关 -# VITE_GLOB_TENANT_ENABLED = true +VITE_GLOB_TENANT_ENABLED = true #登录时是否需要输入租户码 # VITE_GLOB_TENANT_INPUT_REQUIRED = true From 23464f578b015dfced527b0c1a71dc55765fda8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=A6=8F=E8=B4=A2?= <1471584931@qq.com> Date: Fri, 5 Dec 2025 11:34:18 +0800 Subject: [PATCH 3/6] =?UTF-8?q?--=E4=BF=AE=E6=94=B9=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E6=98=8E=E6=98=BE=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/file/index.ts | 12 ++++++++++++ .../default/header/components/notify/index.vue | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/api/system/file/index.ts b/src/api/system/file/index.ts index 0be3d8c..86ac207 100644 --- a/src/api/system/file/index.ts +++ b/src/api/system/file/index.ts @@ -33,6 +33,18 @@ export function parseDownloadUrl(url:string,th?:boolean,full?:boolean) { return resultUrl; } +export async function getInfoByDownloadUrl(params: {id: string}, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Info, + params, + }, + { + errorMessageMode: mode, + }, + ); +} + /** * @description: 查询文件分页 diff --git a/src/layouts/default/header/components/notify/index.vue b/src/layouts/default/header/components/notify/index.vue index 9124cff..47fd531 100644 --- a/src/layouts/default/header/components/notify/index.vue +++ b/src/layouts/default/header/components/notify/index.vue @@ -161,7 +161,7 @@ import { getOaMessage, getOaNews, setOaRead, setSingleRead, setWorkReadAll, getScheduleMsg, setScheduleRead, setScheduleReadAll } from '/@/api/system/login'; import { queryLoginUserNotices, setSystemNoticeRead } from '/@/api/system/systemNotice/index'; - import { getInfoByDownloadUrl } from '/@/api/system/file'; + import { getInfoByDownloadUrl,parseDownloadUrl } from '/@/api/system/file'; import { Empty } from 'ant-design-vue'; import ApprovalProcess from '/@/views/workflow/task/components/ApprovalProcess.vue'; @@ -356,8 +356,8 @@ record.paramsJson = record.paramsJson ? JSON.parse(record.paramsJson) : {}; let fileId = record.paramsJson.id || []; getInfoByDownloadUrl({ id: fileId }).then((res) => { - let fileUrl = res.fileUrlFixed || res.fileUrl; - downloadByUrl({ url: fileUrl, fileName: res.fileName + res.fileType || 'files.zip' }); + let fileUrl = parseDownloadUrl(res.fileUrl); + downloadByUrl({ url: res.fileUrl, fileName: res.fileOrg || 'files.zip' }); }); return; } From 108957d99cc9458cac5bede70efe8cb3ae194ae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=A6=8F=E8=B4=A2?= <1471584931@qq.com> Date: Fri, 5 Dec 2025 14:44:14 +0800 Subject: [PATCH 4/6] =?UTF-8?q?---=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6?= =?UTF-8?q?=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 --- src/components/Form/src/components/ErpUpload.vue | 2 +- src/components/Form/src/components/InputUpload.vue | 4 +++- src/components/Form/src/components/Upload.vue | 4 +++- src/components/Form/src/components/UploadNew.vue | 11 +++++------ 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/components/Form/src/components/ErpUpload.vue b/src/components/Form/src/components/ErpUpload.vue index 0c3667f..0182ab1 100644 --- a/src/components/Form/src/components/ErpUpload.vue +++ b/src/components/Form/src/components/ErpUpload.vue @@ -200,7 +200,7 @@ const handlePreview = async (file) => { previewImage.value = file.response?.data?.fileUrl || file.fileUrl; previewVisible.value = true; - previewTitle.value = file.name || file.fileName; + previewTitle.value = file.name || file.fileOrg; }; const handleCancel = () => { diff --git a/src/components/Form/src/components/InputUpload.vue b/src/components/Form/src/components/InputUpload.vue index 1446672..2f56fd3 100644 --- a/src/components/Form/src/components/InputUpload.vue +++ b/src/components/Form/src/components/InputUpload.vue @@ -204,7 +204,9 @@ const handlePreview = async (file) => { const fileUrl = file.response?.data?.fileUrl || file.fileUrl; - const fileFullUrl = fileUrl.includes('http://') || fileUrl.includes('https://') ? fileUrl : location.origin + getAppEnvConfig().VITE_GLOB_API_URL + fileUrl; + const fileName = file.response?.data?.fileOrg || file.fileOrg; + let fileFullUrl = fileUrl.includes('http://') || fileUrl.includes('https://') ? fileUrl : location.origin + getAppEnvConfig().VITE_GLOB_API_URL + fileUrl; + fileFullUrl+="&fullfilename="+fileName; previewFile.value = getAppEnvConfig().VITE_GLOB_UPLOAD_PREVIEW + encodeURIComponent(Base64.encode(fileFullUrl)); previewVisible.value = true; diff --git a/src/components/Form/src/components/Upload.vue b/src/components/Form/src/components/Upload.vue index 938eb74..ec69555 100644 --- a/src/components/Form/src/components/Upload.vue +++ b/src/components/Form/src/components/Upload.vue @@ -342,7 +342,9 @@ const handlePreview = async (file) => { const fileUrl = file.response?.data?.fileUrl || file.fileUrl; - const fileFullUrl = fileUrl.includes('http://') || fileUrl.includes('https://') ? fileUrl : location.origin + getAppEnvConfig().VITE_GLOB_API_URL + fileUrl; + const fileName = file.response?.data?.fileOrg || file.fileOrg; + let fileFullUrl = fileUrl.includes('http://') || fileUrl.includes('https://') ? fileUrl : location.origin + getAppEnvConfig().VITE_GLOB_API_URL + fileUrl; + fileFullUrl+="&fullfilename="+fileName; previewFile.value = getAppEnvConfig().VITE_GLOB_UPLOAD_PREVIEW + encodeURIComponent(Base64.encode(fileFullUrl)); previewVisible.value = true; diff --git a/src/components/Form/src/components/UploadNew.vue b/src/components/Form/src/components/UploadNew.vue index a17c6d7..6341eb3 100644 --- a/src/components/Form/src/components/UploadNew.vue +++ b/src/components/Form/src/components/UploadNew.vue @@ -363,12 +363,11 @@ console.log(fileUrl, 'fileUrl', file) window.open(fileUrl) - // previewFile.value = getAppEnvConfig().VITE_GLOB_UPLOAD_PREVIEW + encodeURIComponent(Base64.encode(fileUrl.includes('http://') || fileUrl.includes('https://') ? fileUrl : getAppEnvConfig().VITE_GLOB_API_URL + fileUrl)); - - // previewVisible.value = true; - // previewTitle.value = file.name || file.fileName; - // console.log(previewFile.value, 99) - // console.log(fileUrl.includes('http://') || fileUrl.includes('https://') ? fileUrl : getAppEnvConfig().VITE_GLOB_API_URL + fileUrl); + const fileUrl = file.response?.data?.fileUrl || file.fileUrl; + const fileName = file.response?.data?.fileOrg || file.fileOrg; + let fileFullUrl = fileUrl.includes('http://') || fileUrl.includes('https://') ? fileUrl : location.origin + getAppEnvConfig().VITE_GLOB_API_URL + fileUrl; + fileFullUrl+="&fullfilename="+fileName; + previewFile.value = getAppEnvConfig().VITE_GLOB_UPLOAD_PREVIEW + encodeURIComponent(Base64.encode(fileFullUrl)); }; const handleCancel = () => { From 7a8595bb4b9e874a3ddb9216a8552222710df3cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=A6=8F=E8=B4=A2?= <1471584931@qq.com> Date: Fri, 5 Dec 2025 14:46:05 +0800 Subject: [PATCH 5/6] =?UTF-8?q?---=E4=BC=98=E5=8C=96=E6=96=87=E4=BB=B6?= =?UTF-8?q?=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 --- src/components/Form/src/components/UploadNew.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Form/src/components/UploadNew.vue b/src/components/Form/src/components/UploadNew.vue index 6341eb3..d4ba47c 100644 --- a/src/components/Form/src/components/UploadNew.vue +++ b/src/components/Form/src/components/UploadNew.vue @@ -359,11 +359,11 @@ }; const handlePreview = async (file) => { - const fileUrl = file.presignedUrl|| file.response?.data?.fileUrl || file.fileUrl; - console.log(fileUrl, 'fileUrl', file) - window.open(fileUrl) + // const fileUrl = file.presignedUrl|| file.response?.data?.fileUrl || file.fileUrl; + // console.log(fileUrl, 'fileUrl', file) + // window.open(fileUrl) - const fileUrl = file.response?.data?.fileUrl || file.fileUrl; + const fileUrl = file.presignedUrl|| file.response?.data?.fileUrl || file.fileUrl; const fileName = file.response?.data?.fileOrg || file.fileOrg; let fileFullUrl = fileUrl.includes('http://') || fileUrl.includes('https://') ? fileUrl : location.origin + getAppEnvConfig().VITE_GLOB_API_URL + fileUrl; fileFullUrl+="&fullfilename="+fileName; From d4c07162d4f53138908405569f8bb64540afd2fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=A6=8F=E8=B4=A2?= <1471584931@qq.com> Date: Fri, 5 Dec 2025 16:40:17 +0800 Subject: [PATCH 6/6] =?UTF-8?q?---=E4=BC=98=E5=8C=96=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=88=A0=E9=99=A4=E5=A4=9A=E6=AC=A1=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E6=95=B0=E6=8D=AE=E4=B8=8D=E5=B1=95=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/file/index.ts | 11 ++++ .../Form/src/components/ErpUpload.vue | 17 ++++-- src/components/Form/src/components/Image.vue | 14 +++-- .../Form/src/components/InputUpload.vue | 43 +++++++++------ src/components/Form/src/components/Upload.vue | 52 ++++++++++++------- 5 files changed, 95 insertions(+), 42 deletions(-) diff --git a/src/api/system/file/index.ts b/src/api/system/file/index.ts index 86ac207..c0a2385 100644 --- a/src/api/system/file/index.ts +++ b/src/api/system/file/index.ts @@ -2,6 +2,8 @@ import { defHttp } from '/@/utils/http/axios'; import { ErrorMessageMode } from '/#/axios'; import { FilePageListParams, FilePageListSearchModel, FilePageListResultModel, ZipFilesModel, FileModel } from './model'; +import { Base64 } from 'js-base64'; +import { getAppEnvConfig } from '/@/utils/env'; import { useGlobSetting } from '/@/hooks/setting'; const globSetting = useGlobSetting(); @@ -33,6 +35,12 @@ export function parseDownloadUrl(url:string,th?:boolean,full?:boolean) { return resultUrl; } +export function parsePreviewUrl(fileName: string, fileUrl: string) { + let fileFullUrl = fileUrl.includes('http://') || fileUrl.includes('https://') ? fileUrl : location.origin + getAppEnvConfig().VITE_GLOB_API_URL + fileUrl; + fileFullUrl+="&fullfilename="+fileName; + return getAppEnvConfig().VITE_GLOB_UPLOAD_PREVIEW + encodeURIComponent(Base64.encode(fileFullUrl)); +} + export async function getInfoByDownloadUrl(params: {id: string}, mode: ErrorMessageMode = 'modal') { return defHttp.get( { @@ -132,3 +140,6 @@ export async function getAppToken(params, mode: ErrorMessageMode = 'modal') { }, ); } + + + diff --git a/src/components/Form/src/components/ErpUpload.vue b/src/components/Form/src/components/ErpUpload.vue index 0182ab1..bebe5de 100644 --- a/src/components/Form/src/components/ErpUpload.vue +++ b/src/components/Form/src/components/ErpUpload.vue @@ -93,10 +93,9 @@ const previewImage = ref(''); const previewTitle = ref(''); - watch( - () => props.value, - async (val) => { - if (val) { + + const refreshList = async (val:any) => { + if (val) { fileList.value = await getFileList({ tableName: props.tableName, columnName: props.columnName,tableId: props.value }); if (fileList.value.length) { fileList.value.forEach((x) => { @@ -111,6 +110,12 @@ fileList.value = []; bindValues(undefined); } + }; + + watch( + () => props.value, + async (val) => { + await refreshList(val); }, { immediate: true @@ -133,6 +138,7 @@ }, tableId.value, tableName.value, columnName.value ); + let tableIdValue = tableId.value; bindValues(res[0]); fileList.value.forEach((x) => { x.status = 'done'; //没有则不会展示下载按钮 @@ -142,6 +148,9 @@ emit('update:tableName', tableName.value); emit('update:columnName', columnName.value); emit('change'); + if(tableIdValue==tableId.value){ + await refreshList(tableId.value); + } loading.value = false; } catch (error) { loading.value = false; diff --git a/src/components/Form/src/components/Image.vue b/src/components/Form/src/components/Image.vue index e35cb23..290f75d 100644 --- a/src/components/Form/src/components/Image.vue +++ b/src/components/Form/src/components/Image.vue @@ -75,9 +75,7 @@ visible.value = value; }; - watch( - () => props.value, - async (val) => { + const refreshList = async (val:any) => { if (val) { let result = await getFileList({tableName: props.tableName, columnName: props.columnName,tableId: props.value}); if (result.length) { @@ -93,6 +91,12 @@ if (!val) { fileList.value = ''; } + }; + + watch( + () => props.value, + async (val) => { + await refreshList(val); }, { immediate: true @@ -115,6 +119,7 @@ }, tableId.value, tableName.value, columnName.value ); + const tableIdValue = tableId.value; bindValues(res[0]); if (res.length) { for (let i = 0; i < res.length; i++) { @@ -130,6 +135,9 @@ emit('update:tableName', tableName.value); emit('update:columnName', columnName.value); emit('change'); + if(tableIdValue==tableId.value){ + await refreshList(tableId.value); + } loading.value = false; } catch (error) { console.error(error); diff --git a/src/components/Form/src/components/InputUpload.vue b/src/components/Form/src/components/InputUpload.vue index 2f56fd3..0b6a938 100644 --- a/src/components/Form/src/components/InputUpload.vue +++ b/src/components/Form/src/components/InputUpload.vue @@ -93,26 +93,29 @@ const previewFile = ref(''); const previewTitle = ref(''); + const refreshList = async (val:any) => { + if (val) { + fileList.value = await getFileList({ tableName: props.tableName, columnName: props.columnName,tableId: props.value}); + if (fileList.value.length) { + fileList.value.forEach((x) => { + x.name = x.fileOrg; + x.url = x.fileUrl; + x.thumbUrl = x.thUrl; + x.status = 'done'; //没有则不会展示下载按钮 + }); + bindValues(fileList.value[0]); + name.value = fileList.value[0].fileOrg; + } + } else { + fileList.value = []; + name.value = ''; + } + }; + watch( () => props.value, async (val) => { - if (val) { - fileList.value = await getFileList({ tableName: props.tableName, columnName: props.columnName,tableId: props.value}); - if (fileList.value.length) { - fileList.value.forEach((x) => { - x.name = x.fileOrg; - x.url = x.fileUrl; - x.thumbUrl = x.thUrl; - x.status = 'done'; //没有则不会展示下载按钮 - }); - bindValues(fileList.value[0]); - name.value = fileList.value[0].fileOrg; - } - } - if (!val) { - fileList.value = []; - name.value = ''; - } + await refreshList(val); }, { immediate: true @@ -135,6 +138,7 @@ }, tableId.value, tableName.value, columnName.value ); + const tableIdValue = tableId.value; bindValues(res[0]); fileList.value.forEach((x) => { x.status = 'done'; //没有则不会展示下载按钮 @@ -146,6 +150,7 @@ emit('update:tableName', tableName.value); emit('update:columnName', columnName.value); emit('change'); + if(tableIdValue==tableId.value) await refreshList(tableId.value); loading.value = false; } catch (error) { console.error(error); @@ -183,6 +188,10 @@ deleteFlag.value = true; const index = fileList.value.findIndex((x) => x.id === id); fileList.value.splice(index, 1); + emit('update:value', tableId.value); + emit('update:tableName', tableName.value); + emit('update:columnName', columnName.value); + emit('change'); notification.success({ message: 'Tip', description: '删除成功!' diff --git a/src/components/Form/src/components/Upload.vue b/src/components/Form/src/components/Upload.vue index ec69555..c823c4a 100644 --- a/src/components/Form/src/components/Upload.vue +++ b/src/components/Form/src/components/Upload.vue @@ -110,7 +110,7 @@ import { Upload } from 'ant-design-vue'; import { UploadOutlined, PlusOutlined, DownloadOutlined, DeleteOutlined, EditOutlined, PaperClipOutlined } from '@ant-design/icons-vue'; import { useMessage } from '/@/hooks/web/useMessage'; - import { deleteFile, getAppToken, getFileList, getZipFiles,parseDownloadUrl } from '/@/api/system/file'; + import { deleteFile, getAppToken, getFileList, getZipFiles,parseDownloadUrl,parsePreviewUrl} from '/@/api/system/file'; import { downloadByUrl } from '/@/utils/file/download'; import { uploadMultiApi } from '/@/api/sys/upload'; import Icon from '/@/components/Icon/index'; @@ -119,6 +119,7 @@ import WebOfficeSDK from '/@/assets/libs/open-jssdk-v0.1.3.es.js'; import { getToken } from '/@/utils/auth'; import { useRoute } from 'vue-router'; +import { methodOf } from 'lodash-es'; const route = useRoute(); const { VITE_GLOB_UPLOAD_ALERT_TIP } = getAppEnvConfig(); @@ -169,6 +170,7 @@ const tableId = ref(''); const tableName = ref(''); const columnName = ref(''); + const removeIds = ref([]); const bindValues = (data:any)=>{ if(data){ @@ -191,11 +193,10 @@ const previewFile = ref(''); const previewTitle = ref(''); - watch( - () => props.value, - async (val) => { - if (val) { - fileList.value = await getFileList({ tableName: props.tableName, columnName: props.columnName,tableId: props.value }); + const refreshList = async (val:any) => { + if (val) { + let _list = await getFileList({ tableName: props.tableName, columnName: props.columnName,tableId: props.value }); + fileList.value = _list.filter((o) => !removeIds.value.includes(o.id)); if (fileList.value.length) { fileList.value.forEach((x) => { x.name = x.fileOrg; @@ -208,9 +209,15 @@ } else { bindValues(undefined); } - if (!val) { - fileList.value = []; - } + if (!val) { + fileList.value = []; + } + }; + + watch( + () => props.value, + async (val) => { + await refreshList(val); }, { immediate: true @@ -233,18 +240,22 @@ }, tableId.value, tableName.value, columnName.value ); - bindValues(res[0]); + fileList.value.forEach((x) => { x.status = 'done'; //没有则不会展示下载按钮 x.url = x.fileUrl; x.thumbUrl = x.thUrl; x.fileSize = x.fileSize }); - + let tableIdValue = tableId.value; + bindValues(res[0]); emit('update:value', tableId.value); emit('update:tableName', tableName.value); emit('update:columnName', columnName.value); emit('change'); + if(tableIdValue==tableId.value){ + await refreshList(tableId.value); + } loading.value = false; } catch (error) { console.error(error); @@ -284,9 +295,16 @@ const id = info.response ? info.response.data.id : info.id; const status = await deleteFile([id]); if (status) { + removeIds.value.push(id); deleteFlag.value = true; const index = fileList.value.findIndex((x) => x.id === id); fileList.value.splice(index, 1); + + emit('update:value', tableId.value); + emit('update:tableName', tableName.value); + emit('update:columnName', columnName.value); + emit('change'); + await refreshList(tableId.value); notification.success({ message: 'Tip', description: '删除成功!' @@ -342,15 +360,13 @@ const handlePreview = async (file) => { const fileUrl = file.response?.data?.fileUrl || file.fileUrl; - const fileName = file.response?.data?.fileOrg || file.fileOrg; - let fileFullUrl = fileUrl.includes('http://') || fileUrl.includes('https://') ? fileUrl : location.origin + getAppEnvConfig().VITE_GLOB_API_URL + fileUrl; - fileFullUrl+="&fullfilename="+fileName; - previewFile.value = getAppEnvConfig().VITE_GLOB_UPLOAD_PREVIEW + encodeURIComponent(Base64.encode(fileFullUrl)); + const fileName = file.name || file.fileOrg; + const previewUrl = parsePreviewUrl(fileName, fileUrl); + previewFile.value = parsePreviewUrl(fileName, fileUrl); previewVisible.value = true; - previewTitle.value = file.name || file.fileOrg; - - console.log(fileFullUrl); + previewTitle.value = fileName; + console.log(previewUrl); }; const handleCancel = () => {