增加流程图的预览界面

This commit is contained in:
YunaiV
2022-01-03 02:41:24 +08:00
parent 38221a3e2e
commit 7bc36a09fb
6 changed files with 161 additions and 7 deletions

View File

@ -0,0 +1,41 @@
<template>
<div class="app-container">
<!-- 流程设计器负责绘制流程等 -->
<my-process-viewer key="designer" v-model="xmlString" v-bind="controlForm" keyboard ref="processDesigner" />
</div>
</template>
<script>
import {getModel} from "@/api/bpm/model";
export default {
name: "App",
components: { },
data() {
return {
xmlString: "", // BPMN XML
controlForm: {
prefix: "activiti"
},
};
},
created() {
// 如果 modelId 非空,说明是修改流程模型
const modelId = this.$route.query && this.$route.query.modelId
if (modelId) {
getModel(modelId).then(response => {
this.xmlString = response.data.bpmnXml
})
}
}
};
</script>
<style lang="scss">
.my-process-designer {
height: calc(100vh - 84px);
}
</style>