diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index 50317f51a6..f7e2e5a80d 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -1772,6 +1772,9 @@ export default { if(obj){ if(obj.hashTree){ for (let i = 0; i < obj.hashTree.length; i++) { + if(!obj.hashTree[i].index){ + obj.hashTree[i].index = i+1; + } obj.hashTree[i].disabled = true; if (!obj.hashTree[i].requestResult) { obj.hashTree[i].requestResult = [{responseResult: {}}]; @@ -1784,7 +1787,7 @@ export default { this.newOnSampleError = obj.onSampleError; } } - + this.dataProcessing(obj.hashTree); this.newScenarioDefinition = obj.hashTree; for (let i = 0; i < this.oldScenarioDefinition.length; i++) { this.oldScenarioDefinition[i].disabled = true; @@ -1802,8 +1805,9 @@ export default { this.oldData = this.currentScenario; this.newData = res.data; this.closeExpansion() - this.dialogVisible = true; } + this.sort(); + this.dialogVisible = true; }); }) },