|
192 | 192 | <!-- 选择弹窗 -->
|
193 | 193 | <ProcessExpressionDialog ref="processExpressionDialogRef" @select="selectProcessExpression" />
|
194 | 194 | </el-form-item>
|
| 195 | + |
| 196 | + <el-form-item label="跳过表达式" prop="skipExpression"> |
| 197 | + <el-input |
| 198 | + type="textarea" |
| 199 | + v-model="userTaskForm.skipExpression" |
| 200 | + clearable |
| 201 | + style="width: 100%" |
| 202 | + @change="updateSkipExpression" |
| 203 | + /> |
| 204 | + </el-form-item> |
195 | 205 | </el-form>
|
196 | 206 | </template>
|
197 | 207 |
|
@@ -220,7 +230,8 @@ const props = defineProps({
|
220 | 230 | const prefix = inject('prefix')
|
221 | 231 | const userTaskForm = ref({
|
222 | 232 | candidateStrategy: undefined, // 分配规则
|
223 |
| - candidateParam: [] // 分配选项 |
| 233 | + candidateParam: [], // 分配选项 |
| 234 | + skipExpression: '' // 跳过表达式 |
224 | 235 | })
|
225 | 236 | const bpmnElement = ref()
|
226 | 237 | const bpmnInstances = () => (window as any)?.bpmnInstances
|
@@ -311,6 +322,13 @@ const resetTaskForm = () => {
|
311 | 322 | (ex) => ex.$type !== `${prefix}:CandidateStrategy` && ex.$type !== `${prefix}:CandidateParam`
|
312 | 323 | ) ?? []
|
313 | 324 |
|
| 325 | + // 跳过表达式 |
| 326 | + if (businessObject.skipExpression != undefined) { |
| 327 | + userTaskForm.value.skipExpression = businessObject.skipExpression |
| 328 | + } else { |
| 329 | + userTaskForm.value.skipExpression = '' |
| 330 | + } |
| 331 | +
|
314 | 332 | // 改用通过extensionElements来存储数据
|
315 | 333 | return
|
316 | 334 | if (businessObject.candidateStrategy != undefined) {
|
@@ -390,6 +408,18 @@ const updateElementTask = () => {
|
390 | 408 | })
|
391 | 409 | }
|
392 | 410 |
|
| 411 | +const updateSkipExpression = () => { |
| 412 | + if (userTaskForm.value.skipExpression && userTaskForm.value.skipExpression !== '') { |
| 413 | + bpmnInstances().modeling.updateProperties(toRaw(bpmnElement.value), { |
| 414 | + skipExpression: userTaskForm.value.skipExpression |
| 415 | + }) |
| 416 | + } else { |
| 417 | + bpmnInstances().modeling.updateProperties(toRaw(bpmnElement.value), { |
| 418 | + skipExpression: null |
| 419 | + }) |
| 420 | + } |
| 421 | +} |
| 422 | +
|
393 | 423 | // 打开监听器弹窗
|
394 | 424 | const processExpressionDialogRef = ref()
|
395 | 425 | const openProcessExpressionDialog = async () => {
|
|
0 commit comments