From e491df8529d9545c3de9a1b8811cff915c4dc54f Mon Sep 17 00:00:00 2001 From: 王彪总 Date: Thu, 22 Oct 2026 10:42:26 +0800 Subject: [PATCH] 业务线 小程序不用写死,从后端接口获取 --- components/unified-task-actions/unified-task-actions.vue | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/components/unified-task-actions/unified-task-actions.vue b/components/unified-task-actions/unified-task-actions.vue index 37ae527..2a1c3ad 100644 --- a/components/unified-task-actions/unified-task-actions.vue +++ b/components/unified-task-actions/unified-task-actions.vue @@ -43,10 +43,10 @@ - {{ reasonRequired ? '原因/备注(必填)' : '原因/备注' }} + {{ reasonLabel }} { const reasonRequired = computed(() => isReasonRequired(current.value)) +/** 处理类动作填的是实施/处理结果,其余动作填原因或备注 */ +const reasonLabel = computed(() => { + const base = current.value?.code === 'HANDLE' ? '处理结果' : '原因/备注' + return reasonRequired.value ? base + '(必填)' : base +}) + +const reasonPlaceholder = computed(() => { + const base = current.value?.code === 'HANDLE' ? '请输入处理结果' : '请输入原因/备注' + return reasonRequired.value ? base + '(必填)' : base + '(选填)' +}) + /** 动作是否需要用户补充信息(处理人/必填原因/附件),都不需要时直接提交 */ const needsInput = (action) => { if (!action) return false - return action.requireAssignee === true + // 处理类动作(HANDLE)必须让用户确认:统一动作没有业务表单, + // 静默提交会让实施结果、实施照片、实施人全部缺失 + return action.code === 'HANDLE' + || action.requireAssignee === true || action.requireAttachment === true || isReasonRequired(action) } -- libgit2 0.21.4