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: { controlForm: {
processId: this.designerForm.processKey || '', processId: this.designerForm.processKey || '',
processName: this.designerForm.processName || '', processName: this.designerForm.processName || '',
namespace: this.designerForm.category || '',
simulation: false, simulation: false,
labelEditing: false, labelEditing: false,
labelVisible: false, labelVisible: false,

View File

@@ -116,7 +116,6 @@ export default {
value: String, // xml 字符串 value: String, // xml 字符串
processId: String, processId: String,
processName: String, processName: String,
namespace: String,
translations: Object, // 自定义的翻译文件 translations: Object, // 自定义的翻译文件
additionalModel: [Object, Array], // 自定义model additionalModel: [Object, Array], // 自定义model
moddleExtension: Object, // 自定义moddle moddleExtension: Object, // 自定义moddle
@@ -308,7 +307,7 @@ export default {
// 将字符串转换成图显示出来 // 将字符串转换成图显示出来
let newId = this.processId || `Process_${new Date().getTime()}`; let newId = this.processId || `Process_${new Date().getTime()}`;
let newName = this.processName || `业务流程_${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 { try {
let { warnings } = await this.bpmnModeler.importXML(xmlString); let { warnings } = await this.bpmnModeler.importXML(xmlString);
if (warnings && warnings.length) { if (warnings && warnings.length) {

View File

@@ -1,5 +1,5 @@
export default (key, name, namespace) => { export default (key, name, type) => {
if (!namespace) namespace = TYPE_TARGET['flowable']; if (!type) type = "camunda";
const TYPE_TARGET = { const TYPE_TARGET = {
activiti: "http://activiti.org/bpmn", activiti: "http://activiti.org/bpmn",
camunda: "http://bpmn.io/schema/bpmn", camunda: "http://bpmn.io/schema/bpmn",
@@ -15,7 +15,7 @@ export default (key, name, namespace) => {
xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"
id="diagram_${key}" id="diagram_${key}"
targetNamespace="${namespace}"> targetNamespace="${TYPE_TARGET[type]}">
<bpmn2:process id="${key}" name="${name}" isExecutable="true"> <bpmn2:process id="${key}" name="${name}" isExecutable="true">
</bpmn2:process> </bpmn2:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNDiagram id="BPMNDiagram_1">

View File

@@ -338,8 +338,7 @@ export default {
modelId: null, modelId: null,
form: { form: {
processName: null, processName: null,
processKey: null, processKey: null
namespace: null
} }
}, },
designerModelId: null, designerModelId: null,
@@ -540,8 +539,7 @@ export default {
this.designerData.modelId = row.modelId; this.designerData.modelId = row.modelId;
this.designerData.form = { this.designerData.form = {
processName: row.modelName, processName: row.modelName,
processKey: row.modelKey, processKey: row.modelKey
category: row.category
} }
if (row.modelId) { if (row.modelId) {
this.designerData.loading = true; this.designerData.loading = true;