fix -- 修改流程设计页面为全屏弹窗(保存流程后刷新流程列表)

This commit is contained in:
konbai
2022-05-06 01:02:03 +08:00
parent 2cbb6669f9
commit 4d3f6652b7
4 changed files with 182 additions and 86 deletions

View File

@@ -4,7 +4,7 @@
<slot name="control-header"></slot>
<template v-if="!$slots['control-header']">
<el-button-group key="file-control">
<el-button :size="headerButtonSize" :type="headerButtonType" icon="el-icon-edit-outline" @click="onSave">保存流程</el-button>
<!-- <el-button :size="headerButtonSize" :type="headerButtonType" icon="el-icon-edit-outline" @click="onSave">保存流程</el-button>-->
<el-button :size="headerButtonSize" :type="headerButtonType" icon="el-icon-folder-opened" @click="$refs.refFile.click()">打开文件</el-button>
<el-tooltip effect="light">
<div slot="content">
@@ -249,10 +249,15 @@ export default {
},
methods: {
onSave () {
if (this.bpmnModeler == null) return;
this.bpmnModeler.saveXML({ format: true }).then(({ xml }) => {
this.$emit('save', xml);
});
return new Promise((resolve, reject) => {
if (this.bpmnModeler == null) {
reject();
}
this.bpmnModeler.saveXML({ format: true }).then(({ xml }) => {
this.$emit('save', xml);
resolve(xml);
});
})
},
initBpmnModeler() {
if (this.bpmnModeler) return;