|
8 | 8 | @change="changeCandidateStrategy"
|
9 | 9 | >
|
10 | 10 | <el-option
|
11 |
| - v-for="dict in getIntDictOptions(DICT_TYPE.BPM_TASK_CANDIDATE_STRATEGY)" |
12 |
| - :key="dict.value" |
| 11 | + v-for="(dict, index) in CANDIDATE_STRATEGY" |
| 12 | + :key="index" |
13 | 13 | :label="dict.label"
|
14 | 14 | :value="dict.value"
|
15 | 15 | />
|
16 | 16 | </el-select>
|
17 | 17 | </el-form-item>
|
18 | 18 | <el-form-item
|
19 |
| - v-if="userTaskForm.candidateStrategy == 10" |
| 19 | + v-if="userTaskForm.candidateStrategy == CandidateStrategy.ROLE" |
20 | 20 | label="指定角色"
|
21 | 21 | prop="candidateParam"
|
22 | 22 | >
|
|
31 | 31 | </el-select>
|
32 | 32 | </el-form-item>
|
33 | 33 | <el-form-item
|
34 |
| - v-if="userTaskForm.candidateStrategy == 20 || userTaskForm.candidateStrategy == 21" |
| 34 | + v-if=" |
| 35 | + userTaskForm.candidateStrategy == CandidateStrategy.DEPT_MEMBER || |
| 36 | + userTaskForm.candidateStrategy == CandidateStrategy.DEPT_LEADER || |
| 37 | + userTaskForm.candidateStrategy == CandidateStrategy.MULTI_LEVEL_DEPT_LEADER |
| 38 | + " |
35 | 39 | label="指定部门"
|
36 | 40 | prop="candidateParam"
|
37 | 41 | span="24"
|
|
49 | 53 | />
|
50 | 54 | </el-form-item>
|
51 | 55 | <el-form-item
|
52 |
| - v-if="userTaskForm.candidateStrategy == 22" |
| 56 | + v-if="userTaskForm.candidateStrategy == CandidateStrategy.POST" |
53 | 57 | label="指定岗位"
|
54 | 58 | prop="candidateParam"
|
55 | 59 | span="24"
|
|
65 | 69 | </el-select>
|
66 | 70 | </el-form-item>
|
67 | 71 | <el-form-item
|
68 |
| - v-if="userTaskForm.candidateStrategy == 30" |
| 72 | + v-if="userTaskForm.candidateStrategy == CandidateStrategy.USER" |
69 | 73 | label="指定用户"
|
70 | 74 | prop="candidateParam"
|
71 | 75 | span="24"
|
|
86 | 90 | </el-select>
|
87 | 91 | </el-form-item>
|
88 | 92 | <el-form-item
|
89 |
| - v-if="userTaskForm.candidateStrategy === 40" |
| 93 | + v-if="userTaskForm.candidateStrategy === CandidateStrategy.USER_GROUP" |
90 | 94 | label="指定用户组"
|
91 | 95 | prop="candidateParam"
|
92 | 96 | >
|
|
106 | 110 | </el-select>
|
107 | 111 | </el-form-item>
|
108 | 112 | <el-form-item
|
109 |
| - v-if="userTaskForm.candidateStrategy === 60" |
| 113 | + v-if="userTaskForm.candidateStrategy === CandidateStrategy.EXPRESSION" |
110 | 114 | label="流程表达式"
|
111 | 115 | prop="candidateParam"
|
112 | 116 | >
|
|
127 | 131 | </template>
|
128 | 132 |
|
129 | 133 | <script lang="ts" setup>
|
130 |
| -import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' |
| 134 | +import { |
| 135 | + CANDIDATE_STRATEGY, |
| 136 | + CandidateStrategy |
| 137 | +} from '@/components/SimpleProcessDesignerV2/src/consts' |
131 | 138 | import { defaultProps, handleTree } from '@/utils/tree'
|
132 | 139 | import * as RoleApi from '@/api/system/role'
|
133 | 140 | import * as DeptApi from '@/api/system/dept'
|
@@ -163,7 +170,9 @@ const resetTaskForm = () => {
|
163 | 170 | return
|
164 | 171 | }
|
165 | 172 |
|
166 |
| - const extensionElements = businessObject?.extensionElements ?? bpmnInstances().moddle.create('bpmn:ExtensionElements', { values: [] }) |
| 173 | + const extensionElements = |
| 174 | + businessObject?.extensionElements ?? |
| 175 | + bpmnInstances().moddle.create('bpmn:ExtensionElements', { values: [] }) |
167 | 176 | userTaskForm.value.candidateStrategy = extensionElements.values?.filter(
|
168 | 177 | (ex) => ex.$type === `${prefix}:CandidateStrategy`
|
169 | 178 | )?.[0]?.value
|
|
0 commit comments