diff --git a/test-ui/src/views/test/uiTest/automationTest.vue b/test-ui/src/views/test/uiTest/automationTest.vue index fb5e428..2257a11 100644 --- a/test-ui/src/views/test/uiTest/automationTest.vue +++ b/test-ui/src/views/test/uiTest/automationTest.vue @@ -163,7 +163,6 @@ export default { } }).catch(err => { loading.close(); - this.$modal.msgError("执行失败"); }); }, // 分页 diff --git a/test-ui/src/views/test/uiTest/editScene.vue b/test-ui/src/views/test/uiTest/editScene.vue index f7cad9b..383f07a 100644 --- a/test-ui/src/views/test/uiTest/editScene.vue +++ b/test-ui/src/views/test/uiTest/editScene.vue @@ -150,6 +150,31 @@ export default { deleteStep(index) { this.$modal.confirm('确认删除该步骤' + '?').then(() => { this.informationForm.uiSceneStepsVOList.splice(index, 1); + + // 如果删除后没有步骤了,清空右侧面板 + if (this.informationForm.uiSceneStepsVOList.length === 0) { + this.defaultActive = 0; + this.changeStep = { operateType: null }; + return; + } + + // 如果删除的是当前选中的步骤 + if (this.defaultActive - 1 === index) { + // 如果有下一个步骤,选择下一个 + if (index < this.informationForm.uiSceneStepsVOList.length) { + this.defaultActive = index + 1; + this.changeStep = this.informationForm.uiSceneStepsVOList[index]; + } + // 如果有上一个步骤,选择上一个 + else if (index > 0) { + this.defaultActive = index; + this.changeStep = this.informationForm.uiSceneStepsVOList[index - 1]; + } + } + // 如果删除的步骤在当前选中步骤之前,需要更新defaultActive + else if (this.defaultActive - 1 > index) { + this.defaultActive--; + } }).catch(() => { }) }, // 场景步骤