File tree Expand file tree Collapse file tree 3 files changed +44
-2
lines changed
src/components/SimpleProcessDesignerV2/src Expand file tree Collapse file tree 3 files changed +44
-2
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,8 @@ export interface SimpleFlowNode {
77
77
timeoutHandler ?: TimeoutHandler
78
78
// 审批任务拒绝处理
79
79
rejectHandler ?: RejectHandler
80
+ // 审批节点的审批人与发起人相同时,对应的处理类型
81
+ assignStartUserHandlerType ?: number
80
82
}
81
83
// 候选人策略枚举 ( 用于审批节点。抄送节点 )
82
84
export enum CandidateStrategy {
@@ -174,6 +176,21 @@ export enum RejectHandlerType {
174
176
*/
175
177
RETURN_USER_TASK = 2
176
178
}
179
+ // 用户任务的审批人与发起人相同时,处理类型枚举
180
+ export enum AssignStartUserHandlerType {
181
+ /**
182
+ * 由发起人对自己审批
183
+ */
184
+ START_USER_AUDIT = 1 ,
185
+ /**
186
+ * 自动跳过【参考飞书】:1)如果当前节点还有其他审批人,则交由其他审批人进行审批;2)如果当前节点没有其他审批人,则该节点自动通过
187
+ */
188
+ SKIP = 2 ,
189
+ /**
190
+ * 转交给部门负责人审批
191
+ */
192
+ ASSIGN_DEPT_LEADER
193
+ }
177
194
178
195
// 时间单位枚举
179
196
export enum TimeUnitType {
@@ -309,6 +326,11 @@ export const REJECT_HANDLER_TYPES: DictDataVO[] = [
309
326
{ label : '驳回到指定节点' , value : RejectHandlerType . RETURN_USER_TASK }
310
327
// { label: '结束任务', value: RejectHandlerType.FINISH_TASK }
311
328
]
329
+ export const ASSIGN_START_USER_HANDLER_TYPES : DictDataVO [ ] = [
330
+ { label : '由发起人对自己审批' , value : 1 } ,
331
+ { label : '自动跳过' , value : 2 } ,
332
+ { label : '转交给部门负责人审批' , value : 3 }
333
+ ]
312
334
313
335
// 比较运算符
314
336
export const COMPARISON_OPERATORS : DictDataVO = [
Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ import {
10
10
NodeType ,
11
11
ApproveMethodType ,
12
12
RejectHandlerType ,
13
- NODE_DEFAULT_NAME
13
+ NODE_DEFAULT_NAME ,
14
+ AssignStartUserHandlerType ,
15
+ ASSIGN_START_USER_HANDLER_TYPES
14
16
} from './consts'
15
17
export function useWatchNode ( props : { flowNode : SimpleFlowNode } ) : Ref < SimpleFlowNode > {
16
18
const node = ref < SimpleFlowNode > ( props . flowNode )
@@ -97,6 +99,7 @@ export type UserTaskFormType = {
97
99
returnNodeId ?: string
98
100
timeoutHandlerEnable ?: boolean
99
101
timeoutHandlerAction ?: number
102
+ assignStartUserHandlerType ?: AssignStartUserHandlerType
100
103
timeDuration ?: number
101
104
maxRemindCount ?: number
102
105
buttonsSetting : any [ ]
@@ -125,6 +128,7 @@ export function useNodeForm(nodeType: NodeType) {
125
128
approveMethod : ApproveMethodType . RRANDOM_SELECT_ONE_APPROVE ,
126
129
approveRatio : 100 ,
127
130
rejectHandlerType : RejectHandlerType . FINISH_PROCESS ,
131
+ assignStartUserHandlerType : AssignStartUserHandlerType . START_USER_AUDIT ,
128
132
returnNodeId : '' ,
129
133
timeoutHandlerEnable : false ,
130
134
timeoutHandlerAction : 1 ,
Original file line number Diff line number Diff line change 275
275
>
276
276
<el-input-number v-model =" configForm.maxRemindCount" :min =" 1" :max =" 10" />
277
277
</el-form-item >
278
+
279
+ <el-divider content-position =" left" >审批人与提交人为同一人时</el-divider >
280
+ <el-form-item prop =" assignStartUserHandlerType" >
281
+ <el-radio-group v-model =" configForm.assignStartUserHandlerType" >
282
+ <div class =" flex-col" >
283
+ <div v-for =" (item, index) in ASSIGN_START_USER_HANDLER_TYPES" :key =" index" >
284
+ <el-radio :key =" item.value" :value =" item.value" :label =" item.label" />
285
+ </div >
286
+ </div >
287
+ </el-radio-group >
288
+ </el-form-item >
278
289
</el-form >
279
290
</div >
280
291
</el-tab-pane >
@@ -364,7 +375,8 @@ import {
364
375
REJECT_HANDLER_TYPES ,
365
376
DEFAULT_BUTTON_SETTING ,
366
377
OPERATION_BUTTON_NAME ,
367
- ButtonSetting
378
+ ButtonSetting ,
379
+ ASSIGN_START_USER_HANDLER_TYPES
368
380
} from ' ../consts'
369
381
import { DICT_TYPE , getIntDictOptions } from ' @/utils/dict'
370
382
import {
@@ -506,6 +518,8 @@ const saveConfig = async () => {
506
518
timeDuration: isoTimeDuration .value ,
507
519
maxRemindCount: cTimeoutMaxRemindCount .value
508
520
}
521
+ // 设置用户任务的审批人与发起人相同时
522
+ currentNode .value .assignStartUserHandlerType = configForm .value .assignStartUserHandlerType
509
523
// 设置表单权限
510
524
currentNode .value .fieldsPermission = fieldsPermissionConfig .value
511
525
// 设置按钮权限
@@ -560,6 +574,8 @@ const showUserTaskNodeConfig = (node: SimpleFlowNode) => {
560
574
}
561
575
configForm .value .timeoutHandlerAction = node .timeoutHandler ?.action
562
576
configForm .value .maxRemindCount = node .timeoutHandler ?.maxRemindCount
577
+ // 1.5 设置用户任务的审批人与发起人相同时
578
+ configForm .value .assignStartUserHandlerType = node .assignStartUserHandlerType
563
579
// 2. 操作按钮设置
564
580
buttonsSetting .value = cloneDeep (node .buttonsSetting ) || DEFAULT_BUTTON_SETTING
565
581
// 3. 表单字段权限配置
You can’t perform that action at this time.
0 commit comments