1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import { uaaRequest } from '../utils/request';
const api = '/UnifiedAppFormApi';
const myCollect = {
namespace: 'countersign', // 加签
state: {
user: {}, // 用户数据
},
effects: {
/**
* 转办流程
* @param { string|Array } taskId 需要转交流程ID
* @param { Array } userIds 加签人id
*/
*countersignHandle({ payload, callback }, { call, put }) {
const response = yield call(uaaRequest, `${api}/addSigns`, {
...payload,
});
if (response == null) {
yield put({ type: 'nom' });
return;
}
if (callback) {
callback(response);
}
},
/**
* 介入(改派流程)
* @param { string } taskId 表Id
* @param { string } userId 用户Id
*/
*involvedHandle({ payload, callback }, { call, put }) {
const response = yield call(uaaRequest, `${api}/reassignmentProcess`, {
...payload,
});
if (response == null) {
yield put({ type: 'nom' });
return;
}
if (callback) {
callback(response);
}
},
},
reducers: {
nom(state) {
return { ...state };
},
},
};
export default myCollect;