chore: lazy load workflow run detail
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { WorkflowRunListItem } from '#/api/ai-platform/ai-platform';
|
import type { WorkflowRunListItem } from '#/api/ai-platform/ai-platform';
|
||||||
|
|
||||||
import { ref } from 'vue';
|
import { defineAsyncComponent, ref } from 'vue';
|
||||||
|
|
||||||
import { Page } from '@vben/common-ui/es/page';
|
import { Page } from '@vben/common-ui/es/page';
|
||||||
import { Eye } from '@vben/icons';
|
import { Eye } from '@vben/icons';
|
||||||
@@ -23,7 +23,10 @@ import {
|
|||||||
useSearchFormSchema,
|
useSearchFormSchema,
|
||||||
useZqTableColumns,
|
useZqTableColumns,
|
||||||
} from './data';
|
} from './data';
|
||||||
import DetailDialog from './modules/detail-dialog.vue';
|
|
||||||
|
const DetailDialog = defineAsyncComponent(
|
||||||
|
() => import('./modules/detail-dialog.vue'),
|
||||||
|
);
|
||||||
|
|
||||||
defineOptions({ name: 'WorkflowRunHistory' });
|
defineOptions({ name: 'WorkflowRunHistory' });
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import type { Edge, Node } from '@vue-flow/core';
|
|||||||
|
|
||||||
import type { WorkflowRun } from '#/api/ai-platform/ai-platform';
|
import type { WorkflowRun } from '#/api/ai-platform/ai-platform';
|
||||||
|
|
||||||
import { computed, ref } from 'vue';
|
import { computed, defineAsyncComponent, ref } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
import { ExternalLink } from '@vben/icons';
|
import { ExternalLink } from '@vben/icons';
|
||||||
@@ -19,7 +19,6 @@ import { useAppContextStore } from '#/store/app-context';
|
|||||||
import { definitionToFlowElements } from '../../workflow/shared/loadDefinition';
|
import { definitionToFlowElements } from '../../workflow/shared/loadDefinition';
|
||||||
import { applyRunReplay } from '../../workflow/shared/useRunReplay';
|
import { applyRunReplay } from '../../workflow/shared/useRunReplay';
|
||||||
import RunStatusTag from '../components/RunStatusTag.vue';
|
import RunStatusTag from '../components/RunStatusTag.vue';
|
||||||
import WorkflowReadonlyCanvas from '../components/WorkflowReadonlyCanvas.vue';
|
|
||||||
import {
|
import {
|
||||||
formatDuration,
|
formatDuration,
|
||||||
formatTime,
|
formatTime,
|
||||||
@@ -28,6 +27,10 @@ import {
|
|||||||
getTriggerOptions,
|
getTriggerOptions,
|
||||||
} from '../data';
|
} from '../data';
|
||||||
|
|
||||||
|
const WorkflowReadonlyCanvas = defineAsyncComponent(
|
||||||
|
() => import('../components/WorkflowReadonlyCanvas.vue'),
|
||||||
|
);
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const appContextStore = useAppContextStore();
|
const appContextStore = useAppContextStore();
|
||||||
const triggerOptions = getTriggerOptions();
|
const triggerOptions = getTriggerOptions();
|
||||||
|
|||||||
Reference in New Issue
Block a user