diff --git a/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue index 5e1db576..e28ef7c9 100644 --- a/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue +++ b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue @@ -75,7 +75,7 @@ const addNode = (type: number) => { type: NodeType.USER_TASK_NODE, // 审批节点配置 attributes: { - approveMethod: ApproveMethodType.SINGLE_PERSON_APPROVE, + approveMethod: ApproveMethodType.RRANDOM_SELECT_ONE_APPROVE, candidateStrategy: CandidateStrategy.USER, candidateParam: undefined, fieldsPermission: undefined, diff --git a/src/components/SimpleProcessDesignerV2/src/consts.ts b/src/components/SimpleProcessDesignerV2/src/consts.ts index 575bfa3f..784e3315 100644 --- a/src/components/SimpleProcessDesignerV2/src/consts.ts +++ b/src/components/SimpleProcessDesignerV2/src/consts.ts @@ -95,35 +95,27 @@ export enum ConditionConfigType { */ RULE = 2 } -// 审批方式类型 ( 用于审批节点 ) +// 多人审批方式类型 ( 用于审批节点 ) export enum ApproveMethodType { /** - * 单人审批 + * 随机挑选一人审批 */ - SINGLE_PERSON_APPROVE = 1, + RRANDOM_SELECT_ONE_APPROVE = 1, - /** - * 多人会签(需所有审批人同意) - */ - ALL_APPROVE = 2, /** * 多人会签(按通过比例) */ - APPROVE_BY_RATIO = 3, + APPROVE_BY_RATIO = 2, + /** - * 多人会签(通过只需一人,拒绝需要全员) + * 多人或签(通过只需一人,拒绝只需一人) */ - ANY_APPROVE_ALL_REJECT = 4, - - /** - * 多人或签(一名审批人通过即可) - */ - ANY_APPROVE = 5, + ANY_APPROVE = 3, /** * 多人依次审批 */ - SEQUENTIAL_APPROVE = 6 + SEQUENTIAL_APPROVE = 4 } @@ -216,11 +208,9 @@ NODE_DEFAULT_NAME.set(NodeType.COPY_TASK_NODE, '抄送人') NODE_DEFAULT_NAME.set(NodeType.CONDITION_NODE, '条件') export const APPROVE_METHODS: DictDataVO [] = [ - { label: '单人审批', value: ApproveMethodType.SINGLE_PERSON_APPROVE }, - { label: '多人会签(需所有审批人同意)', value: ApproveMethodType.ALL_APPROVE }, + { label: '随机挑选一人审批', value: ApproveMethodType.RRANDOM_SELECT_ONE_APPROVE }, { label: '多人会签(按通过比例%)', value: ApproveMethodType.APPROVE_BY_RATIO }, - { label: '多人会签(通过只需一人,拒绝需要全员)', value: ApproveMethodType.ANY_APPROVE_ALL_REJECT }, - { label: '多人或签(一名审批人通过即可)', value: ApproveMethodType.ANY_APPROVE }, + { label: '多人或签(一人通过或拒绝)', value: ApproveMethodType.ANY_APPROVE }, { label: '依次审批(按顺序依次审批)', value: ApproveMethodType.SEQUENTIAL_APPROVE } ] diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue index 65af2755..4ee0d310 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue @@ -143,7 +143,7 @@ style="width: 100%" /> - + @@ -163,7 +163,7 @@ { candidateParamArray.value = [] - currentNode.value.attributes.approveMethod = ApproveMethodType.SINGLE_PERSON_APPROVE + currentNode.value.attributes.approveMethod = ApproveMethodType.RRANDOM_SELECT_ONE_APPROVE if ( currentNode.value.attributes.candidateStrategy === CandidateStrategy.START_USER || currentNode.value.attributes.candidateStrategy === CandidateStrategy.USER @@ -520,7 +520,7 @@ const changedCandidateUsers = () => { candidateParamArray.value?.length <= 1 && currentNode.value.attributes?.candidateStrategy === CandidateStrategy.USER ) { - currentNode.value.attributes.approveMethod = ApproveMethodType.SINGLE_PERSON_APPROVE + currentNode.value.attributes.approveMethod = ApproveMethodType.RRANDOM_SELECT_ONE_APPROVE currentNode.value.attributes.rejectHandler.type = RejectHandlerType.FINISH_PROCESS notAllowedMultiApprovers.value = true } else { @@ -541,7 +541,7 @@ const blurEvent = () => { } const approveMethodChanged = () => { const approveMethod = currentNode.value.attributes?.approveMethod - if ( approveMethod === ApproveMethodType.ANY_APPROVE_ALL_REJECT || approveMethod === ApproveMethodType.APPROVE_BY_RATIO) { + if ( approveMethod === ApproveMethodType.APPROVE_BY_RATIO) { currentNode.value.attributes.rejectHandler.type = RejectHandlerType.FINISH_PROCESS_BY_REJECT_RATIO } else { @@ -549,7 +549,7 @@ const approveMethodChanged = () => { } if (approveMethod === ApproveMethodType.APPROVE_BY_RATIO) { - currentNode.value.attributes.approveRatio = 50; + currentNode.value.attributes.approveRatio = 100; } } const rejectHandlerOptionDisabled = computed(() => { @@ -557,15 +557,12 @@ const rejectHandlerOptionDisabled = computed(() => { const approveMethod = currentNode.value.attributes?.approveMethod if ( val === RejectHandlerType.FINISH_PROCESS_BY_REJECT_RATIO && - approveMethod !== ApproveMethodType.APPROVE_BY_RATIO && - approveMethod !== ApproveMethodType.ANY_APPROVE_ALL_REJECT + approveMethod !== ApproveMethodType.APPROVE_BY_RATIO ) { return true } - if ( - approveMethod === ApproveMethodType.ANY_APPROVE_ALL_REJECT && - val === RejectHandlerType.FINISH_PROCESS - ) { + if ( approveMethod === ApproveMethodType.APPROVE_BY_RATIO + && val !== RejectHandlerType.FINISH_PROCESS_BY_REJECT_RATIO) { return true }