@hzab/flowlong-designer 0.0.1 → 0.0.3
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/CHANGELOG.md +4 -1
- package/README.md +24 -1
- package/package.json +4 -1
- package/src/components/NodeWrap/Nodes/Approver/index.tsx +32 -20
- package/src/components/NodeWrap/Nodes/Approver/options.ts +5 -4
- package/src/components/NodeWrap/Nodes/Branch/components/Field/index.tsx +30 -0
- package/src/components/NodeWrap/Nodes/Branch/components/GroupUserSelectorModal/index.less +4 -0
- package/src/components/NodeWrap/Nodes/Branch/components/GroupUserSelectorModal/index.tsx +97 -0
- package/src/components/NodeWrap/Nodes/Branch/index.less +40 -3
- package/src/components/NodeWrap/Nodes/Branch/index.tsx +34 -9
- package/src/components/NodeWrap/Nodes/Promoter/index.tsx +2 -2
- package/src/components/NodeWrap/Nodes/Send/index.less +3 -0
- package/src/components/NodeWrap/Nodes/Send/index.tsx +293 -95
- package/src/components/NodeWrap/Nodes/Send/options.ts +45 -0
- package/src/components/Selector/SelectContext.tsx +13 -9
- package/src/components/Selector/index.tsx +11 -194
- package/src/index.tsx +34 -10
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import { useRef, useState, useContext } from "react";
|
|
2
|
-
import { Drawer,
|
|
3
|
-
import {
|
|
2
|
+
import { Drawer, Input, Button, Form, Select, Tag, InputNumber, Radio, Checkbox, Switch } from "antd";
|
|
3
|
+
import { UserOutlined, DeleteOutlined, EditOutlined, PlusOutlined } from "@ant-design/icons";
|
|
4
4
|
|
|
5
5
|
import AddNode from "../AddNode";
|
|
6
|
+
import { setTypeOptions, selectModeOptions, directorModeOptions, termModeOptions, examineModeOptions } from "./options";
|
|
7
|
+
|
|
6
8
|
import { SelectContext } from "../../../Selector/SelectContext";
|
|
7
9
|
|
|
8
10
|
import "./index.less";
|
|
9
11
|
|
|
10
|
-
export const
|
|
11
|
-
const
|
|
12
|
-
const { modelValue: nodeConfig = {}, onChange } = props;
|
|
13
|
-
|
|
14
|
-
const [drawer, setDrawer] = useState(false);
|
|
15
|
-
const [isEditTitle, setIsEditTitle] = useState(false);
|
|
16
|
-
|
|
12
|
+
export const Approver = (props) => {
|
|
13
|
+
const { modelValue = {}, onChange } = props;
|
|
17
14
|
const [form, setForm] = useState({
|
|
18
15
|
nodeName: "",
|
|
19
16
|
setType: undefined,
|
|
@@ -26,29 +23,55 @@ export const Send = (props) => {
|
|
|
26
23
|
term: undefined,
|
|
27
24
|
termMode: undefined,
|
|
28
25
|
examineMode: undefined,
|
|
29
|
-
conditionList: [],
|
|
30
|
-
userSelectFlag: undefined,
|
|
31
26
|
});
|
|
27
|
+
const [drawer, setDrawer] = useState(false);
|
|
28
|
+
const [isEditTitle, setIsEditTitle] = useState(false);
|
|
29
|
+
|
|
30
|
+
const selectorCtx = useContext(SelectContext);
|
|
32
31
|
|
|
32
|
+
const formRef = useRef();
|
|
33
33
|
const nodeTitleRef = useRef();
|
|
34
34
|
|
|
35
35
|
function onShow() {
|
|
36
|
-
setForm(JSON.parse(JSON.stringify(nodeConfig)));
|
|
37
|
-
setIsEditTitle(false);
|
|
38
36
|
setDrawer(true);
|
|
37
|
+
setForm(JSON.parse(JSON.stringify(modelValue)));
|
|
39
38
|
}
|
|
40
39
|
|
|
41
|
-
function
|
|
42
|
-
|
|
40
|
+
function onNodeDel(e) {
|
|
41
|
+
e.stopPropagation();
|
|
42
|
+
onChange && onChange(modelValue.childNode);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
function
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
function toText(nodeConf) {
|
|
46
|
+
if (nodeConf.setType == 1) {
|
|
47
|
+
if (nodeConf.nodeAssigneeList && nodeConf.nodeAssigneeList.length > 0) {
|
|
48
|
+
const users = nodeConf.nodeAssigneeList.map((item) => item.name).join("、");
|
|
49
|
+
return users;
|
|
50
|
+
} else {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
} else if (nodeConf.setType == 2) {
|
|
54
|
+
return nodeConf.examineLevel == 1 || !nodeConf.examineLevel
|
|
55
|
+
? "直接部门经理"
|
|
56
|
+
: `发起人的第${nodeConf.examineLevel}级部门经理`;
|
|
57
|
+
} else if (nodeConf.setType == 3) {
|
|
58
|
+
if (nodeConf.nodeAssigneeList && nodeConf.nodeAssigneeList.length > 0) {
|
|
59
|
+
const roles = nodeConf.nodeAssigneeList.map((item) => item.name).join("、");
|
|
60
|
+
return "角色-" + roles;
|
|
61
|
+
} else {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
} else if (nodeConf.setType == 4) {
|
|
65
|
+
return "发起人自选";
|
|
66
|
+
} else if (nodeConf.setType == 5) {
|
|
67
|
+
return "发起人自己";
|
|
68
|
+
} else if (nodeConf.setType == 7) {
|
|
69
|
+
return "连续多级主管";
|
|
70
|
+
} else if (nodeConf.setType == 9) {
|
|
71
|
+
return "驻点队长";
|
|
50
72
|
}
|
|
51
73
|
}
|
|
74
|
+
|
|
52
75
|
function onSaveTitle(e) {
|
|
53
76
|
setForm((f) => {
|
|
54
77
|
// @ts-ignore
|
|
@@ -57,68 +80,62 @@ export const Send = (props) => {
|
|
|
57
80
|
});
|
|
58
81
|
setIsEditTitle(false);
|
|
59
82
|
}
|
|
83
|
+
function onEditTitle() {
|
|
84
|
+
setIsEditTitle(true);
|
|
85
|
+
if (nodeTitleRef.current) {
|
|
86
|
+
// @ts-ignore
|
|
87
|
+
nodeTitleRef.current?.focus();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
60
90
|
|
|
61
91
|
function onDrawerSave() {
|
|
62
|
-
//
|
|
63
|
-
onChange && onChange(
|
|
92
|
+
// 强制更新数据
|
|
93
|
+
onChange && onChange(form);
|
|
64
94
|
onDrawerClose();
|
|
65
95
|
}
|
|
66
96
|
|
|
67
|
-
function
|
|
68
|
-
|
|
97
|
+
function onDrawerClose() {
|
|
98
|
+
setDrawer(false);
|
|
69
99
|
}
|
|
70
100
|
|
|
71
|
-
function
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return
|
|
75
|
-
}
|
|
76
|
-
if (nodeConfig.userSelectFlag) {
|
|
77
|
-
return "发起人自选";
|
|
78
|
-
} else {
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
101
|
+
function onUserDel(idx) {
|
|
102
|
+
setForm((f) => {
|
|
103
|
+
f.nodeAssigneeList.splice(idx, 1);
|
|
104
|
+
return { ...f };
|
|
105
|
+
});
|
|
82
106
|
}
|
|
83
107
|
|
|
84
|
-
function
|
|
85
|
-
|
|
86
|
-
|
|
108
|
+
function onRoleDel(idx) {
|
|
109
|
+
setForm((f) => {
|
|
110
|
+
f.nodeAssigneeList.splice(idx, 1);
|
|
111
|
+
return { ...f };
|
|
112
|
+
});
|
|
87
113
|
}
|
|
88
114
|
|
|
89
115
|
return (
|
|
90
|
-
<div className="
|
|
116
|
+
<div className="approver-wrap">
|
|
91
117
|
<div className="node-wrap">
|
|
92
118
|
<div className="node-wrap-box" onClick={onShow}>
|
|
93
|
-
<div className="title">
|
|
94
|
-
<
|
|
95
|
-
<span>{
|
|
96
|
-
<DeleteOutlined
|
|
97
|
-
className="close"
|
|
98
|
-
onClick={(e) => {
|
|
99
|
-
e.stopPropagation();
|
|
100
|
-
delNode();
|
|
101
|
-
}}
|
|
102
|
-
/>
|
|
119
|
+
<div className="title send-title">
|
|
120
|
+
<UserOutlined />
|
|
121
|
+
<span>{modelValue?.nodeName}</span>
|
|
122
|
+
<DeleteOutlined className="node-close-btn" onClick={onNodeDel} />
|
|
103
123
|
</div>
|
|
104
124
|
<div className="content">
|
|
105
|
-
{toText(
|
|
125
|
+
{toText(modelValue) ? <span>{toText(modelValue)}</span> : <span className="placeholder">请选择</span>}
|
|
106
126
|
</div>
|
|
107
127
|
</div>
|
|
128
|
+
|
|
108
129
|
<AddNode
|
|
109
|
-
modelValue={
|
|
130
|
+
modelValue={modelValue?.childNode}
|
|
110
131
|
onChange={(val) => {
|
|
111
|
-
|
|
112
|
-
|
|
132
|
+
modelValue.childNode = val;
|
|
133
|
+
// 强制更新数据
|
|
134
|
+
onChange && onChange({ ...modelValue });
|
|
113
135
|
}}
|
|
114
136
|
></AddNode>
|
|
115
137
|
|
|
116
138
|
<Drawer
|
|
117
|
-
v-model="drawer"
|
|
118
|
-
open={drawer}
|
|
119
|
-
onClose={onDrawerClose}
|
|
120
|
-
destroyOnClose
|
|
121
|
-
getContainer="body"
|
|
122
139
|
width={600}
|
|
123
140
|
title={
|
|
124
141
|
<div className="node-wrap-drawer-title">
|
|
@@ -132,65 +149,246 @@ export const Send = (props) => {
|
|
|
132
149
|
/>
|
|
133
150
|
) : (
|
|
134
151
|
<div className="drawer-title">
|
|
135
|
-
{form.nodeName || "
|
|
152
|
+
{form.nodeName || "审批人设置"}
|
|
136
153
|
<EditOutlined className="node-wrap-drawer__title-edit" onClick={onEditTitle} />
|
|
137
154
|
</div>
|
|
138
155
|
)}
|
|
139
156
|
</div>
|
|
140
157
|
}
|
|
158
|
+
open={drawer}
|
|
159
|
+
onClose={onDrawerClose}
|
|
160
|
+
destroyOnClose
|
|
161
|
+
getContainer="body"
|
|
141
162
|
footer={
|
|
142
|
-
|
|
163
|
+
<div className="approver-drawer-footer">
|
|
143
164
|
<Button type="primary" onClick={onDrawerSave}>
|
|
144
165
|
保存
|
|
145
166
|
</Button>
|
|
146
167
|
<Button onClick={onDrawerClose}>取消</Button>
|
|
147
|
-
|
|
168
|
+
</div>
|
|
148
169
|
}
|
|
149
170
|
>
|
|
150
|
-
<Form
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
171
|
+
<Form
|
|
172
|
+
ref={formRef}
|
|
173
|
+
name="approverForm"
|
|
174
|
+
labelCol={{ span: 8 }}
|
|
175
|
+
wrapperCol={{ span: 16 }}
|
|
176
|
+
initialValues={form}
|
|
177
|
+
autoComplete="off"
|
|
178
|
+
>
|
|
179
|
+
<Form.Item label="审批人员类型" name="setType">
|
|
180
|
+
<Select
|
|
181
|
+
options={setTypeOptions}
|
|
182
|
+
value={form.setType}
|
|
183
|
+
onSelect={(val) => {
|
|
184
|
+
setForm((f) => {
|
|
185
|
+
// 清空 人员、角色 列表数组
|
|
186
|
+
f.nodeAssigneeList = [];
|
|
187
|
+
f.setType = val;
|
|
188
|
+
return { ...f };
|
|
161
189
|
});
|
|
162
190
|
}}
|
|
163
|
-
|
|
164
|
-
选择人员
|
|
165
|
-
</Button>
|
|
166
|
-
<div className="tags-list">
|
|
167
|
-
{form.nodeAssigneeList?.map((it, idx) => {
|
|
168
|
-
return (
|
|
169
|
-
<Tag
|
|
170
|
-
key={it.id ?? idx}
|
|
171
|
-
className="node-assignee-item"
|
|
172
|
-
closable
|
|
173
|
-
onClose={() => {
|
|
174
|
-
delUser(idx);
|
|
175
|
-
}}
|
|
176
|
-
>
|
|
177
|
-
{it.name}
|
|
178
|
-
</Tag>
|
|
179
|
-
);
|
|
180
|
-
})}
|
|
181
|
-
</div>
|
|
191
|
+
/>
|
|
182
192
|
</Form.Item>
|
|
183
|
-
|
|
193
|
+
|
|
194
|
+
{form.setType === 1 ? (
|
|
195
|
+
<Form.Item label="选择成员" name="nodeAssigneeList">
|
|
196
|
+
<Button
|
|
197
|
+
type="primary"
|
|
198
|
+
icon={<PlusOutlined />}
|
|
199
|
+
onClick={() =>
|
|
200
|
+
selectorCtx.setSelectHandler(
|
|
201
|
+
1,
|
|
202
|
+
form.nodeAssigneeList,
|
|
203
|
+
(selected) => {
|
|
204
|
+
setForm((f) => {
|
|
205
|
+
// 设置 人员、角色 列表数组
|
|
206
|
+
f.nodeAssigneeList = selected;
|
|
207
|
+
return { ...f };
|
|
208
|
+
});
|
|
209
|
+
},
|
|
210
|
+
2,
|
|
211
|
+
)
|
|
212
|
+
}
|
|
213
|
+
>
|
|
214
|
+
选择人员
|
|
215
|
+
</Button>
|
|
216
|
+
<div className="tags-list">
|
|
217
|
+
{form.nodeAssigneeList?.map((user, idx) => {
|
|
218
|
+
return (
|
|
219
|
+
<Tag
|
|
220
|
+
key={user.id || idx}
|
|
221
|
+
className="node-assignee-item"
|
|
222
|
+
closable
|
|
223
|
+
onClose={() => {
|
|
224
|
+
onUserDel(idx);
|
|
225
|
+
}}
|
|
226
|
+
>
|
|
227
|
+
{user.name}
|
|
228
|
+
</Tag>
|
|
229
|
+
);
|
|
230
|
+
})}
|
|
231
|
+
</div>
|
|
232
|
+
</Form.Item>
|
|
233
|
+
) : null}
|
|
234
|
+
|
|
235
|
+
{/* {form.setType === 2 ? (
|
|
236
|
+
<Form.Item label="指定主管" name="aaa">
|
|
237
|
+
发起人的第
|
|
238
|
+
<InputNumber
|
|
239
|
+
min={1}
|
|
240
|
+
value={form.examineLevel}
|
|
241
|
+
onChange={(val) => {
|
|
242
|
+
setForm((f) => {
|
|
243
|
+
form.examineLevel = val;
|
|
244
|
+
return { ...f };
|
|
245
|
+
});
|
|
246
|
+
}}
|
|
247
|
+
/>
|
|
248
|
+
级主管
|
|
249
|
+
</Form.Item>
|
|
250
|
+
) : null} */}
|
|
251
|
+
|
|
252
|
+
{form.setType === 3 ? (
|
|
253
|
+
<Form.Item label="选择角色" name="nodeAssigneeList">
|
|
254
|
+
<Button
|
|
255
|
+
type="primary"
|
|
256
|
+
icon={<PlusOutlined />}
|
|
257
|
+
onClick={() =>
|
|
258
|
+
selectorCtx.setSelectHandler(
|
|
259
|
+
2,
|
|
260
|
+
form.nodeAssigneeList,
|
|
261
|
+
(selected) => {
|
|
262
|
+
setForm((f) => {
|
|
263
|
+
// 设置 人员、角色 列表数组
|
|
264
|
+
f.nodeAssigneeList = selected;
|
|
265
|
+
return { ...f };
|
|
266
|
+
});
|
|
267
|
+
},
|
|
268
|
+
2,
|
|
269
|
+
)
|
|
270
|
+
}
|
|
271
|
+
>
|
|
272
|
+
选择角色
|
|
273
|
+
</Button>
|
|
274
|
+
<div className="tags-list">
|
|
275
|
+
{form.nodeAssigneeList?.map((it, idx) => {
|
|
276
|
+
return (
|
|
277
|
+
<Tag
|
|
278
|
+
key={it.id || idx}
|
|
279
|
+
className="node-assignee-item"
|
|
280
|
+
closable
|
|
281
|
+
onClose={() => {
|
|
282
|
+
onRoleDel(idx);
|
|
283
|
+
}}
|
|
284
|
+
>
|
|
285
|
+
{it.name}
|
|
286
|
+
</Tag>
|
|
287
|
+
);
|
|
288
|
+
})}
|
|
289
|
+
</div>
|
|
290
|
+
</Form.Item>
|
|
291
|
+
) : null}
|
|
292
|
+
|
|
293
|
+
{/* {form.setType === 4 ? (
|
|
294
|
+
<Form.Item label="指定主管" name="selectMode">
|
|
295
|
+
<Radio.Group
|
|
296
|
+
options={selectModeOptions}
|
|
297
|
+
value={form.selectMode}
|
|
298
|
+
onChange={(e) => {
|
|
299
|
+
setForm((f) => {
|
|
300
|
+
form.selectMode = e.target.value;
|
|
301
|
+
return { ...f };
|
|
302
|
+
});
|
|
303
|
+
}}
|
|
304
|
+
/>
|
|
305
|
+
</Form.Item>
|
|
306
|
+
) : null}
|
|
307
|
+
|
|
308
|
+
{form.setType === 7 ? (
|
|
309
|
+
<Form.Item label="指定主管" name="directorMode">
|
|
310
|
+
<Radio.Group
|
|
311
|
+
options={directorModeOptions}
|
|
312
|
+
value={form.directorMode}
|
|
313
|
+
onChange={(e) => {
|
|
314
|
+
setForm((f) => {
|
|
315
|
+
form.directorMode = e.target.value;
|
|
316
|
+
return { ...f };
|
|
317
|
+
});
|
|
318
|
+
}}
|
|
319
|
+
/>
|
|
320
|
+
</Form.Item>
|
|
321
|
+
) : null}
|
|
322
|
+
|
|
323
|
+
{form.directorMode === 1 ? (
|
|
324
|
+
<Form.Item label="直到发起人的第" name="directorLevel">
|
|
325
|
+
<InputNumber
|
|
326
|
+
min={1}
|
|
327
|
+
value={form.directorLevel}
|
|
328
|
+
onChange={(val) => {
|
|
329
|
+
setForm((f) => {
|
|
330
|
+
form.directorLevel = val;
|
|
331
|
+
return { ...f };
|
|
332
|
+
});
|
|
333
|
+
}}
|
|
334
|
+
/>{" "}
|
|
335
|
+
级主管级主管
|
|
336
|
+
</Form.Item>
|
|
337
|
+
) : null}
|
|
338
|
+
|
|
339
|
+
<Form.Item label="超时自动审批" name="termAuto">
|
|
184
340
|
<Switch
|
|
185
|
-
checked={form.
|
|
341
|
+
checked={form.termAuto}
|
|
186
342
|
onChange={(val) => {
|
|
187
343
|
setForm((f) => {
|
|
188
|
-
form.
|
|
344
|
+
form.termAuto = val;
|
|
189
345
|
return { ...f };
|
|
190
346
|
});
|
|
191
347
|
}}
|
|
192
348
|
></Switch>
|
|
193
349
|
</Form.Item>
|
|
350
|
+
|
|
351
|
+
{form.termAuto ? (
|
|
352
|
+
<>
|
|
353
|
+
<Form.Item label="审批期限(为 0 则不生效)" name="term">
|
|
354
|
+
<InputNumber
|
|
355
|
+
min={0}
|
|
356
|
+
value={form.term}
|
|
357
|
+
onChange={(val) => {
|
|
358
|
+
setForm((f) => {
|
|
359
|
+
form.term = val;
|
|
360
|
+
return { ...f };
|
|
361
|
+
});
|
|
362
|
+
}}
|
|
363
|
+
/>
|
|
364
|
+
</Form.Item>
|
|
365
|
+
<Form.Item label="审批期限超时后执行" name="termMode">
|
|
366
|
+
<Radio.Group
|
|
367
|
+
options={termModeOptions}
|
|
368
|
+
value={form.termMode}
|
|
369
|
+
onChange={(e) => {
|
|
370
|
+
setForm((f) => {
|
|
371
|
+
form.termMode = e.target.value;
|
|
372
|
+
return { ...f };
|
|
373
|
+
});
|
|
374
|
+
}}
|
|
375
|
+
/>
|
|
376
|
+
</Form.Item>
|
|
377
|
+
</>
|
|
378
|
+
) : null}
|
|
379
|
+
|
|
380
|
+
<Form.Item label="多人审批时审批方式" name="examineMode">
|
|
381
|
+
<Radio.Group
|
|
382
|
+
options={examineModeOptions}
|
|
383
|
+
value={form.examineMode}
|
|
384
|
+
onChange={(e) => {
|
|
385
|
+
setForm((f) => {
|
|
386
|
+
form.examineMode = e.target.value;
|
|
387
|
+
return { ...f };
|
|
388
|
+
});
|
|
389
|
+
}}
|
|
390
|
+
/>
|
|
391
|
+
</Form.Item> */}
|
|
194
392
|
</Form>
|
|
195
393
|
</Drawer>
|
|
196
394
|
</div>
|
|
@@ -198,4 +396,4 @@ export const Send = (props) => {
|
|
|
198
396
|
);
|
|
199
397
|
};
|
|
200
398
|
|
|
201
|
-
export default
|
|
399
|
+
export default Approver;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 审批人员类型
|
|
3
|
+
*/
|
|
4
|
+
export const setTypeOptions = [
|
|
5
|
+
{ label: "指定成员", value: 1 },
|
|
6
|
+
{ label: "部门经理", value: 2 },
|
|
7
|
+
{ label: "角色", value: 3 },
|
|
8
|
+
// { label: "发起人自选", value: 4 },
|
|
9
|
+
// { label: "发起人自己", value: 5 },
|
|
10
|
+
// { label: "连续多级主管", value: 7 },
|
|
11
|
+
{ label: "驻点队长", value: 9 },
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 发起人自选
|
|
16
|
+
*/
|
|
17
|
+
export const selectModeOptions = [
|
|
18
|
+
{ label: "自选一个人", value: 1 },
|
|
19
|
+
{ label: "自选多个人", value: 2 },
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 连续主管审批终点
|
|
24
|
+
*/
|
|
25
|
+
export const directorModeOptions = [
|
|
26
|
+
{ label: "直到最上层主管", value: 0 },
|
|
27
|
+
{ label: "自定义审批终点", value: 1 },
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 审批期限超时后执行
|
|
32
|
+
*/
|
|
33
|
+
export const termModeOptions = [
|
|
34
|
+
{ label: "自动通过", value: 0 },
|
|
35
|
+
{ label: "自动拒绝", value: 1 },
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 多人审批时审批方式
|
|
40
|
+
*/
|
|
41
|
+
export const examineModeOptions = [
|
|
42
|
+
{ label: "按顺序依次审批", value: 1 },
|
|
43
|
+
{ label: "会签 (可同时审批,每个人必须审批通过)", value: 2 },
|
|
44
|
+
{ label: "或签 (有一人审批通过即可)", value: 3 },
|
|
45
|
+
];
|
|
@@ -5,13 +5,16 @@ export interface ISelectHandlerI {
|
|
|
5
5
|
open: boolean;
|
|
6
6
|
/** 选择类型 */
|
|
7
7
|
type: number;
|
|
8
|
+
/** 抽屉选择类型 */
|
|
9
|
+
drawerType: number;
|
|
10
|
+
|
|
8
11
|
/** 已选中的数据 */
|
|
9
12
|
value: [];
|
|
10
13
|
/** 选中保存回调 */
|
|
11
14
|
onSave: (selected) => void;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
roleListConfig,
|
|
16
|
+
listConfig,
|
|
17
|
+
initiatorListConfig,
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
/**
|
|
@@ -21,12 +24,13 @@ export const SelectContext = createContext({
|
|
|
21
24
|
selectHandler: {
|
|
22
25
|
open: false,
|
|
23
26
|
type: undefined,
|
|
27
|
+
drawerType: undefined,
|
|
24
28
|
value: [],
|
|
25
|
-
onSave: (s) => {},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
onSave: (s) => { },
|
|
30
|
+
roleListConfig: {},
|
|
31
|
+
listConfig: {},
|
|
32
|
+
initiatorListConfig: {},
|
|
29
33
|
},
|
|
30
|
-
setSelectHandler(type, value, onSave) {},
|
|
31
|
-
onClose() {},
|
|
34
|
+
setSelectHandler(type, value, onSave, drawerType) { },
|
|
35
|
+
onClose() { },
|
|
32
36
|
});
|