Skip to content

Commit 2486f0d

Browse files
committed
Merge branch 'feature/bpm-跳过表达式' of https://gitee.com/LesanOuO/yudao-ui-admin-vue3 into feature/bpm
# Conflicts: # src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json
2 parents c8447fe + 4e0e8dd commit 2486f0d

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,6 +1452,17 @@
14521452
"isBody": true
14531453
}
14541454
]
1455+
},
1456+
{
1457+
"name": "SkipExpression",
1458+
"extends": ["bpmn:UserTask"],
1459+
"properties": [
1460+
{
1461+
"name": "skipExpression",
1462+
"isAttr": true,
1463+
"type": "String"
1464+
}
1465+
]
14551466
}
14561467
],
14571468
"emumerations": []

src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,16 @@
192192
<!-- 选择弹窗 -->
193193
<ProcessExpressionDialog ref="processExpressionDialogRef" @select="selectProcessExpression" />
194194
</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>
195205
</el-form>
196206
</template>
197207

@@ -220,7 +230,8 @@ const props = defineProps({
220230
const prefix = inject('prefix')
221231
const userTaskForm = ref({
222232
candidateStrategy: undefined, // 分配规则
223-
candidateParam: [] // 分配选项
233+
candidateParam: [], // 分配选项
234+
skipExpression: '' // 跳过表达式
224235
})
225236
const bpmnElement = ref()
226237
const bpmnInstances = () => (window as any)?.bpmnInstances
@@ -311,6 +322,13 @@ const resetTaskForm = () => {
311322
(ex) => ex.$type !== `${prefix}:CandidateStrategy` && ex.$type !== `${prefix}:CandidateParam`
312323
) ?? []
313324
325+
// 跳过表达式
326+
if (businessObject.skipExpression != undefined) {
327+
userTaskForm.value.skipExpression = businessObject.skipExpression
328+
} else {
329+
userTaskForm.value.skipExpression = ''
330+
}
331+
314332
// 改用通过extensionElements来存储数据
315333
return
316334
if (businessObject.candidateStrategy != undefined) {
@@ -390,6 +408,18 @@ const updateElementTask = () => {
390408
})
391409
}
392410
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+
393423
// 打开监听器弹窗
394424
const processExpressionDialogRef = ref()
395425
const openProcessExpressionDialog = async () => {

0 commit comments

Comments
 (0)