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('上传照片失败')); }