|
|
|
@ -333,11 +333,11 @@
|
|
|
|
|
* Storage interface |
|
|
|
|
*/ |
|
|
|
|
_save (sourceType) { |
|
|
|
|
if(this._verifConditions()) { |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
this.spinnerLoading = true |
|
|
|
|
// Storage store |
|
|
|
|
Dag.saveStore().then(res => { |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
this.spinnerLoading = true |
|
|
|
|
// Storage store |
|
|
|
|
Dag.saveStore().then(res => { |
|
|
|
|
if(this._verifConditions(res.tasks)) { |
|
|
|
|
if (this.urlParam.id) { |
|
|
|
|
/** |
|
|
|
|
* Edit |
|
|
|
@ -371,12 +371,12 @@
|
|
|
|
|
reject(e) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
_verifConditions () { |
|
|
|
|
let tasks = this.$store.state.dag.tasks |
|
|
|
|
_verifConditions (value) { |
|
|
|
|
let tasks = value |
|
|
|
|
let bool = true |
|
|
|
|
tasks.map(v=>{ |
|
|
|
|
if(v.type == 'CONDITIONS' && (v.conditionResult.successNode[0] =='' || v.conditionResult.successNode[0] == null || v.conditionResult.failedNode[0] =='' || v.conditionResult.failedNode[0] == null)) { |
|
|
|
@ -386,6 +386,7 @@
|
|
|
|
|
}) |
|
|
|
|
if(!bool) { |
|
|
|
|
this.$message.warning(`${i18n.$t('Successful branch flow and failed branch flow are required')}`) |
|
|
|
|
this.spinnerLoading = false |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
return true |
|
|
|
|