Skip to content

Commit 6b06f32

Browse files
committed
Merge remote-tracking branch 'origin/feature/bpm' into feature/bpm
# Conflicts: # src/views/bpm/processInstance/detail/index_new.vue
2 parents 33f3bc0 + 4342c3e commit 6b06f32

File tree

8 files changed

+513
-191
lines changed

8 files changed

+513
-191
lines changed

src/api/bpm/processInstance/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export type ApprovalNodeInfo = {
4646
status: number
4747
startTime?: Date
4848
endTime?: Date
49-
candidateUserList?: User[]
49+
candidateUsers?: User[]
5050
tasks: ApprovalTaskInfo[]
5151
}
5252

src/api/bpm/task/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ export const signDeleteTask = async (data: any) => {
106106
return await request.delete({ url: '/bpm/task/delete-sign', data })
107107
}
108108

109+
// 抄送
110+
export const copyTask = async (data: any) => {
111+
return await request.put({ url: '/bpm/task/copy', data })
112+
}
113+
109114
// 获取减签任务列表
110115
export const getChildrenTaskList = async (id: string) => {
111116
return await request.get({ url: '/bpm/task/list-by-parent-task-id?parentTaskId=' + id })

src/components/SimpleProcessDesignerV2/src/consts.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,11 @@ export enum OperationButtonType {
362362
/**
363363
* 回退
364364
*/
365-
RETURN = 6
365+
RETURN = 6,
366+
/**
367+
* 抄送
368+
*/
369+
COPY = 7
366370
}
367371

368372
/**
@@ -504,6 +508,7 @@ OPERATION_BUTTON_NAME.set(OperationButtonType.TRANSFER, '转办')
504508
OPERATION_BUTTON_NAME.set(OperationButtonType.DELEGATE, '委派')
505509
OPERATION_BUTTON_NAME.set(OperationButtonType.ADD_SIGN, '加签')
506510
OPERATION_BUTTON_NAME.set(OperationButtonType.RETURN, '回退')
511+
OPERATION_BUTTON_NAME.set(OperationButtonType.COPY, '抄送')
507512

508513
// 默认的按钮权限设置
509514
export const DEFAULT_BUTTON_SETTING: ButtonSetting[] = [

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)