From 9f3bc1ead8ece593018e226408667446a70a2c27 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 27 Mar 2024 18:51:06 +0800 Subject: [PATCH] =?UTF-8?q?BPM=EF=BC=9A=E4=BF=AE=E5=A4=8D=20bpmnxml=20?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E6=97=B6=EF=BC=8C=E5=B1=95=E7=A4=BA=E7=9A=84?= =?UTF-8?q?=20key=20=E8=A2=AB=E8=A6=86=E7=9B=96=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../package/penal/base/ElementBaseInfo.vue | 15 --------------- src/views/bpm/model/editor/index.vue | 10 ++++++++++ 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue b/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue index 5ad2ff4b..70ad4f8b 100644 --- a/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue +++ b/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue @@ -3,13 +3,6 @@
- - 如何实现实现会签、或签? - { } } -onMounted(() => { - // 针对上传的 bpmn 流程图时,需要延迟 1 毫秒的时间,保证 key 和 name 的更新 - setTimeout(() => { - handleKeyUpdate(props.model.key) - handleNameUpdate(props.model.name) - }, 110) -}) - watch( () => props.businessObject, (val) => { diff --git a/src/views/bpm/model/editor/index.vue b/src/views/bpm/model/editor/index.vue index 0dfabc75..29bca71c 100644 --- a/src/views/bpm/model/editor/index.vue +++ b/src/views/bpm/model/editor/index.vue @@ -89,6 +89,16 @@ onMounted(async () => { } // 查询模型 const data = await ModelApi.getModel(modelId) + if (!data.bpmnXml) { + // 首次创建的 Model 模型,它是没有 bpmnXml,此时需要给它一个默认的 + data.bpmnXml = ` + + + + + +` + } model.value = { ...data, bpmnXml: undefined // 清空 bpmnXml 属性