diff --git a/apps/web-antdv-next/src/views/bpm/processInstance/detail/modules/time-line.vue b/apps/web-antdv-next/src/views/bpm/processInstance/detail/modules/time-line.vue index cd677e373..5369dcdb5 100644 --- a/apps/web-antdv-next/src/views/bpm/processInstance/detail/modules/time-line.vue +++ b/apps/web-antdv-next/src/views/bpm/processInstance/detail/modules/time-line.vue @@ -201,16 +201,25 @@ function shouldShowCustomUserSelect( ); } -/** 判断是否需要显示审批意见 */ -function shouldShowApprovalReason(task: any, nodeType: BpmNodeTypeEnum) { +/** 判断是否需要显示审批意见和附件 */ +function shouldShowReasonAndAttachment(task: any, nodeType: BpmNodeTypeEnum) { return ( - task.reason && + (task.reason || task.attachments?.length > 0) && [BpmNodeTypeEnum.START_USER_NODE, BpmNodeTypeEnum.USER_TASK_NODE].includes( nodeType, ) ); } +function getAttachmentName(url: string) { + return decodeURIComponent(url.slice(url.lastIndexOf('/') + 1)); +} + +function isImageAttachment(url: string) { + const ext = url.split('.').pop()?.toLowerCase(); + return ['bmp', 'gif', 'jpeg', 'jpg', 'png', 'webp'].includes(ext || ''); +} + /** 用户选择弹窗关闭 */ function handleUserSelectClosed() { selectedUsers.value = []; @@ -413,13 +422,60 @@ defineExpose({ setCustomApproveUsers, batchSetCustomApproveUsers }); - +
- 审批意见:{{ task.reason }} +
审批意见:{{ task.reason }}
+
+
+ 附件列表: +
+
+ +
+