From be33226178c5e0696e4311600609ffbc962eb3b2 Mon Sep 17 00:00:00 2001
From: Lesan <1960681385@qq.com>
Date: Mon, 2 Dec 2024 09:50:29 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BE=B9=E7=95=8C=E4=BA=8B=E4=BB=B6?=
=?UTF-8?q?=E5=88=87=E6=8D=A2=E7=B1=BB=E5=88=AB=E6=97=B6=E9=9C=80=E7=9B=91?=
=?UTF-8?q?=E5=90=ACbusinessObject?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../package/penal/PropertiesPanel.vue | 2 +-
.../custom-config/ElementCustomConfig.vue | 24 +++++++++----------
2 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue b/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue
index c4bc7b2e..c32c7620 100644
--- a/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue
+++ b/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue
@@ -56,7 +56,7 @@
自定义配置
-
+
diff --git a/src/components/bpmnProcessDesigner/package/penal/custom-config/ElementCustomConfig.vue b/src/components/bpmnProcessDesigner/package/penal/custom-config/ElementCustomConfig.vue
index 9d8b3f57..f9cb9ac4 100644
--- a/src/components/bpmnProcessDesigner/package/penal/custom-config/ElementCustomConfig.vue
+++ b/src/components/bpmnProcessDesigner/package/penal/custom-config/ElementCustomConfig.vue
@@ -11,27 +11,25 @@ defineOptions({ name: 'ElementCustomConfig' })
const props = defineProps({
id: String,
- type: String
+ type: String,
+ businessObject: {
+ type: Object,
+ default: () => {}
+ }
})
const bpmnInstances = () => (window as any)?.bpmnInstances
const customConfigComponent = ref(null)
watch(
- () => props.type,
+ () => props.businessObject,
() => {
- if (props.type) {
- const element = bpmnInstances().bpmnElement.businessObject
- let elementType = props.type
- if (element.eventDefinitions) {
- // 处理类似共用BoundaryEvent类型的TimerEvent
- elementType += element.eventDefinitions[0].$type.split(':')[1]
- }
- const config = CustomConfigMap[elementType]
- if (config) {
- customConfigComponent.value = config.componet
- return
+ if (props.type && props.businessObject) {
+ let val = props.type
+ if (props.businessObject.eventDefinitions) {
+ val += props.businessObject.eventDefinitions[0]?.$type.split(':')[1] || ''
}
+ customConfigComponent.value = CustomConfigMap[val]?.componet
}
},
{ immediate: true }