From 325a8d0a6e55b33189685f5e8cdbc960d8d86994 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 28 May 2022 23:23:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81=E7=9A=84=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=97=A0=E6=B3=95=E6=92=A4=E5=9B=9E=E3=80=81crtl=20?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../package/designer/ProcessDesigner.vue | 8 ++------ .../src/views/bpm/model/modelEditor.vue | 19 ++----------------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue b/yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue index be28f850d..215f3aaf0 100644 --- a/yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue +++ b/yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue @@ -118,6 +118,7 @@ export default { componentName: "MyProcessDesigner", props: { value: String, // xml 字符串 + valueWatch: true, // xml 字符串的 watch 状态 processId: String, // 流程 key 标识 processName: String, // 流程 name 名字 formId: Number, // 流程 form 表单编号 @@ -252,11 +253,6 @@ export default { this.bpmnModeler = null; }); }, - watch: { - value: function (newValue) { // 在 xmlString 发生变化时,重新创建,从而绘制流程图 - this.createNewDiagram(newValue); - } - }, methods: { initBpmnModeler() { if (this.bpmnModeler) return; @@ -307,7 +303,7 @@ export default { let newName = this.processName || `业务流程_${new Date().getTime()}`; let xmlString = xml || DefaultEmptyXML(newId, newName, this.prefix); try { - console.log(this.bpmnModeler.importXML); + // console.log(this.bpmnModeler.importXML); let { warnings } = await this.bpmnModeler.importXML(xmlString); if (warnings && warnings.length) { warnings.forEach(warn => console.warn(warn)); diff --git a/yudao-ui-admin/src/views/bpm/model/modelEditor.vue b/yudao-ui-admin/src/views/bpm/model/modelEditor.vue index 19413d040..91be300a7 100644 --- a/yudao-ui-admin/src/views/bpm/model/modelEditor.vue +++ b/yudao-ui-admin/src/views/bpm/model/modelEditor.vue @@ -2,7 +2,7 @@
- @@ -30,7 +30,7 @@ export default { components: { MyProcessPalette }, data() { return { - xmlString: "", // BPMN XML + xmlString: undefined, // BPMN XML modeler: null, reloadIndex: 0, controlDrawerVisible: false, @@ -72,21 +72,6 @@ export default { console.log(modeler); }, 10); }, - reloadProcessDesigner(deep) { - this.controlForm.additionalModel = []; - for (let key in this.addis) { - if (this.addis[key]) { - this.controlForm.additionalModel.push(this.addis[key]); - } - } - deep && (this.xmlString = undefined); - this.reloadIndex += 1; - this.modeler = null; // 避免 panel 异常 - // if (deep) { - // this.xmlString = undefined; - // this.$refs.processDesigner.processRestart(); - // } - }, save(bpmnXml) { const data = { ...this.model,