Skip to content

Commit 92ee6d6

Browse files
committed
仿钉钉流程设计器- 连续多级部门负责人支持选多个部门
1 parent 8b3c294 commit 92ee6d6

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/components/SimpleProcessDesignerV2/src/node.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ export function useNodeForm(nodeType: NodeType) {
293293
break
294294
// 指定连续多级部门的负责人
295295
case CandidateStrategy.MULTI_LEVEL_DEPT_LEADER: {
296-
// TODO 是否允许选多个部门
296+
// 候选人参数格式 ,分隔。 被分隔的最后一个为部门层级
297297
const deptIds = configForm.value.deptIds!.join(',')
298298
candidateParam = deptIds.concat(',' + configForm.value.deptLevel + '')
299299
break
@@ -341,10 +341,13 @@ export function useNodeForm(nodeType: NodeType) {
341341
break
342342
// 指定连续多级部门的负责人
343343
case CandidateStrategy.MULTI_LEVEL_DEPT_LEADER: {
344-
// 暂时只能选一个部门
344+
// 候选人参数格式 ,分隔。 被分隔的最后一个为部门层级
345345
const paramArray = candidateParam.split(',')
346-
configForm.value.deptIds = [+paramArray[0]]
347-
configForm.value.deptLevel = +paramArray[1]
346+
configForm.value.deptIds = []
347+
for (let i = 0; i < paramArray.length - 1; i++) {
348+
configForm.value.deptIds.push(+paramArray[i])
349+
}
350+
configForm.value.deptLevel = +paramArray[paramArray.length - 1]
348351
break
349352
}
350353
default:

src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
empty-text="加载中,请稍后"
7777
multiple
7878
node-key="id"
79+
check-strictly
7980
style="width: 100%"
8081
show-checkbox
8182
/>

0 commit comments

Comments
 (0)