54 lines
1.1 KiB
Vue
Raw Normal View History

<template>
<el-dialog title="Flowable工作流在线流程设计器" width="90%" height="100%" v-model="visible" v-if="visible" :before-close="handleClose">
<div class="modeler">
<iframe class="iframe" :src="src"></iframe>
</div>
</el-dialog>
</template>
2023-06-12 20:46:19 +08:00
<script lang="ts">
const baseURL = import.meta.env.VITE_APP_BASE_API;
import { getToken } from '@/utils/auth';
export default {
props: {
modelId: String
},
data() {
return {
visible: false
};
},
computed: {
src() {
return `/static/flowable-modeler/index.html#/editor/${this.modelId}`;
},
apiUrl() {
return baseURL;
},
token() {
return getToken();
}
},
2023-06-13 22:37:23 +08:00
mounted() {
//全局存入当前vue实例
(window as any).this = this;
},
methods: {
2023-06-13 22:37:23 +08:00
async handleClose() {
await this.$modal.confirm('请记得点击左上角保存按钮,确定关闭设计窗口?').finally(() => (this as any).loading = false);
this.visible = false;
// 刷新数据
this.$emit("handleClose")
}
}
};
</script>
<style scoped>
.iframe {
width: 100%;
height: calc(100vh - 120px);
border: 0px;
}
</style>