Browse Source

[Fix-10539] [Bug] [UI] Copy task a to B, change the user-defined para… (#10611)

* fixed 10539: [Bug] [ui]Copy task a to B, change the user-defined parameters of Task B, and change the parameters of task a

* fixed 10539: [Bug] [ui]Copy task a to B, change the user-defined parameters of Task B, and change the parameters of task a

* feat: reactor code

* feat: remove console.info

* fixed: reactor deepclone

* feat: code style
3.1.0-release
pinkhello 2 years ago committed by GitHub
parent
commit
b8de9ee752
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      dolphinscheduler-ui/src/views/projects/workflow/components/dag/use-task-edit.ts

5
dolphinscheduler-ui/src/views/projects/workflow/components/dag/use-task-edit.ts

@ -16,7 +16,7 @@
*/ */
import { ref, onMounted, watch } from 'vue' import { ref, onMounted, watch } from 'vue'
import { remove } from 'lodash' import { remove, cloneDeep } from 'lodash'
import { TaskType } from '@/views/projects/task/constants/task-type' import { TaskType } from '@/views/projects/task/constants/task-type'
import { formatParams } from '@/views/projects/task/components/node/format-data' import { formatParams } from '@/views/projects/task/components/node/format-data'
import { useCellUpdate } from './dag-hooks' import { useCellUpdate } from './dag-hooks'
@ -29,6 +29,7 @@ import type {
EditWorkflowDefinition EditWorkflowDefinition
} from './types' } from './types'
interface Options { interface Options {
graph: Ref<Graph | undefined> graph: Ref<Graph | undefined>
definition: Ref<WorkflowDefinition | undefined> definition: Ref<WorkflowDefinition | undefined>
@ -96,7 +97,7 @@ export function useTaskEdit(options: Options) {
) )
const newDefinition = { const newDefinition = {
...definition, ...cloneDeep(definition),
code, code,
name name
} as NodeData } as NodeData

Loading…
Cancel
Save