fix switch node cannot get branch flow (#6565)
This commit is contained in:
parent
986f81381d
commit
257b76cccf
|
|
@ -383,6 +383,7 @@
|
|||
@on-switch-result="_onSwitchResult"
|
||||
:backfill-item="backfillItem"
|
||||
:nodeData="nodeData"
|
||||
:postTasks="postTasks"
|
||||
></m-switch>
|
||||
<!-- waterdrop node -->
|
||||
<m-waterdrop
|
||||
|
|
@ -517,7 +518,7 @@
|
|||
label: `${i18n.$t('Failed')}`
|
||||
}
|
||||
],
|
||||
// for CONDITIONS
|
||||
// for CONDITIONS and SWITCH
|
||||
postTasks: [],
|
||||
prevTasks: [],
|
||||
// refresh part of the formModel, after set backfillItem outside
|
||||
|
|
@ -550,6 +551,7 @@
|
|||
return {
|
||||
code: task.code,
|
||||
conditionResult: task.taskParams.conditionResult,
|
||||
switchResult: task.taskParams.switchResult,
|
||||
delayTime: task.delayTime,
|
||||
dependence: task.taskParams.dependence,
|
||||
desc: task.description,
|
||||
|
|
@ -559,7 +561,8 @@
|
|||
params: _.omit(task.taskParams, [
|
||||
'conditionResult',
|
||||
'dependence',
|
||||
'waitStartTimeout'
|
||||
'waitStartTimeout',
|
||||
'switchResult'
|
||||
]),
|
||||
retryInterval: task.failRetryInterval,
|
||||
runFlag: task.flag,
|
||||
|
|
@ -770,7 +773,8 @@
|
|||
...this.params,
|
||||
dependence: this.cacheDependence,
|
||||
conditionResult: this.conditionResult,
|
||||
waitStartTimeout: this.waitStartTimeout
|
||||
waitStartTimeout: this.waitStartTimeout,
|
||||
switchResult: this.switchResult
|
||||
},
|
||||
flag: this.runFlag,
|
||||
taskPriority: this.taskInstancePriority,
|
||||
|
|
@ -868,6 +872,9 @@
|
|||
this.successBranch = o.conditionResult.successNode[0]
|
||||
this.failedBranch = o.conditionResult.failedNode[0]
|
||||
}
|
||||
if (o.switchResult) {
|
||||
this.switchResult = o.switchResult
|
||||
}
|
||||
// If the workergroup has been deleted, set the default workergroup
|
||||
for (
|
||||
let i = 0;
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@
|
|||
</textarea>
|
||||
</label>
|
||||
<span class="text-b" style="padding-left: 0">{{$t('Branch flow')}}</span>
|
||||
<el-select style="width: 157px;" size="small" v-model="el.nextNode" clearable>
|
||||
<el-option v-for="item in nodeData.rearList" :key="item.value" :value="item.value" :label="item.label"></el-option>
|
||||
<el-select style="width: 157px;" size="small" v-model="el.nextNode" clearable :disabled="isDetails">
|
||||
<el-option v-for="item in postTasks" :key="item.code" :value="item.name" :label="item.name"></el-option>
|
||||
</el-select>
|
||||
<span class="operation">
|
||||
<a href="javascript:" class="delete" @click="!isDetails && _removeDep(index)" v-if="index === (dependItemList.length - 1)">
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
<div slot="text">{{$t('Branch flow')}}</div>
|
||||
<div slot="content">
|
||||
<el-select style="width: 157px;" size="small" v-model="nextNode" clearable :disabled="isDetails">
|
||||
<el-option v-for="item in nodeData.rearList" :key="item.value" :value="item.value" :label="item.label"></el-option>
|
||||
<el-option v-for="item in postTasks" :key="item.code" :value="item.name" :label="item.name"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</m-list-box>
|
||||
|
|
@ -82,7 +82,7 @@
|
|||
props: {
|
||||
nodeData: Object,
|
||||
backfillItem: Object,
|
||||
rearList: Array
|
||||
postTasks: Array
|
||||
},
|
||||
methods: {
|
||||
editList (index) {
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
const self = this
|
||||
const editor = codemirror(`code-switch-mirror${index}`, {
|
||||
mode: 'shell',
|
||||
readOnly: this.isInstance
|
||||
readOnly: this.isDetails
|
||||
}, this)
|
||||
editor.on('change', function () {
|
||||
const outputList = _.cloneDeep(self.dependItemList)
|
||||
|
|
|
|||
Loading…
Reference in New Issue