Browse Source

[Fix] [UI-Next] [V1.0.0-Alpha] Fix the resource options in task node display incorrect after creating a new file. (#9269)

3.0.0/version-upgrade
Amy0104 3 years ago committed by GitHub
parent
commit
4ad1764932
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      dolphinscheduler-ui-next/src/store/project/task-node.ts
  2. 4
      dolphinscheduler-ui-next/src/views/projects/task/components/node/detail.tsx

7
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 = {}
}
}
})

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

Loading…
Cancel
Save