diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index c9d0d3ae1f..f10cab28b7 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -184,11 +184,13 @@ + @node-drag-end="nodeDragEnd" @node-click="nodeClick" draggable ref="stepTree" + :key="reloadTree"> @@ -1552,6 +1554,12 @@ export default { environmentConfigClose() { this.getEnvironments(); }, + allowDrag(node) { + if (node.data && node.data.disabled && node.parent.data && node.parent.data.disabled) { + return false; + } + return true; + }, allowDrop(draggingNode, dropNode, dropType) { if (draggingNode.data.type === 'Assertions' || dropNode.data.type === 'Assertions') { return false; @@ -1566,12 +1574,13 @@ export default { } return false; } else if (dropType === "inner" && dropNode.data.referenced !== 'REF' && dropNode.data.referenced !== 'Deleted' + && !dropNode.data.disabled && (this.stepFilter.get(dropNode.data.type) && this.stepFilter.get(dropNode.data.type).indexOf(draggingNode.data.type) != -1)) { return true; } return false; }, - allowDrag(draggingNode, dropNode, dropType) { + nodeDragEnd(draggingNode, dropNode, dropType) { if (dropNode && draggingNode && dropType) { this.sort(); this.forceRerender(); diff --git a/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue b/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue index 5eabd31147..eb08188ab7 100644 --- a/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue +++ b/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue @@ -133,6 +133,7 @@ export default { this.isShowNum = this.scenario.num ? true : false; if (this.scenario.id && this.scenario.referenced === 'REF' && !this.scenario.loaded && this.scenario.hashTree) { this.scenario.root = this.node.parent.parent ? false : true; + this.scenario.disabled = true; this.recursive(this.scenario.hashTree, this.scenario.projectId, true); } }, @@ -233,6 +234,7 @@ export default { } } if (this.scenario && this.scenario.hashTree && this.node.expanded) { + this.scenario.disabled = true; this.recursive(this.scenario.hashTree, this.scenario.projectId, false); } this.reload(); 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 36a80b38b1..1c7682ced2 100644 --- a/frontend/src/business/components/api/automation/scenario/component/LoopController.vue +++ b/frontend/src/business/components/api/automation/scenario/component/LoopController.vue @@ -1,23 +1,58 @@