admin-vben5/apps/web-antd/src/views/workflow/components/flow-designer.vue

30 lines
788 B
Vue
Raw Normal View History

2024-12-11 21:33:59 +08:00
<script setup lang="ts">
import { useRoute } from 'vue-router';
2024-12-17 08:09:47 +08:00
import { useAppConfig } from '@vben/hooks';
2024-12-11 21:33:59 +08:00
import { stringify } from '@vben/request';
import { useAccessStore } from '@vben/stores';
defineOptions({ name: 'FlowDesigner' });
const route = useRoute();
const definitionId = route.query.definitionId as string;
const disabled = route.query.disabled === 'true';
2024-12-17 08:09:47 +08:00
const { clientId } = useAppConfig(import.meta.env, import.meta.env.PROD);
2024-12-11 21:33:59 +08:00
const accessStore = useAccessStore();
const params = {
Authorization: `Bearer ${accessStore.accessToken}`,
id: definitionId,
2024-12-17 08:09:47 +08:00
clientId,
2024-12-11 21:33:59 +08:00
disabled,
};
const url = `${import.meta.env.VITE_GLOB_API_URL}/warm-flow-ui/index.html?${stringify(params)}`;
</script>
<template>
<iframe :src="url" class="size-full"></iframe>
</template>