This is an automated email from the ASF dual-hosted git repository.
xincheng pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new edbf5cd3af front: When you edit a task in the task definition list,
the front task list is displayed (#12819)
edbf5cd3af is described below
commit edbf5cd3afbc64763f640203439a4f1d1423a450
Author: clovelll <[email protected]>
AuthorDate: Mon Jan 29 13:40:21 2024 +0800
front: When you edit a task in the task definition list, the front task
list is displayed (#12819)
Co-authored-by: Rick Cheng <[email protected]>
---
.../src/views/projects/task/definition/use-task.ts | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/dolphinscheduler-ui/src/views/projects/task/definition/use-task.ts
b/dolphinscheduler-ui/src/views/projects/task/definition/use-task.ts
index c0092844cd..d5ac11a33a 100644
--- a/dolphinscheduler-ui/src/views/projects/task/definition/use-task.ts
+++ b/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
}