Files
ipms-sjy/yudao-admin-ui/src/views/bpm/model/modelViewer.vue
2022-01-03 02:41:24 +08:00

42 lines
827 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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