Skip to content

Commit

Permalink
fix(测试跟踪): 脑图保存后,模块树没有刷新
Browse files Browse the repository at this point in the history
--bug=1024965 --user=陈建星 【测试跟踪】脑图模式-复制模块a到模块b下-保存-脑图未显示复制模块数据 https://www.tapd.cn/55049933/s/1358195
  • Loading branch information
AgAngle committed Mar 31, 2023
1 parent 6cfb83e commit bd4b101
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ name: "TestCaseMinder",
tags: [this.$t('api_test.definition.request.case'), this.$t('test_track.case.prerequisite'), this.$t('commons.remark'), this.$t('test_track.module.module')],
result: {loading: false},
needRefresh: false,
noRefresh: false,
noRefreshMinder: false,
noRefreshMinderForSelectNode: false,
saveCases: [],
Expand Down Expand Up @@ -163,7 +162,6 @@ name: "TestCaseMinder",
this.noRefreshMinder = false;
return;
}
this.noRefresh = true;
// 如果脑图没有修改直接刷新,有修改提示
if (!this.$store.state.isTestCaseMinderChanged) {
if (this.$refs.minder) {
Expand Down Expand Up @@ -304,18 +302,22 @@ name: "TestCaseMinder",
item.isExtraNode = false;
});
this.extraNodeChanged = [];
if (!this.noRefresh) {
this.$emit('refresh');
this.$emit('refresh');
if (!this.noRefreshMinder) {
// 保存会刷新模块,刷新完模块,脑图也会自动刷新
// 如果是保存触发的刷新模块,则不刷新脑图
this.noRefreshMinder = true;
}
if (!this.noRefreshMinderForSelectNode) {
if (this.selectNode && this.selectNode.data) {
// 如果有选中的模块, 则不刷新 watch -> selectNode
this.noRefreshMinderForSelectNode = true;
}
}
// 由于模块修改刷新的脑图,不刷新模块
this.noRefresh = false;
this.setIsChange(false);
if (callback && callback instanceof Function) {
callback();
Expand Down

0 comments on commit bd4b101

Please sign in to comment.