Skip to content

Commit a4a4dcd

Browse files
committed
【功能修改】多人审批方式默认为按顺序依次审批,随机挑选一人功能可能被去掉
1 parent 019104f commit a4a4dcd

File tree

1 file changed

+2
-34
lines changed

1 file changed

+2
-34
lines changed

src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@
139139
clearable
140140
multiple
141141
style="width: 100%"
142-
@change="changedCandidateUsers"
143142
>
144143
<el-option
145144
v-for="item in userOptions"
@@ -187,10 +186,6 @@
187186
<el-radio
188187
:value="item.value"
189188
:label="item.value"
190-
:disabled="
191-
item.value !== ApproveMethodType.RANDOM_SELECT_ONE_APPROVE &&
192-
notAllowedMultiApprovers
193-
"
194189
>
195190
{{ item.label }}
196191
</el-radio>
@@ -537,8 +532,7 @@ const {
537532
getShowText
538533
} = useNodeForm(NodeType.USER_TASK_NODE)
539534
const configForm = tempConfigForm as Ref<UserTaskFormType>
540-
// 不允许多人审批
541-
const notAllowedMultiApprovers = ref(false)
535+
542536
// 改变审批人设置策略
543537
const changeCandidateStrategy = () => {
544538
configForm.value.userIds = []
@@ -548,29 +542,8 @@ const changeCandidateStrategy = () => {
548542
configForm.value.userGroups = []
549543
configForm.value.deptLevel = 1
550544
configForm.value.approveMethod = ApproveMethodType.SEQUENTIAL_APPROVE
551-
if (
552-
configForm.value.candidateStrategy === CandidateStrategy.START_USER ||
553-
configForm.value.candidateStrategy === CandidateStrategy.USER
554-
) {
555-
notAllowedMultiApprovers.value = true
556-
} else {
557-
notAllowedMultiApprovers.value = false
558-
}
559-
}
560-
// 改变审批候选人
561-
const changedCandidateUsers = () => {
562-
if (
563-
configForm.value.userIds &&
564-
configForm.value.userIds?.length <= 1 &&
565-
configForm.value.candidateStrategy === CandidateStrategy.USER
566-
) {
567-
configForm.value.approveMethod = ApproveMethodType.RANDOM_SELECT_ONE_APPROVE
568-
configForm.value.rejectHandlerType = RejectHandlerType.FINISH_PROCESS
569-
notAllowedMultiApprovers.value = true
570-
} else {
571-
notAllowedMultiApprovers.value = false
572-
}
573545
}
546+
574547
// 审批方式改变
575548
const approveMethodChanged = () => {
576549
configForm.value.rejectHandlerType = RejectHandlerType.FINISH_PROCESS
@@ -666,11 +639,6 @@ const showUserTaskNodeConfig = (node: SimpleFlowNode) => {
666639
configForm.value.candidateStrategy = node.candidateStrategy!
667640
// 解析候选人参数
668641
parseCandidateParam(node.candidateStrategy!, node?.candidateParam)
669-
if (configForm.value.userIds && configForm.value.userIds.length > 1) {
670-
notAllowedMultiApprovers.value = true
671-
} else {
672-
notAllowedMultiApprovers.value = false
673-
}
674642
// 2.2 设置审批方式
675643
configForm.value.approveMethod = node.approveMethod!
676644
if (node.approveMethod == ApproveMethodType.APPROVE_BY_RATIO) {

0 commit comments

Comments
 (0)