From 90dd1a114761c7110942227bde66f10e475dcfd5 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Wed, 1 Jun 2022 14:58:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E7=94=A8=E4=BE=8B=E5=88=97=E8=A1=A8=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BF=9D=E5=AD=98=E8=84=91=E5=9B=BE=EF=BC=8C=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E5=90=8E=E6=B2=A1=E6=9C=89=E5=88=B7=E6=96=B0=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E6=A0=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1013689 --user=陈建星 【测试跟踪】脑图编辑完成后切换到列表,在弹出保存提示后进行保存,列表模块树没有及时更新 https://www.tapd.cn/55049933/s/1171263 --- .../components/track/case/TestCase.vue | 19 ++++++++++++++++++- .../track/common/minder/TestCaseMinder.vue | 5 ++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/frontend/src/business/components/track/case/TestCase.vue b/frontend/src/business/components/track/case/TestCase.vue index 688ac61c19..b241b964e7 100644 --- a/frontend/src/business/components/track/case/TestCase.vue +++ b/frontend/src/business/components/track/case/TestCase.vue @@ -370,7 +370,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(); + } }); },