fix(接口测试): 修复场景切换回收站,模块树未更新的缺陷

--bug=1027569 --user=王孝刚 【接口测试】场景回收站切到到场景列表-模块树未更新
https://www.tapd.cn/55049933/s/1393666
This commit is contained in:
wxg0103 2023-07-14 16:06:26 +08:00 committed by fit2-zhao
parent 2f7d2bb2fe
commit 276c3bec58
2 changed files with 9 additions and 5 deletions

View File

@ -320,6 +320,9 @@ export default {
} }
this.$refs.apiScenarioList.search(this.projectId); this.$refs.apiScenarioList.search(this.projectId);
} }
this.$nextTick(() => {
this.$refs.nodeTree.list()
})
} else if (tab.name === 'trash') { } else if (tab.name === 'trash') {
this.trashEnable = true; this.trashEnable = true;
this.$refs.apiTrashScenarioList.search(); this.$refs.apiTrashScenarioList.search();
@ -627,6 +630,9 @@ export default {
if (targetName === 'trash') { if (targetName === 'trash') {
this.selectNodeIds = []; this.selectNodeIds = [];
this.trashEnable = false; this.trashEnable = false;
this.$nextTick(() => {
this.$refs.nodeTree.list()
})
} else { } else {
let message = ''; let message = '';
this.tabs.forEach((tab) => { this.tabs.forEach((tab) => {
@ -711,7 +717,9 @@ export default {
}, },
refreshTree() { refreshTree() {
if (this.$refs.nodeTree) { if (this.$refs.nodeTree) {
this.$refs.nodeTree.list(); this.$nextTick(() => {
this.$refs.nodeTree.list()
})
} }
}, },
refreshAll() { refreshAll() {

View File

@ -159,9 +159,6 @@ export default {
relevanceProjectId() { relevanceProjectId() {
this.list(); this.list();
}, },
isTrashData() {
this.list();
},
}, },
created() { created() {
this.$EventBus.$on('scenarioConditionBus', (param) => { this.$EventBus.$on('scenarioConditionBus', (param) => {
@ -191,7 +188,6 @@ export default {
this.$refs.nodeTree.filter(this.condition.filterText); this.$refs.nodeTree.filter(this.condition.filterText);
}, },
list(projectId) { list(projectId) {
if (this.isRelevanceModel) { if (this.isRelevanceModel) {
this.result = getModuleByRelevanceProjectId(this.relevanceProjectId).then((response) => { this.result = getModuleByRelevanceProjectId(this.relevanceProjectId).then((response) => {
this.setData(response); this.setData(response);