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;