From 94b4c67f43278bec3f317de0efb8e86e7388b139 Mon Sep 17 00:00:00 2001 From: lijianqiiii Date: Wed, 9 Jul 2025 18:58:37 +0800 Subject: [PATCH] =?UTF-8?q?minio=E6=96=87=E4=BB=B6=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E7=AD=BE=E5=90=8D=E5=8A=9F=E8=83=BD=EF=BC=88=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=AD=BE=E5=90=8D=E5=9C=B0=E5=9D=80=EF=BC=89=EF=BC=9A=20?= =?UTF-8?q?=E7=AD=BE=E7=AB=A0=E5=9B=BE=E7=89=87=E5=A4=84=E7=90=86=EF=BC=8C?= =?UTF-8?q?=E6=A1=8C=E9=9D=A2=E8=AE=BE=E8=AE=A1=E4=B8=BB=E9=A1=B5=E7=9A=84?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=98=BE=E7=A4=BA=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/generator/desktop/index.vue | 2 +- src/views/workflow/task/Stamp.vue | 2 +- .../task/components/stamp/StampInfo.vue | 31 +++++++++++++------ 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/src/views/generator/desktop/index.vue b/src/views/generator/desktop/index.vue index fda2aff..a52e7ae 100644 --- a/src/views/generator/desktop/index.vue +++ b/src/views/generator/desktop/index.vue @@ -21,7 +21,7 @@ :key="data.renderKey" >
-
+
{{ t('设计') }}
{ return h(Image, { - src: record.fileUrl, + src: record.fileUrlFixed, width: '60px', height: '22px', }); diff --git a/src/views/workflow/task/components/stamp/StampInfo.vue b/src/views/workflow/task/components/stamp/StampInfo.vue index 44e5af4..e14ebc4 100644 --- a/src/views/workflow/task/components/stamp/StampInfo.vue +++ b/src/views/workflow/task/components/stamp/StampInfo.vue @@ -189,12 +189,15 @@ }; onMounted(async () => { if (props.id) { - data.info = { ...defaultInfo, ...cloneDeep(props.info) }; - if (data.info.fileType === StampFileTypeAttributes.UPLOAD_PICTURES) { - data.photoUrl = data.info.fileUrl; - } else { - data.signUrl = data.info.fileUrl; - } + data.info = { ...defaultInfo, ...cloneDeep(props.info) }; + // 回显时使用fileUrlFixed(如果有),否则使用fileUrl(改了) + const displayUrl = props.info.fileUrlFixed || props.info.fileUrl; + + if (data.info.fileType === StampFileTypeAttributes.UPLOAD_PICTURES) { + data.photoUrl = displayUrl; // 显示用 + } else { + data.signUrl = displayUrl; // 显示用 + } } else { data.info = defaultInfo; } @@ -221,9 +224,13 @@ data.info.fileUrl = base64; const blob = dataURLtoBlob(base64); - const fileUrl = await uploadBlobApi(blob, t('手写签名.png')); - if (fileUrl) { - data.signUrl = fileUrl; + const response = await uploadBlobApi(blob, t('手写签名.png')); + if (response) { + // 存储原始URL到info.fileUrl(用于提交)(改了) + data.info.fileUrl = response.fileUrl; + + // 显示使用fileUrlFixed(如果有),否则使用fileUrl(改了) + data.signUrl = response.fileUrlFixed || response.fileUrl; message.success(t('手写签章上传成功')); } else { message.error(t('手写签章上传失败')); @@ -283,7 +290,11 @@ if (info.file && info.file.response && info.file.response.code == 0) { message.success(t(`{name}上传成功!`, { name: info.file.name })); console.log(info, t('上传成功')); - data.photoUrl = info.file.response.data.fileUrl; + // 存储原始URL到info.fileUrl(用于提交)(改了) + data.info.fileUrl = info.file.response.data.fileUrl; + + // 显示使用fileUrlFixed(如果有),否则使用fileUrl (改了) + data.photoUrl = info.file.response.data.fileUrlFixed || info.file.response.data.fileUrl; } else { message.error(t('上传照片失败')); }