diff --git a/src/api/bpm/processInstance/index.ts b/src/api/bpm/processInstance/index.ts index dfbddef1..96b440bb 100644 --- a/src/api/bpm/processInstance/index.ts +++ b/src/api/bpm/processInstance/index.ts @@ -46,7 +46,7 @@ export type ApprovalNodeInfo = { status: number startTime?: Date endTime?: Date - candidateUserList?: User[] + candidateUsers?: User[] tasks: ApprovalTaskInfo[] } diff --git a/src/api/bpm/task/index.ts b/src/api/bpm/task/index.ts index d32b2e14..cf75bfa5 100644 --- a/src/api/bpm/task/index.ts +++ b/src/api/bpm/task/index.ts @@ -106,6 +106,11 @@ export const signDeleteTask = async (data: any) => { return await request.delete({ url: '/bpm/task/delete-sign', data }) } +// 抄送 +export const copyTask = async (data: any) => { + return await request.put({ url: '/bpm/task/copy', data }) +} + // 获取减签任务列表 export const getChildrenTaskList = async (id: string) => { return await request.get({ url: '/bpm/task/list-by-parent-task-id?parentTaskId=' + id }) diff --git a/src/components/SimpleProcessDesignerV2/src/consts.ts b/src/components/SimpleProcessDesignerV2/src/consts.ts index 0364c5e6..44fbf361 100644 --- a/src/components/SimpleProcessDesignerV2/src/consts.ts +++ b/src/components/SimpleProcessDesignerV2/src/consts.ts @@ -362,7 +362,11 @@ export enum OperationButtonType { /** * 回退 */ - RETURN = 6 + RETURN = 6, + /** + * 抄送 + */ + COPY = 7 } /** @@ -504,6 +508,7 @@ OPERATION_BUTTON_NAME.set(OperationButtonType.TRANSFER, '转办') OPERATION_BUTTON_NAME.set(OperationButtonType.DELEGATE, '委派') OPERATION_BUTTON_NAME.set(OperationButtonType.ADD_SIGN, '加签') OPERATION_BUTTON_NAME.set(OperationButtonType.RETURN, '回退') +OPERATION_BUTTON_NAME.set(OperationButtonType.COPY, '抄送') // 默认的按钮权限设置 export const DEFAULT_BUTTON_SETTING: ButtonSetting[] = [ diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue index 969cf48b..57b96654 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue @@ -139,7 +139,6 @@ clearable multiple style="width: 100%" - @change="changedCandidateUsers" > {{ item.label }} @@ -537,8 +532,7 @@ const { getShowText } = useNodeForm(NodeType.USER_TASK_NODE) const configForm = tempConfigForm as Ref -// 不允许多人审批 -const notAllowedMultiApprovers = ref(false) + // 改变审批人设置策略 const changeCandidateStrategy = () => { configForm.value.userIds = [] @@ -548,29 +542,8 @@ const changeCandidateStrategy = () => { configForm.value.userGroups = [] configForm.value.deptLevel = 1 configForm.value.approveMethod = ApproveMethodType.SEQUENTIAL_APPROVE - if ( - configForm.value.candidateStrategy === CandidateStrategy.START_USER || - configForm.value.candidateStrategy === CandidateStrategy.USER - ) { - notAllowedMultiApprovers.value = true - } else { - notAllowedMultiApprovers.value = false - } -} -// 改变审批候选人 -const changedCandidateUsers = () => { - if ( - configForm.value.userIds && - configForm.value.userIds?.length <= 1 && - configForm.value.candidateStrategy === CandidateStrategy.USER - ) { - configForm.value.approveMethod = ApproveMethodType.RANDOM_SELECT_ONE_APPROVE - configForm.value.rejectHandlerType = RejectHandlerType.FINISH_PROCESS - notAllowedMultiApprovers.value = true - } else { - notAllowedMultiApprovers.value = false - } } + // 审批方式改变 const approveMethodChanged = () => { configForm.value.rejectHandlerType = RejectHandlerType.FINISH_PROCESS @@ -666,11 +639,6 @@ const showUserTaskNodeConfig = (node: SimpleFlowNode) => { configForm.value.candidateStrategy = node.candidateStrategy! // 解析候选人参数 parseCandidateParam(node.candidateStrategy!, node?.candidateParam) - if (configForm.value.userIds && configForm.value.userIds.length > 1) { - notAllowedMultiApprovers.value = true - } else { - notAllowedMultiApprovers.value = false - } // 2.2 设置审批方式 configForm.value.approveMethod = node.approveMethod! if (node.approveMethod == ApproveMethodType.APPROVE_BY_RATIO) { diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue b/src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue index 34ba2bbe..96d9739e 100644 --- a/src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue +++ b/src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue @@ -5,14 +5,14 @@ > @@ -22,16 +22,10 @@ label-position="top" class="mb-auto" ref="formRef" - :model="auditForm" - :rules="auditRule" + :model="genericForm" + :rules="genericRule" label-width="100px" > - - {{ processInstance?.startUser.nickname }} - - {{ processInstance?.startUser.deptName }} - -