Revert "fix(流程设计): 修改流程bpmn的 targetNamespace 为流程分类编号"

This reverts commit aa401c915d.
This commit is contained in:
konbai
2023-03-01 22:30:00 +08:00
parent a50fdd3bda
commit a3d3f962a3
4 changed files with 7 additions and 11 deletions

View File

@@ -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,

View File

@@ -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) {

View File

@@ -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 `
<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions
<bpmn2:definitions
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
@@ -15,7 +15,7 @@ export default (key, name, namespace) => {
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]}">
<bpmn2:process id="${key}" name="${name}" isExecutable="true">
</bpmn2:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">

View File

@@ -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;