diff --git a/src/views/bg/xispeak/components/BgXiSpeakBPMForm.vue b/src/views/bg/xispeak/components/BgXiSpeakBPMForm.vue index e23e455..c7ce7f1 100644 --- a/src/views/bg/xispeak/components/BgXiSpeakBPMForm.vue +++ b/src/views/bg/xispeak/components/BgXiSpeakBPMForm.vue @@ -262,6 +262,7 @@ :claim="claim" :showSelnextUser="showSelnextUser" :beforeHandle="saveMainFormBeforeProcessHandle" + :defaultReason="defaultHandleReason" @success="handleProcessSuccess" @claimSuccess="handleClaimSuccess" /> @@ -441,6 +442,59 @@ processTableName: props.formData?.processTableName, })); + // ==================== 默认审批意见 ==================== + const handleReasonTemplateMap: Record string> = { + // TODO: 填写各节点的 taskDefKey + // 部门负责人审批 / 所党委审批 / 督办部门负责人审批 / 纪检负责人审批 + // 'Task_': buildApproveReason, + // 部门经办人反馈完成情况 / 收集流程部门经办人填写 / 反馈流程部门经办人填写反馈 + // 'Task_': buildDeptHandlerFeedbackReason, + // 部门负责人接受任务并分配 + // 'Task_': buildDeptLeaderAssignReason, + // 部门负责人直接反馈 + // 'Task_': buildDeptLeaderDirectFeedbackReason, + // 督办部门经办人确认全部反馈事项 + // 'Task_': buildSuperviseConfirmAllReason, + // 督办经办人核查 / 反馈流程督办经办人核查 + // 'Task_': buildSuperviseCheckReason, + // 纪检经办人监察 + // 'Task_': buildJiJianCheckReason, + }; + + const defaultHandleReason = computed(() => { + const builder = handleReasonTemplateMap[String(processInfo.value.taskDefKey || '')]; + return builder ? builder() : ''; + }); + + function buildApproveReason() { + return '同意。'; + } + + function buildDeptHandlerFeedbackReason() { + return '已完成反馈,请领导审批。'; + } + + function buildDeptLeaderAssignReason() { + const userNameText = subApproveUser.value || ''; + return userNameText ? `请${userNameText}办理。` : ''; + } + + function buildDeptLeaderDirectFeedbackReason() { + return '已完成反馈。'; + } + + function buildSuperviseConfirmAllReason() { + return '已确认全部反馈事项。'; + } + + function buildSuperviseCheckReason() { + return '已核查。'; + } + + function buildJiJianCheckReason() { + return '已监察。'; + } + onMounted(() => { initFormData(); });