diff --git a/frontend/src/business/components/track/case/TestCase.vue b/frontend/src/business/components/track/case/TestCase.vue index 73d326d0b7..d3d9335f58 100644 --- a/frontend/src/business/components/track/case/TestCase.vue +++ b/frontend/src/business/components/track/case/TestCase.vue @@ -371,7 +371,24 @@ export default { openMinderConfirm(this, activeDom); }, changeConfirm(isSave, temWorkspaceId) { - saveMinderConfirm(this, isSave); + if (isSave) { + this.$refs.minder.save(() => { + // 保存成功之后再切换tab + this.activeDom = this.tmpActiveDom; + this.tmpActiveDom = null; + }); + } + + this.$store.commit('setIsTestCaseMinderChanged', false); + this.$nextTick(() => { + if (this.tmpPath) { + this.$router.push({ + path: this.tmpPath + }); + this.tmpPath = null; + } + }); + if (temWorkspaceId) { // 如果是切换工作空间提示的保存,则保存完后跳转到对应的工作空间 this.$EventBus.$emit('changeWs', temWorkspaceId); diff --git a/frontend/src/business/components/track/common/minder/TestCaseMinder.vue b/frontend/src/business/components/track/common/minder/TestCaseMinder.vue index 474fe4f621..0e7f2cb093 100644 --- a/frontend/src/business/components/track/common/minder/TestCaseMinder.vue +++ b/frontend/src/business/components/track/common/minder/TestCaseMinder.vue @@ -207,7 +207,7 @@ name: "TestCaseMinder", setIsChange(isChanged) { this.$store.commit('setIsTestCaseMinderChanged', isChanged); }, - save() { + save(callback) { this.saveCases = []; this.saveModules = []; this.deleteNodes = []; // 包含测试模块、用例和临时节点 @@ -242,6 +242,9 @@ name: "TestCaseMinder", this.extraNodeChanged = []; this.$emit('refresh'); this.setIsChange(false); + if (callback) { + callback(); + } }); },