|
1 | 1 | <template>
|
2 |
| - <el-form label-width="100px"> |
| 2 | + <el-form label-width="120px"> |
3 | 3 | <el-form-item label="规则类型" prop="candidateStrategy">
|
4 | 4 | <el-select
|
5 | 5 | v-model="userTaskForm.candidateStrategy"
|
|
111 | 111 | </el-form-item>
|
112 | 112 | <el-form-item
|
113 | 113 | v-if="userTaskForm.candidateStrategy === CandidateStrategy.FORM_USER"
|
114 |
| - label="用户字段" |
| 114 | + label="表单内用户字段" |
115 | 115 | prop="formUser"
|
116 | 116 | >
|
117 | 117 | <el-select
|
|
140 | 140 | prop="deptLevel"
|
141 | 141 | span="24"
|
142 | 142 | >
|
143 |
| - <el-select v-model="deptLevel" clearable> |
| 143 | + <el-select v-model="deptLevel" clearable @change="updateElementTask"> |
144 | 144 | <el-option
|
145 | 145 | v-for="(item, index) in MULTI_LEVEL_DEPT"
|
146 | 146 | :key="index"
|
@@ -258,6 +258,12 @@ const resetTaskForm = () => {
|
258 | 258 | return num > Number.MAX_SAFE_INTEGER || num < -Number.MAX_SAFE_INTEGER ? item : num
|
259 | 259 | })
|
260 | 260 | deptLevel.value = +candidateParamStr.split('|')[1]
|
| 261 | + } else if ( |
| 262 | + userTaskForm.value.candidateStrategy == CandidateStrategy.START_USER_DEPT_LEADER || |
| 263 | + userTaskForm.value.candidateStrategy == CandidateStrategy.START_USER_MULTI_LEVEL_DEPT_LEADER |
| 264 | + ) { |
| 265 | + userTaskForm.value.candidateParam = +candidateParamStr |
| 266 | + deptLevel.value = +candidateParamStr |
261 | 267 | } else {
|
262 | 268 | userTaskForm.value.candidateParam = candidateParamStr.split(',').map((item) => {
|
263 | 269 | // 如果数字超出了最大安全整数范围,则将其作为字符串处理
|
@@ -319,6 +325,14 @@ const updateElementTask = () => {
|
319 | 325 | if (userTaskForm.value.candidateStrategy == CandidateStrategy.MULTI_LEVEL_DEPT_LEADER) {
|
320 | 326 | candidateParam += '|' + deptLevel.value
|
321 | 327 | }
|
| 328 | + // 特殊处理发起人部门负责人、发起人连续部门负责人 |
| 329 | + if ( |
| 330 | + userTaskForm.value.candidateStrategy == CandidateStrategy.START_USER_DEPT_LEADER || |
| 331 | + userTaskForm.value.candidateStrategy == CandidateStrategy.START_USER_MULTI_LEVEL_DEPT_LEADER |
| 332 | + ) { |
| 333 | + candidateParam = deptLevel.value + '' |
| 334 | + } |
| 335 | +
|
322 | 336 | const extensions = bpmnInstances().moddle.create('bpmn:ExtensionElements', {
|
323 | 337 | values: [
|
324 | 338 | ...otherExtensions.value,
|
|
0 commit comments