Browse Source

front: When you edit a task in the task definition list, the front task list is displayed (#12819)

Co-authored-by: Rick Cheng <rickchengx@gmail.com>
3.2.1-prepare
clovelll 11 months ago committed by GitHub
parent
commit
edbf5cd3af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      dolphinscheduler-ui/src/views/projects/task/definition/use-task.ts

10
dolphinscheduler-ui/src/views/projects/task/definition/use-task.ts

@ -25,6 +25,7 @@ import {
} from '@/service/modules/task-definition'
import { formatParams as formatData } from '../components/node/format-data'
import type { ITaskData, INodeData, ISingleSaveReq, IRecord } from './types'
import { Connect } from '../../workflow/components/dag/types'
export function useTask(projectCode: number) {
const initalTask = {
@ -89,7 +90,14 @@ export function useTask(projectCode: number) {
const onEditTask = async (row: IRecord, readonly: boolean) => {
const result = await queryTaskDefinitionByCode(row.taskCode, projectCode)
task.taskData = { ...result, processName: row.processDefinitionCode }
task.taskData = {
...result,
processName: row.processDefinitionCode,
preTasks:
result?.processTaskRelationList?.map(
(item: Connect) => item.preTaskCode
) || []
}
task.taskShow = true
task.taskReadonly = readonly
}

Loading…
Cancel
Save