From a3d3f962a329814d360f06c8ae712665f77a6afb Mon Sep 17 00:00:00 2001 From: konbai <1527468660@qq.com> Date: Wed, 1 Mar 2023 22:30:00 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"fix(=E6=B5=81=E7=A8=8B=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1):=20=E4=BF=AE=E6=94=B9=E6=B5=81=E7=A8=8Bbpmn=E7=9A=84?= =?UTF-8?q?=20targetNamespace=20=E4=B8=BA=E6=B5=81=E7=A8=8B=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E7=BC=96=E5=8F=B7"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit aa401c915d388c5581f6c4421707eb7dd2f1a0dd. --- ruoyi-ui/src/components/ProcessDesigner/index.vue | 1 - ruoyi-ui/src/plugins/package/designer/ProcessDesigner.vue | 3 +-- .../src/plugins/package/designer/plugins/defaultEmpty.js | 8 ++++---- ruoyi-ui/src/views/workflow/model/index.vue | 6 ++---- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/ruoyi-ui/src/components/ProcessDesigner/index.vue b/ruoyi-ui/src/components/ProcessDesigner/index.vue index 3039064b..6375d918 100644 --- a/ruoyi-ui/src/components/ProcessDesigner/index.vue +++ b/ruoyi-ui/src/components/ProcessDesigner/index.vue @@ -56,7 +56,6 @@ export default { controlForm: { processId: this.designerForm.processKey || '', processName: this.designerForm.processName || '', - namespace: this.designerForm.category || '', simulation: false, labelEditing: false, labelVisible: false, diff --git a/ruoyi-ui/src/plugins/package/designer/ProcessDesigner.vue b/ruoyi-ui/src/plugins/package/designer/ProcessDesigner.vue index b23c9ccc..31309bd9 100644 --- a/ruoyi-ui/src/plugins/package/designer/ProcessDesigner.vue +++ b/ruoyi-ui/src/plugins/package/designer/ProcessDesigner.vue @@ -116,7 +116,6 @@ export default { value: String, // xml 字符串 processId: String, processName: String, - namespace: String, translations: Object, // 自定义的翻译文件 additionalModel: [Object, Array], // 自定义model moddleExtension: Object, // 自定义moddle @@ -308,7 +307,7 @@ export default { // 将字符串转换成图显示出来 let newId = this.processId || `Process_${new Date().getTime()}`; let newName = this.processName || `业务流程_${new Date().getTime()}`; - let xmlString = xml || DefaultEmptyXML(newId, newName, this.namespace); + let xmlString = xml || DefaultEmptyXML(newId, newName, this.prefix); try { let { warnings } = await this.bpmnModeler.importXML(xmlString); if (warnings && warnings.length) { diff --git a/ruoyi-ui/src/plugins/package/designer/plugins/defaultEmpty.js b/ruoyi-ui/src/plugins/package/designer/plugins/defaultEmpty.js index c9e5f40e..9ec1df12 100644 --- a/ruoyi-ui/src/plugins/package/designer/plugins/defaultEmpty.js +++ b/ruoyi-ui/src/plugins/package/designer/plugins/defaultEmpty.js @@ -1,5 +1,5 @@ -export default (key, name, namespace) => { - if (!namespace) namespace = TYPE_TARGET['flowable']; +export default (key, name, type) => { + if (!type) type = "camunda"; const TYPE_TARGET = { activiti: "http://activiti.org/bpmn", camunda: "http://bpmn.io/schema/bpmn", @@ -7,7 +7,7 @@ export default (key, name, namespace) => { }; return ` - { xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="diagram_${key}" - targetNamespace="${namespace}"> + targetNamespace="${TYPE_TARGET[type]}"> diff --git a/ruoyi-ui/src/views/workflow/model/index.vue b/ruoyi-ui/src/views/workflow/model/index.vue index 1d7b2b85..7a6c5788 100644 --- a/ruoyi-ui/src/views/workflow/model/index.vue +++ b/ruoyi-ui/src/views/workflow/model/index.vue @@ -338,8 +338,7 @@ export default { modelId: null, form: { processName: null, - processKey: null, - namespace: null + processKey: null } }, designerModelId: null, @@ -540,8 +539,7 @@ export default { this.designerData.modelId = row.modelId; this.designerData.form = { processName: row.modelName, - processKey: row.modelKey, - category: row.category + processKey: row.modelKey } if (row.modelId) { this.designerData.loading = true;