Skip to content

Commit 2881d2d

Browse files
committed
fix event
1 parent e9eddda commit 2881d2d

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

admin-ui/src/components/Flow/flow/events.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export const registerEvents = (id: string,
8686

8787

8888
// 发起并提交流程
89-
const handlerStartAndSubmitFlow = (callback: (res: any) => void) => {
89+
const handlerStartAndSubmitFlow = (callback: (res: any) => void, operatorIds?: any[]) => {
9090
setRequestLoading(true);
9191
const advice = adviceForm.getFieldValue('advice');
9292
const flowData = data.getFlowData();
@@ -107,6 +107,7 @@ export const registerEvents = (id: string,
107107
const submitBody = {
108108
recordId: newRecordId,
109109
advice: advice,
110+
operatorIds: operatorIds,
110111
success: true,
111112
formData: {
112113
...flowData,
@@ -320,7 +321,8 @@ export const registerEvents = (id: string,
320321

321322
return (button: {
322323
type: string,
323-
id?: string
324+
id?: string,
325+
params?:any
324326
}) => {
325327
switch (button.type) {
326328
case 'RELOAD': {
@@ -380,7 +382,7 @@ export const registerEvents = (id: string,
380382
closeFlow: true,
381383
result: flowSubmitResultBuilder.builder()
382384
}));
383-
});
385+
}, button.params);
384386
} else {
385387
handlerStartAndSubmitFlow((res) => {
386388
const flowSubmitResultBuilder = new FlowSubmitResultBuilder(res.data);
@@ -399,7 +401,7 @@ export const registerEvents = (id: string,
399401
closeFlow: true,
400402
result: flowSubmitResultBuilder.builder()
401403
}));
402-
});
404+
}, button.params);
403405
break;
404406
}
405407
case 'TRY_SUBMIT': {

admin-ui/src/components/Flow/flow/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@ export interface FlowFormViewProps {
3939
flowData?: FlowData;
4040
// 流程交互操作
4141
handlerClick?: (item: {
42+
// 按钮类型
4243
type: CustomButtonType;
44+
// 按钮的Id
4345
id?: string;
46+
// 操作参数,对应提交时指定人员数组,例如[1,2,3]
47+
params?: any;
4448
}) => void;
4549

4650
// 请求数据加载

0 commit comments

Comments
 (0)