@coding-flow/flow-pc-approval 0.0.30 → 0.0.32
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.
|
@@ -43,14 +43,14 @@ const getStatusConfig = (status)=>{
|
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
const getNodeStatus = (node)=>{
|
|
46
|
-
if (
|
|
47
|
-
if (
|
|
46
|
+
if ('PASS' === node.approveState) return 'completed';
|
|
47
|
+
if ('PROCESSING' === node.approveState) return 'current';
|
|
48
48
|
return 'pending';
|
|
49
49
|
};
|
|
50
50
|
const FlowOperatorItem = (props)=>{
|
|
51
51
|
const operator = props.operator;
|
|
52
|
-
const
|
|
53
|
-
if (
|
|
52
|
+
const approveState = props.approveState;
|
|
53
|
+
if ('PASS' === approveState) return /*#__PURE__*/ jsxs(Fragment, {
|
|
54
54
|
children: [
|
|
55
55
|
/*#__PURE__*/ jsxs(Text, {
|
|
56
56
|
type: "secondary",
|
|
@@ -104,6 +104,47 @@ const FlowOperatorItem = (props)=>{
|
|
|
104
104
|
const FlowTimeNode = (props)=>{
|
|
105
105
|
const node = props.node;
|
|
106
106
|
const operators = node.operators || [];
|
|
107
|
+
const operatorStatregy = node.operatorStrategy;
|
|
108
|
+
if ('INITIATOR_SELECT' === operatorStatregy || 'APPROVER_SELECT' === operatorStatregy) return /*#__PURE__*/ jsxs("div", {
|
|
109
|
+
style: {
|
|
110
|
+
display: 'flex',
|
|
111
|
+
flexDirection: 'column',
|
|
112
|
+
gap: 4,
|
|
113
|
+
width: '100%'
|
|
114
|
+
},
|
|
115
|
+
children: [
|
|
116
|
+
/*#__PURE__*/ jsxs("div", {
|
|
117
|
+
style: {
|
|
118
|
+
display: 'flex',
|
|
119
|
+
alignItems: 'center',
|
|
120
|
+
gap: 8
|
|
121
|
+
},
|
|
122
|
+
children: [
|
|
123
|
+
/*#__PURE__*/ jsx(Text, {
|
|
124
|
+
strong: true,
|
|
125
|
+
style: {
|
|
126
|
+
fontSize: 14
|
|
127
|
+
},
|
|
128
|
+
children: node.nodeName
|
|
129
|
+
}),
|
|
130
|
+
/*#__PURE__*/ jsx(Tag, {
|
|
131
|
+
color: getStatusConfig(getNodeStatus(node)).color,
|
|
132
|
+
style: {
|
|
133
|
+
margin: 0
|
|
134
|
+
},
|
|
135
|
+
children: getStatusConfig(getNodeStatus(node)).label
|
|
136
|
+
})
|
|
137
|
+
]
|
|
138
|
+
}),
|
|
139
|
+
/*#__PURE__*/ jsx(Text, {
|
|
140
|
+
type: "secondary",
|
|
141
|
+
style: {
|
|
142
|
+
fontSize: 12
|
|
143
|
+
},
|
|
144
|
+
children: 'INITIATOR_SELECT' === operatorStatregy ? '发起人选择审批人' : '审批人选择审批人'
|
|
145
|
+
})
|
|
146
|
+
]
|
|
147
|
+
});
|
|
107
148
|
return /*#__PURE__*/ jsxs("div", {
|
|
108
149
|
style: {
|
|
109
150
|
display: 'flex',
|
|
@@ -137,7 +178,7 @@ const FlowTimeNode = (props)=>{
|
|
|
137
178
|
}),
|
|
138
179
|
operators.map((operator)=>/*#__PURE__*/ jsx(FlowOperatorItem, {
|
|
139
180
|
operator: operator,
|
|
140
|
-
|
|
181
|
+
approveState: node.approveState
|
|
141
182
|
}, operator.flowOperator.id))
|
|
142
183
|
]
|
|
143
184
|
});
|
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.32",
|
|
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-core": "0.0.
|
|
43
|
-
"@coding-flow/flow-types": "0.0.
|
|
44
|
-
"@coding-flow/flow-icons": "0.0.
|
|
45
|
-
"@coding-flow/flow-approval-presenter": "0.0.
|
|
46
|
-
"@coding-flow/flow-pc-ui": "0.0.
|
|
47
|
-
"@coding-flow/flow-pc-form": "0.0.
|
|
42
|
+
"@coding-flow/flow-core": "0.0.32",
|
|
43
|
+
"@coding-flow/flow-types": "0.0.32",
|
|
44
|
+
"@coding-flow/flow-icons": "0.0.32",
|
|
45
|
+
"@coding-flow/flow-approval-presenter": "0.0.32",
|
|
46
|
+
"@coding-flow/flow-pc-ui": "0.0.32",
|
|
47
|
+
"@coding-flow/flow-pc-form": "0.0.32"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@coding-flow/flow-types": "0.0.
|
|
50
|
+
"@coding-flow/flow-types": "0.0.32"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"build": "rslib build",
|