diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
index ceeed1303c..2995da1466 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
@@ -193,7 +193,7 @@
@@ -230,7 +230,7 @@
@@ -694,8 +694,7 @@
return false
}
if (
- this.successBranch !== '' &&
- this.successBranch !== null &&
+ this.successBranch &&
this.successBranch === this.failedBranch
) {
this.$message.warning(
@@ -754,8 +753,8 @@
if (this.$refs.preTasks) {
this.$refs.preTasks.setPreNodes()
}
- this.conditionResult.successNode[0] = this.successBranch
- this.conditionResult.failedNode[0] = this.failedBranch
+ this.successBranch && (this.conditionResult.successNode[0] = this.successBranch)
+ this.failedBranch && (this.conditionResult.failedNode[0] = this.failedBranch)
this.$emit('addTaskInfo', {
item: {
code: this.nodeData.id,
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/dependItemList.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/dependItemList.vue
index 82822ab03d..883b13a678 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/dependItemList.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/dependItemList.vue
@@ -23,8 +23,8 @@
_onChangeDefinitionCode(v, $index)" size="small">
-
-
+
+
_onChangeCycle(v, $index)" size="small">
@@ -55,6 +55,13 @@
import _ from 'lodash'
import { cycleList, dateValueList } from './commcon'
import disabledState from '@/module/mixin/disabledState'
+
+ // Depend on all tasks
+ const DEP_ALL_TASK = {
+ code: 0,
+ name: 'ALL'
+ }
+
export default {
name: 'dep-list',
data () {
@@ -87,7 +94,7 @@
let projectCode = this.projectList[0].value
this._getProcessByProjectCode(projectCode).then(definitionList => {
if (!definitionList || definitionList.length === 0) {
- this.$emit('dependItemListEvent', _.concat(this.dependItemList, this._rtNewParams('', [], ['ALL'], projectCode)))
+ this.$emit('dependItemListEvent', _.concat(this.dependItemList, this._rtNewParams('', [], [_.cloneDeep(DEP_ALL_TASK)], projectCode)))
return
}
// dependItemList index
@@ -148,7 +155,12 @@
return new Promise((resolve, reject) => {
if (is) {
this.store.dispatch('dag/getProcessTasksList', { code: codes }).then(res => {
- resolve(['ALL'].concat(_.map(res, v => v.name)))
+ resolve([{ ...DEP_ALL_TASK }].concat(_.map(res, v => {
+ return {
+ code: v.code,
+ name: v.name
+ }
+ })))
})
} else {
this.store.dispatch('dag/getTaskListDefIdAll', { codes: codes }).then(res => {
@@ -163,11 +175,11 @@
_onChangeProjectCode (value, itemIndex) {
this._getProcessByProjectCode(value).then(definitionList => {
if (!definitionList || definitionList.length === 0) {
- this.$set(this.dependItemList, itemIndex, this._cpOldParams(value, '', [], ['ALL'], {
+ this.$set(this.dependItemList, itemIndex, this._cpOldParams(value, '', [], [_.cloneDeep(DEP_ALL_TASK)], {
cycle: 'day',
dateValue: 'today',
state: '',
- depTasks: 'ALL'
+ depTaskCode: DEP_ALL_TASK.code
}))
return
}
@@ -175,8 +187,8 @@
let definitionCode = definitionList[0].value
this._getDependItemList(definitionCode).then(depTasksList => {
let item = this.dependItemList[itemIndex]
- // init set depTasks All
- item.depTasks = 'ALL'
+ // init set depTaskCode All
+ item.depTaskCode = DEP_ALL_TASK.code
// set dependItemList item data
this.$set(this.dependItemList, itemIndex, this._cpOldParams(value, definitionCode, definitionList, depTasksList, item))
})
@@ -186,8 +198,8 @@
// get depItem list data
this._getDependItemList(value).then(depTasksList => {
let item = this.dependItemList[itemIndex]
- // init set depTasks All
- item.depTasks = 'ALL'
+ // init set depTaskCode All
+ item.depTaskCode = DEP_ALL_TASK.code
// set dependItemList item data
this.$set(this.dependItemList, itemIndex, this._rtOldParams(value, item.definitionList, depTasksList, item))
})
@@ -203,7 +215,7 @@
definitionCode: value,
// dependItem need private definitionList
definitionList: definitionList,
- depTasks: 'ALL',
+ depTaskCode: DEP_ALL_TASK.code,
depTasksList: depTasksList,
cycle: 'day',
dateValue: 'today',
@@ -217,7 +229,7 @@
definitionCode: value,
// dependItem need private definitionList
definitionList: definitionList,
- depTasks: item.depTasks || 'ALL',
+ depTaskCode: item.depTaskCode || DEP_ALL_TASK.code,
depTasksList: depTasksList,
cycle: item.cycle,
dateValue: item.dateValue,
@@ -231,7 +243,7 @@
projectCode: value,
definitionList: definitionList,
definitionCode: definitionCode,
- depTasks: item.depTasks || 'ALL',
+ depTaskCode: item.depTaskCode || DEP_ALL_TASK.code,
depTasksList: depTasksList,
cycle: item.cycle,
dateValue: item.dateValue,
@@ -262,10 +274,10 @@
if (definitionList && definitionList.length > 0) {
let definitionCode = definitionList[0].value
this._getDependItemList(definitionCode).then(depTasksList => {
- this.$emit('dependItemListEvent', _.concat(this.dependItemList, this._rtNewParams(definitionCode, definitionList, depTasksList || ['ALL'], projectCode)))
+ this.$emit('dependItemListEvent', _.concat(this.dependItemList, this._rtNewParams(definitionCode, definitionList, depTasksList || [_.cloneDeep(DEP_ALL_TASK)], projectCode)))
})
} else {
- this.$emit('dependItemListEvent', _.concat(this.dependItemList, this._rtNewParams('', [], ['ALL'], projectCode)))
+ this.$emit('dependItemListEvent', _.concat(this.dependItemList, this._rtNewParams('', [], [_.cloneDeep(DEP_ALL_TASK)], projectCode)))
}
})
} else {
@@ -275,7 +287,7 @@
this._getDependItemList(codes, false).then(res => {
_.map(this.dependItemList, (v, i) => {
this._getProcessByProjectCode(v.projectCode).then(definitionList => {
- this.$set(this.dependItemList, i, this._rtOldParams(v.definitionCode, definitionList, ['ALL'].concat(_.map(res[v.definitionCode] || [], v => v.name)), v))
+ this.$set(this.dependItemList, i, this._rtOldParams(v.definitionCode, definitionList, [_.cloneDeep(DEP_ALL_TASK)].concat(_.map(res[v.definitionCode] || [], v => ({ code: v.code, name: v.name }))), v))
})
})
})
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/nodeStatus.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/nodeStatus.vue
index 7ff4acfcb0..3e2889b89a 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/nodeStatus.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/nodeStatus.vue
@@ -17,8 +17,8 @@
-
-
+ { el.depTaskCode = val }" :disabled="isDetails">
+
@@ -134,13 +134,13 @@
},
_rtNewParams () {
return {
- depTasks: '',
+ depTaskCode: 0,
status: ''
}
},
_rtOldParams (value, depTasksList, item) {
return {
- depTasks: '',
+ depTaskCode: 0,
status: ''
}
},
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/conditions.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/conditions.vue
index 62970c6447..3399d72b8d 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/conditions.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/conditions.vue
@@ -147,7 +147,7 @@
// Process instance return status display matches by key
_.map(this.dependTaskList, v => _.map(v.dependItemList, v1 => {
$(`#${o.id}`).siblings().each(function () {
- if (v1.depTasks === $(this).text()) {
+ if (v1.depTaskCode === $(this).text()) {
v1.state = $(this).attr('data-dependent-depstate')
}
})
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/dependent.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/dependent.vue
index 7a6ca024fd..b69568b3f4 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/dependent.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/dependent.vue
@@ -148,7 +148,7 @@
let defaultState = this.isDetails ? 'WAITING' : ''
// Process instance return status display matches by key
_.map(this.dependTaskList, v => _.map(v.dependItemList, v1 => {
- v1.state = dependentResult[`${v1.definitionId}-${v1.depTasks}-${v1.cycle}-${v1.dateValue}`] || defaultState
+ v1.state = dependentResult[`${v1.definitionId}-${v1.depTaskCode}-${v1.cycle}-${v1.dateValue}`] || defaultState
}))
}
},
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/switch.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/switch.vue
index d003405e7b..5e2e90dccd 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/switch.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/switch.vue
@@ -35,7 +35,7 @@
{{$t('Branch flow')}}
-
+
@@ -53,7 +53,7 @@
{{$t('Branch flow')}}
-
+