diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index f27d1609d7..36116c1bff 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit f27d1609d77f7d6c988d37d709466e844d350e17 +Subproject commit 36116c1bff736377e6b8a3b828c5fa9bd8b2f2f8 diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index f88dc00e09..346bbff488 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -520,6 +520,9 @@ recursiveSorting(arr) { for (let i in arr) { arr[i].index = Number(i) + 1; + if (arr[i].type === ELEMENT_TYPE.LoopController && arr[i].hashTree && arr[i].hashTree.length > 1) { + arr[i].countController.proceed = true; + } if (arr[i].hashTree != undefined && arr[i].hashTree.length > 0) { this.recursiveSorting(arr[i].hashTree); } @@ -528,6 +531,10 @@ sort() { for (let i in this.scenarioDefinition) { this.scenarioDefinition[i].index = Number(i) + 1; + if (this.scenarioDefinition[i].type === ELEMENT_TYPE.LoopController && this.scenarioDefinition[i].hashTree + && this.scenarioDefinition[i].hashTree.length > 1) { + this.scenarioDefinition[i].countController.proceed = true; + } if (this.scenarioDefinition[i].hashTree != undefined && this.scenarioDefinition[i].hashTree.length > 0) { this.recursiveSorting(this.scenarioDefinition[i].hashTree); } @@ -588,16 +595,14 @@ } else { this.scenarioDefinition.push(request); } - } - , + }, pushApiOrCase(data, refType, referenced) { data.forEach(item => { this.setApiParameter(item, refType, referenced); }); this.sort(); this.reload(); - } - , + }, getMaintainerOptions() { let workspaceId = localStorage.getItem(WORKSPACE_ID); this.$post('/user/ws/member/tester/list', {workspaceId: workspaceId}, response => { diff --git a/frontend/src/business/components/api/automation/scenario/component/LoopController.vue b/frontend/src/business/components/api/automation/scenario/component/LoopController.vue index 2836fe56ee..ef259521e9 100644 --- a/frontend/src/business/components/api/automation/scenario/component/LoopController.vue +++ b/frontend/src/business/components/api/automation/scenario/component/LoopController.vue @@ -31,7 +31,7 @@ {{$t('loop.proceed')}} > - + @@ -123,6 +123,13 @@ } }, methods: { + switchChange() { + if (this.controller.hashTree && this.controller.hashTree.length > 1) { + this.$warning("当前循环下超过一个请求,不能关闭状态") + this.controller.countController.proceed = true; + return; + } + }, remove() { this.$emit('remove', this.controller, this.node); }, diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index 7d43154a7c..3d96d7c61b 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit 7d43154a7c19732407a8e9ace8a7d1ea13c91f36 +Subproject commit 3d96d7c61bc50f32f18311d23f447663e02d7d44