fix: 修复流程线和结束节点监听器无法回显问题

rf
tony 2023-01-11 13:23:27 +08:00
parent 582712d764
commit ae3ff10a5e
3 changed files with 22 additions and 4 deletions

View File

@ -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
}
})

View File

@ -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
},
}
}
</script>

View File

@ -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
},
}
}
</script>