139
139
clearable
140
140
multiple
141
141
style =" width : 100% "
142
- @change =" changedCandidateUsers"
143
142
>
144
143
<el-option
145
144
v-for =" item in userOptions"
187
186
<el-radio
188
187
:value =" item.value"
189
188
:label =" item.value"
190
- :disabled ="
191
- item.value !== ApproveMethodType.RANDOM_SELECT_ONE_APPROVE &&
192
- notAllowedMultiApprovers
193
- "
194
189
>
195
190
{{ item.label }}
196
191
</el-radio >
@@ -537,8 +532,7 @@ const {
537
532
getShowText
538
533
} = useNodeForm (NodeType .USER_TASK_NODE )
539
534
const configForm = tempConfigForm as Ref <UserTaskFormType >
540
- // 不允许多人审批
541
- const notAllowedMultiApprovers = ref (false )
535
+
542
536
// 改变审批人设置策略
543
537
const changeCandidateStrategy = () => {
544
538
configForm .value .userIds = []
@@ -548,29 +542,8 @@ const changeCandidateStrategy = () => {
548
542
configForm .value .userGroups = []
549
543
configForm .value .deptLevel = 1
550
544
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
- }
573
545
}
546
+
574
547
// 审批方式改变
575
548
const approveMethodChanged = () => {
576
549
configForm .value .rejectHandlerType = RejectHandlerType .FINISH_PROCESS
@@ -666,11 +639,6 @@ const showUserTaskNodeConfig = (node: SimpleFlowNode) => {
666
639
configForm .value .candidateStrategy = node .candidateStrategy !
667
640
// 解析候选人参数
668
641
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
- }
674
642
// 2.2 设置审批方式
675
643
configForm .value .approveMethod = node .approveMethod !
676
644
if (node .approveMethod == ApproveMethodType .APPROVE_BY_RATIO ) {
0 commit comments