From cd66d2a1de61ccd64c7457d35ee5f21de658b1ed Mon Sep 17 00:00:00 2001 From: XuZhiqiang Date: Wed, 17 Jun 2026 13:47:50 +0800 Subject: [PATCH] =?UTF-8?q?feat(@vben/web-antdv-next):=20BPM=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AE=A1=E6=89=B9=E6=84=8F=E8=A7=81=E5=92=8C=E9=99=84?= =?UTF-8?q?=E4=BB=B6=E6=98=BE=E7=A4=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detail/modules/time-line.vue | 68 +++++++++++++++++-- 1 file changed, 62 insertions(+), 6 deletions(-) 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 }}
+
+
+ 附件列表: +
+
+ +
+