fix(测试跟踪): 切换用例列表提示保存脑图,保存后没有刷新模块树

--bug=1013689 --user=陈建星 【测试跟踪】脑图编辑完成后切换到列表,在弹出保存提示后进行保存,列表模块树没有及时更新 https://www.tapd.cn/55049933/s/1171263
This commit is contained in:
chenjianxing 2022-06-01 14:58:02 +08:00 committed by f2c-ci-robot[bot]
parent 233528a4fc
commit 2fc5d24e01
2 changed files with 22 additions and 2 deletions

View File

@ -371,7 +371,24 @@ export default {
openMinderConfirm(this, activeDom); openMinderConfirm(this, activeDom);
}, },
changeConfirm(isSave, temWorkspaceId) { 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) { if (temWorkspaceId) {
// //
this.$EventBus.$emit('changeWs', temWorkspaceId); this.$EventBus.$emit('changeWs', temWorkspaceId);

View File

@ -207,7 +207,7 @@ name: "TestCaseMinder",
setIsChange(isChanged) { setIsChange(isChanged) {
this.$store.commit('setIsTestCaseMinderChanged', isChanged); this.$store.commit('setIsTestCaseMinderChanged', isChanged);
}, },
save() { save(callback) {
this.saveCases = []; this.saveCases = [];
this.saveModules = []; this.saveModules = [];
this.deleteNodes = []; // this.deleteNodes = []; //
@ -242,6 +242,9 @@ name: "TestCaseMinder",
this.extraNodeChanged = []; this.extraNodeChanged = [];
this.$emit('refresh'); this.$emit('refresh');
this.setIsChange(false); this.setIsChange(false);
if (callback) {
callback();
}
}); });
}, },