File tree Expand file tree Collapse file tree 2 files changed +10
-15
lines changed
components/bpmnProcessDesigner/package/penal/base Expand file tree Collapse file tree 2 files changed +10
-15
lines changed Original file line number Diff line number Diff line change 3
3
<el-form label-width =" 90px" :model =" needProps" :rules =" rules" >
4
4
<div v-if =" needProps.type == 'bpmn:Process'" >
5
5
<!-- 如果是 Process 信息的时候,使用自定义表单 -->
6
- <el-link
7
- href =" https://doc.iocoder.cn/bpm/#_3-%E6%B5%81%E7%A8%8B%E5%9B%BE%E7%A4%BA%E4%BE%8B"
8
- type =" danger"
9
- target =" _blank"
10
- >
11
- 如何实现实现会签、或签?
12
- </el-link >
13
6
<el-form-item label =" 流程标识" prop =" id" >
14
7
<el-input
15
8
v-model =" needProps.id"
@@ -139,14 +132,6 @@ const updateBaseInfo = (key) => {
139
132
}
140
133
}
141
134
142
- onMounted (() => {
143
- // 针对上传的 bpmn 流程图时,需要延迟 1 毫秒的时间,保证 key 和 name 的更新
144
- setTimeout (() => {
145
- handleKeyUpdate (props .model .key )
146
- handleNameUpdate (props .model .name )
147
- }, 110 )
148
- })
149
-
150
135
watch (
151
136
() => props .businessObject ,
152
137
(val ) => {
Original file line number Diff line number Diff line change @@ -89,6 +89,16 @@ onMounted(async () => {
89
89
}
90
90
// 查询模型
91
91
const data = await ModelApi .getModel (modelId )
92
+ if (! data .bpmnXml ) {
93
+ // 首次创建的 Model 模型,它是没有 bpmnXml,此时需要给它一个默认的
94
+ data .bpmnXml = ` <?xml version="1.0" encoding="UTF-8"?>
95
+ <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.activiti.org/processdef">
96
+ <process id="${data .key }" name="${data .name }" isExecutable="true" />
97
+ <bpmndi:BPMNDiagram id="BPMNDiagram">
98
+ <bpmndi:BPMNPlane id="${data .key }_di" bpmnElement="${data .key }" />
99
+ </bpmndi:BPMNDiagram>
100
+ </definitions> `
101
+ }
92
102
model .value = {
93
103
... data ,
94
104
bpmnXml: undefined // 清空 bpmnXml 属性
You can’t perform that action at this time.
0 commit comments