diff --git a/dolphinscheduler-ui-next/src/store/project/task-node.ts b/dolphinscheduler-ui-next/src/store/project/task-node.ts index 8dca16685..d23204047 100644 --- a/dolphinscheduler-ui-next/src/store/project/task-node.ts +++ b/dolphinscheduler-ui-next/src/store/project/task-node.ts @@ -115,6 +115,13 @@ export const useTaskNodeStore = defineStore({ }, updateMainJar(type: ProgramType, mainJar: IMainJar[]) { this.mainJars[type] = mainJar + }, + init() { + this.preTaskOptions = [] + this.postTaskOptions = [] + this.preTasks = [] + this.resources = [] + this.mainJars = {} } } }) diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/detail.tsx b/dolphinscheduler-ui-next/src/views/projects/task/components/node/detail.tsx index 8cf7bac54..8adc5e6e8 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/detail.tsx +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/detail.tsx @@ -18,6 +18,7 @@ import { defineComponent, ref, watch, inject, Ref, unref } from 'vue' import Form from '@/components/form' import { useTask } from './use-task' +import { useTaskNodeStore } from '@/store/project/task-node' import type { ITaskData, EditWorkflowDefinition } from './types' interface IDetailPanel { @@ -33,6 +34,9 @@ const NodeDetail = defineComponent({ name: 'NodeDetail', emits: ['taskTypeChange'], setup(props, { expose, emit }) { + const taskStore = useTaskNodeStore() + taskStore.init() + const formRef = ref() const detailData: IDetailPanel = inject('data') || { projectCode: 0,