Browse Source

[Fix-13160][UI] Ironed out the issue with failing to save the correct settings of dependent tasks. (#13179)

3.1.3-release
calvin 2 years ago committed by zhuangchong
parent
commit
dc0d46f1aa
  1. 10
      dolphinscheduler-ui/src/views/projects/task/components/node/format-data.ts
  2. 3
      dolphinscheduler-ui/src/views/projects/task/components/node/types.ts

10
dolphinscheduler-ui/src/views/projects/task/components/node/format-data.ts

@ -22,7 +22,9 @@ import type {
ITaskParams, ITaskParams,
ISqoopTargetParams, ISqoopTargetParams,
ISqoopSourceParams, ISqoopSourceParams,
ILocalParam ILocalParam,
IDependTask,
RelationType
} from './types' } from './types'
export function formatParams(data: INodeData): { export function formatParams(data: INodeData): {
@ -584,9 +586,11 @@ export function formatModel(data: ITaskData) {
} }
if (data.taskParams?.dependence) { if (data.taskParams?.dependence) {
params.dependTaskList = data.taskParams?.dependence.dependTaskList || [] const dependence: { relation?: RelationType, dependTaskList?: IDependTask[] } = JSON.parse(JSON.stringify(data.taskParams.dependence))
params.relation = data.taskParams?.dependence.relation params.dependTaskList = dependence.dependTaskList || []
params.relation = dependence.relation
} }
if (data.taskParams?.ruleInputParameter) { if (data.taskParams?.ruleInputParameter) {
params.check_type = data.taskParams.ruleInputParameter.check_type params.check_type = data.taskParams.ruleInputParameter.check_type
params.comparison_execute_sql = params.comparison_execute_sql =

3
dolphinscheduler-ui/src/views/projects/task/components/node/types.ts

@ -36,9 +36,10 @@ export type {
export type { IResource, ProgramType, IMainJar } from '@/store/project/types' export type { IResource, ProgramType, IMainJar } from '@/store/project/types'
export type { ITaskState } from '@/common/types' export type { ITaskState } from '@/common/types'
export type RelationType = 'AND' | 'OR'
type SourceType = 'MYSQL' | 'HDFS' | 'HIVE' type SourceType = 'MYSQL' | 'HDFS' | 'HIVE'
type ModelType = 'import' | 'export' type ModelType = 'import' | 'export'
type RelationType = 'AND' | 'OR'
type ITaskType = TaskType type ITaskType = TaskType
type IDateType = 'hour' | 'day' | 'week' | 'month' type IDateType = 'hour' | 'day' | 'week' | 'month'

Loading…
Cancel
Save