@coding-flow/flow-mobile-approval 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/flow-approval/components/action/add-audit.js +11 -2
- package/dist/components/flow-approval/components/action/delegate.js +11 -2
- package/dist/components/flow-approval/components/action/pass.js +10 -2
- package/dist/components/flow-approval/components/action/return.js +11 -2
- package/dist/components/flow-approval/components/action/transfer.js +11 -2
- package/dist/plugins/view/manual-view.js +10 -2
- package/package.json +8 -8
|
@@ -11,6 +11,13 @@ const AddAuditAction = (props)=>{
|
|
|
11
11
|
const [form] = Form.useForm();
|
|
12
12
|
const actionPresenter = context.getPresenter().getFlowActionPresenter();
|
|
13
13
|
const [modalVisible, setModalVisible] = react.useState(false);
|
|
14
|
+
const actionRef = react.useRef(null);
|
|
15
|
+
const handlerOK = ()=>{
|
|
16
|
+
if (actionRef.current) return void actionRef.current.onValidate().then((res)=>{
|
|
17
|
+
if (res) form.submit();
|
|
18
|
+
});
|
|
19
|
+
form.submit();
|
|
20
|
+
};
|
|
14
21
|
const handleSubmit = (params)=>{
|
|
15
22
|
actionPresenter.action(action.id, params).then((res)=>{
|
|
16
23
|
if (res.success) {
|
|
@@ -35,7 +42,7 @@ const AddAuditAction = (props)=>{
|
|
|
35
42
|
open: modalVisible,
|
|
36
43
|
onClose: ()=>setModalVisible(false),
|
|
37
44
|
onOk: ()=>{
|
|
38
|
-
|
|
45
|
+
handlerOK();
|
|
39
46
|
},
|
|
40
47
|
children: /*#__PURE__*/ jsx(Form, {
|
|
41
48
|
form: form,
|
|
@@ -53,7 +60,9 @@ const AddAuditAction = (props)=>{
|
|
|
53
60
|
message: '加签人员不能为空'
|
|
54
61
|
}
|
|
55
62
|
],
|
|
56
|
-
children: /*#__PURE__*/ jsx(AddAuditView, {
|
|
63
|
+
children: /*#__PURE__*/ jsx(AddAuditView, {
|
|
64
|
+
action: actionRef
|
|
65
|
+
})
|
|
57
66
|
})
|
|
58
67
|
})
|
|
59
68
|
})
|
|
@@ -11,6 +11,13 @@ const DelegateAction = (props)=>{
|
|
|
11
11
|
const [form] = Form.useForm();
|
|
12
12
|
const actionPresenter = context.getPresenter().getFlowActionPresenter();
|
|
13
13
|
const [modalVisible, setModalVisible] = react.useState(false);
|
|
14
|
+
const actionRef = react.useRef(null);
|
|
15
|
+
const handlerOK = ()=>{
|
|
16
|
+
if (actionRef.current) return void actionRef.current.onValidate().then((res)=>{
|
|
17
|
+
if (res) form.submit();
|
|
18
|
+
});
|
|
19
|
+
form.submit();
|
|
20
|
+
};
|
|
14
21
|
const handleSubmit = (params)=>{
|
|
15
22
|
actionPresenter.action(action.id, params).then((res)=>{
|
|
16
23
|
if (res.success) {
|
|
@@ -35,7 +42,7 @@ const DelegateAction = (props)=>{
|
|
|
35
42
|
open: modalVisible,
|
|
36
43
|
onClose: ()=>setModalVisible(false),
|
|
37
44
|
onOk: ()=>{
|
|
38
|
-
|
|
45
|
+
handlerOK();
|
|
39
46
|
},
|
|
40
47
|
children: /*#__PURE__*/ jsx(Form, {
|
|
41
48
|
form: form,
|
|
@@ -53,7 +60,9 @@ const DelegateAction = (props)=>{
|
|
|
53
60
|
message: '委派人员不能为空'
|
|
54
61
|
}
|
|
55
62
|
],
|
|
56
|
-
children: /*#__PURE__*/ jsx(DelegateView, {
|
|
63
|
+
children: /*#__PURE__*/ jsx(DelegateView, {
|
|
64
|
+
action: actionRef
|
|
65
|
+
})
|
|
57
66
|
})
|
|
58
67
|
})
|
|
59
68
|
})
|
|
@@ -28,6 +28,13 @@ const PassAction = (props)=>{
|
|
|
28
28
|
EventBus.getInstance().off(action.id);
|
|
29
29
|
};
|
|
30
30
|
}, []);
|
|
31
|
+
const actionRef = react.useRef(null);
|
|
32
|
+
const handlerOK = ()=>{
|
|
33
|
+
if (actionRef.current) return void actionRef.current.onValidate().then((res)=>{
|
|
34
|
+
if (res) form.submit();
|
|
35
|
+
});
|
|
36
|
+
form.submit();
|
|
37
|
+
};
|
|
31
38
|
const handleSubmit = (params)=>{
|
|
32
39
|
actionPresenter.action(action.id, params).then((res)=>{
|
|
33
40
|
if (res.success) {
|
|
@@ -57,7 +64,7 @@ const PassAction = (props)=>{
|
|
|
57
64
|
setModalVisible(false);
|
|
58
65
|
},
|
|
59
66
|
onOk: ()=>{
|
|
60
|
-
|
|
67
|
+
handlerOK();
|
|
61
68
|
},
|
|
62
69
|
children: /*#__PURE__*/ jsxs(Form, {
|
|
63
70
|
form: form,
|
|
@@ -86,7 +93,8 @@ const PassAction = (props)=>{
|
|
|
86
93
|
}
|
|
87
94
|
],
|
|
88
95
|
children: /*#__PURE__*/ jsx(SignKeyView, {
|
|
89
|
-
current: currentOperator
|
|
96
|
+
current: currentOperator,
|
|
97
|
+
action: actionRef
|
|
90
98
|
})
|
|
91
99
|
})
|
|
92
100
|
]
|
|
@@ -11,6 +11,13 @@ const ReturnAction = (props)=>{
|
|
|
11
11
|
const [form] = Form.useForm();
|
|
12
12
|
const actionPresenter = context.getPresenter().getFlowActionPresenter();
|
|
13
13
|
const [modalVisible, setModalVisible] = react.useState(false);
|
|
14
|
+
const actionRef = react.useRef(null);
|
|
15
|
+
const handlerOK = ()=>{
|
|
16
|
+
if (actionRef.current) return void actionRef.current.onValidate().then((res)=>{
|
|
17
|
+
if (res) form.submit();
|
|
18
|
+
});
|
|
19
|
+
form.submit();
|
|
20
|
+
};
|
|
14
21
|
const handleSubmit = (params)=>{
|
|
15
22
|
actionPresenter.action(action.id, params).then((res)=>{
|
|
16
23
|
if (res.success) {
|
|
@@ -35,7 +42,7 @@ const ReturnAction = (props)=>{
|
|
|
35
42
|
open: modalVisible,
|
|
36
43
|
onClose: ()=>setModalVisible(false),
|
|
37
44
|
onOk: ()=>{
|
|
38
|
-
|
|
45
|
+
handlerOK();
|
|
39
46
|
},
|
|
40
47
|
children: /*#__PURE__*/ jsx(Form, {
|
|
41
48
|
form: form,
|
|
@@ -53,7 +60,9 @@ const ReturnAction = (props)=>{
|
|
|
53
60
|
message: '退回节点不能为空'
|
|
54
61
|
}
|
|
55
62
|
],
|
|
56
|
-
children: /*#__PURE__*/ jsx(ReturnView, {
|
|
63
|
+
children: /*#__PURE__*/ jsx(ReturnView, {
|
|
64
|
+
action: actionRef
|
|
65
|
+
})
|
|
57
66
|
})
|
|
58
67
|
})
|
|
59
68
|
})
|
|
@@ -11,6 +11,13 @@ const TransferAction = (props)=>{
|
|
|
11
11
|
const [form] = Form.useForm();
|
|
12
12
|
const actionPresenter = context.getPresenter().getFlowActionPresenter();
|
|
13
13
|
const [modalVisible, setModalVisible] = react.useState(false);
|
|
14
|
+
const actionRef = react.useRef(null);
|
|
15
|
+
const handlerOK = ()=>{
|
|
16
|
+
if (actionRef.current) return void actionRef.current.onValidate().then((res)=>{
|
|
17
|
+
if (res) form.submit();
|
|
18
|
+
});
|
|
19
|
+
form.submit();
|
|
20
|
+
};
|
|
14
21
|
react.useEffect(()=>{
|
|
15
22
|
EventBus.getInstance().on(action.id, ()=>{
|
|
16
23
|
form.resetFields();
|
|
@@ -35,7 +42,7 @@ const TransferAction = (props)=>{
|
|
|
35
42
|
open: modalVisible,
|
|
36
43
|
onClose: ()=>setModalVisible(false),
|
|
37
44
|
onOk: ()=>{
|
|
38
|
-
|
|
45
|
+
handlerOK();
|
|
39
46
|
},
|
|
40
47
|
children: /*#__PURE__*/ jsx(Form, {
|
|
41
48
|
form: form,
|
|
@@ -53,7 +60,9 @@ const TransferAction = (props)=>{
|
|
|
53
60
|
message: '转办人员不能为空'
|
|
54
61
|
}
|
|
55
62
|
],
|
|
56
|
-
children: /*#__PURE__*/ jsx(TransferView, {
|
|
63
|
+
children: /*#__PURE__*/ jsx(TransferView, {
|
|
64
|
+
action: actionRef
|
|
65
|
+
})
|
|
57
66
|
})
|
|
58
67
|
})
|
|
59
68
|
})
|
|
@@ -8,8 +8,16 @@ const ManualView = (props)=>{
|
|
|
8
8
|
const ManualViewComponent = ViewBindPlugin.getInstance().get(ManualViewPluginKey);
|
|
9
9
|
const [visible, setVisible] = react.useState(true);
|
|
10
10
|
const [form] = Form.useForm();
|
|
11
|
+
const actionRef = react.useRef(null);
|
|
12
|
+
const handlerOK = ()=>{
|
|
13
|
+
if (actionRef.current) return void actionRef.current.onValidate().then((res)=>{
|
|
14
|
+
if (res) form.submit();
|
|
15
|
+
});
|
|
16
|
+
form.submit();
|
|
17
|
+
};
|
|
11
18
|
if (ManualViewComponent) return /*#__PURE__*/ jsx(ManualViewComponent, {
|
|
12
|
-
...props
|
|
19
|
+
...props,
|
|
20
|
+
action: actionRef
|
|
13
21
|
});
|
|
14
22
|
const handleOk = (value)=>{
|
|
15
23
|
const manualNodeId = value?.manualNodeId;
|
|
@@ -23,7 +31,7 @@ const ManualView = (props)=>{
|
|
|
23
31
|
setVisible(false);
|
|
24
32
|
},
|
|
25
33
|
onOk: ()=>{
|
|
26
|
-
|
|
34
|
+
handlerOK();
|
|
27
35
|
},
|
|
28
36
|
children: /*#__PURE__*/ jsx(Form, {
|
|
29
37
|
form: form,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coding-flow/flow-mobile-approval",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "flow-engine pc mobile approval components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -39,15 +39,15 @@
|
|
|
39
39
|
"dayjs": "^1.11.19",
|
|
40
40
|
"immer": "^11.1.3",
|
|
41
41
|
"react-redux": "^9.2.0",
|
|
42
|
-
"@coding-flow/flow-core": "0.0.
|
|
43
|
-
"@coding-flow/flow-types": "0.0.
|
|
44
|
-
"@coding-flow/flow-icons": "0.0.
|
|
45
|
-
"@coding-flow/flow-
|
|
46
|
-
"@coding-flow/flow-
|
|
47
|
-
"@coding-flow/flow-mobile-form": "0.0.
|
|
42
|
+
"@coding-flow/flow-core": "0.0.10",
|
|
43
|
+
"@coding-flow/flow-types": "0.0.10",
|
|
44
|
+
"@coding-flow/flow-icons": "0.0.10",
|
|
45
|
+
"@coding-flow/flow-approval-presenter": "0.0.10",
|
|
46
|
+
"@coding-flow/flow-mobile-ui": "0.0.10",
|
|
47
|
+
"@coding-flow/flow-mobile-form": "0.0.10"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@coding-flow/flow-types": "0.0.
|
|
50
|
+
"@coding-flow/flow-types": "0.0.10"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"build": "rslib build",
|