@coding-flow/flow-pc-approval 0.0.33 → 0.0.35
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.
|
@@ -6,6 +6,7 @@ export declare const getStatusConfig: (status: "completed" | "current" | "pendin
|
|
|
6
6
|
icon: import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
};
|
|
8
8
|
export declare const getNodeStatus: (node: ProcessNode) => "completed" | "current" | "pending";
|
|
9
|
+
export declare const getOperatorTitle: (node: ProcessNode) => string | undefined;
|
|
9
10
|
interface FlowTimeNodeProps {
|
|
10
11
|
node: ProcessNode;
|
|
11
12
|
}
|
|
@@ -47,6 +47,12 @@ const getNodeStatus = (node)=>{
|
|
|
47
47
|
if ('PROCESSING' === node.approveState) return 'current';
|
|
48
48
|
return 'pending';
|
|
49
49
|
};
|
|
50
|
+
const getOperatorTitle = (node)=>{
|
|
51
|
+
const operatorStatregy = node.operatorStrategy;
|
|
52
|
+
if ('INITIATOR_SELECT' === operatorStatregy) return '发起人选择审批人';
|
|
53
|
+
if ('APPROVER_SELECT' === operatorStatregy) return '审批人选择审批人';
|
|
54
|
+
if ('NO_OPERATOR' === operatorStatregy) return node.nodeName;
|
|
55
|
+
};
|
|
50
56
|
const FlowOperatorItem = (props)=>{
|
|
51
57
|
const operator = props.operator;
|
|
52
58
|
const approveState = props.approveState;
|
|
@@ -105,7 +111,7 @@ const FlowTimeNode = (props)=>{
|
|
|
105
111
|
const node = props.node;
|
|
106
112
|
const operators = node.operators || [];
|
|
107
113
|
const operatorStatregy = node.operatorStrategy;
|
|
108
|
-
if ('INITIATOR_SELECT' === operatorStatregy || 'APPROVER_SELECT' === operatorStatregy) return /*#__PURE__*/ jsxs("div", {
|
|
114
|
+
if ('INITIATOR_SELECT' === operatorStatregy || 'APPROVER_SELECT' === operatorStatregy || 'NO_OPERATOR' === operatorStatregy) return /*#__PURE__*/ jsxs("div", {
|
|
109
115
|
style: {
|
|
110
116
|
display: 'flex',
|
|
111
117
|
flexDirection: 'column',
|
|
@@ -141,7 +147,7 @@ const FlowTimeNode = (props)=>{
|
|
|
141
147
|
style: {
|
|
142
148
|
fontSize: 12
|
|
143
149
|
},
|
|
144
|
-
children:
|
|
150
|
+
children: getOperatorTitle(node)
|
|
145
151
|
})
|
|
146
152
|
]
|
|
147
153
|
});
|
|
@@ -183,4 +189,4 @@ const FlowTimeNode = (props)=>{
|
|
|
183
189
|
]
|
|
184
190
|
});
|
|
185
191
|
};
|
|
186
|
-
export { FlowTimeNode, getNodeStatus, getStatusConfig };
|
|
192
|
+
export { FlowTimeNode, getNodeStatus, getOperatorTitle, getStatusConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coding-flow/flow-pc-approval",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.35",
|
|
4
4
|
"description": "flow-engine pc form 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-
|
|
43
|
-
"@coding-flow/flow-
|
|
44
|
-
"@coding-flow/flow-
|
|
45
|
-
"@coding-flow/flow-
|
|
46
|
-
"@coding-flow/flow-pc-form": "0.0.
|
|
47
|
-
"@coding-flow/flow-
|
|
42
|
+
"@coding-flow/flow-core": "0.0.35",
|
|
43
|
+
"@coding-flow/flow-icons": "0.0.35",
|
|
44
|
+
"@coding-flow/flow-types": "0.0.35",
|
|
45
|
+
"@coding-flow/flow-approval-presenter": "0.0.35",
|
|
46
|
+
"@coding-flow/flow-pc-form": "0.0.35",
|
|
47
|
+
"@coding-flow/flow-pc-ui": "0.0.35"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@coding-flow/flow-types": "0.0.
|
|
50
|
+
"@coding-flow/flow-types": "0.0.35"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"build": "rslib build",
|