From ae3ff10a5eff82feaa56d781c2a628f260885322 Mon Sep 17 00:00:00 2001 From: tony <846249920@qq.com> Date: Wed, 11 Jan 2023 13:23:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E7=BA=BF=E5=92=8C=E7=BB=93=E6=9D=9F=E8=8A=82=E7=82=B9=E7=9B=91?= =?UTF-8?q?=E5=90=AC=E5=99=A8=E6=97=A0=E6=B3=95=E5=9B=9E=E6=98=BE=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/Process/PropertyPanel.vue | 4 +++- .../Process/components/nodePanel/sequenceFlow.vue | 12 ++++++++++-- .../Process/components/nodePanel/startEnd.vue | 10 +++++++++- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/ruoyi-ui/src/components/Process/PropertyPanel.vue b/ruoyi-ui/src/components/Process/PropertyPanel.vue index 96e46fc3..30834db1 100644 --- a/ruoyi-ui/src/components/Process/PropertyPanel.vue +++ b/ruoyi-ui/src/components/Process/PropertyPanel.vue @@ -119,7 +119,9 @@ export default { }) this.modeler.on('element.click', e => { const { element } = e - if (element.type === 'bpmn:Process') { + if (element.type === 'bpmn:Process' + || element.type === 'bpmn:SequenceFlow' + || element.type === 'bpmn:EndEvent' ) { this.element = element } }) diff --git a/ruoyi-ui/src/components/Process/components/nodePanel/sequenceFlow.vue b/ruoyi-ui/src/components/Process/components/nodePanel/sequenceFlow.vue index 337c0478..14d94f38 100644 --- a/ruoyi-ui/src/components/Process/components/nodePanel/sequenceFlow.vue +++ b/ruoyi-ui/src/components/Process/components/nodePanel/sequenceFlow.vue @@ -25,7 +25,8 @@ export default { mixins: [mixinPanel, mixinExecutionListener], data() { return { - formData: {} + formData: {}, + executionListenerLength: 0 } }, computed: { @@ -89,7 +90,14 @@ export default { created() { let cache = commonParse(this.element) cache = conditionExpressionParse(cache) - this.formData = cache + this.formData = cache; + this.computedExecutionListenerLength(); + }, + methods:{ + computedExecutionListenerLength() { + this.executionListenerLength = this.element.businessObject.extensionElements?.values + ?.filter(item => item.$type === 'flowable:ExecutionListener').length ?? 0 + }, } } diff --git a/ruoyi-ui/src/components/Process/components/nodePanel/startEnd.vue b/ruoyi-ui/src/components/Process/components/nodePanel/startEnd.vue index b0515acc..bf64db25 100644 --- a/ruoyi-ui/src/components/Process/components/nodePanel/startEnd.vue +++ b/ruoyi-ui/src/components/Process/components/nodePanel/startEnd.vue @@ -24,7 +24,8 @@ export default { mixins: [mixinPanel, mixinExecutionListener], data() { return { - formData: {} + formData: {}, + executionListenerLength: 0 } }, computed: { @@ -85,6 +86,13 @@ export default { created() { // this.updateProperties({ 'flowable:initiator': 'INITIATOR' }) this.formData = commonParse(this.element) + this.computedExecutionListenerLength(); + }, + methods:{ + computedExecutionListenerLength() { + this.executionListenerLength = this.element.businessObject.extensionElements?.values + ?.filter(item => item.$type === 'flowable:ExecutionListener').length ?? 0 + }, } }