fix(测试跟踪): 创建用例,模块树数量未更新
--bug=1025561 --user=陈建星 【测试跟踪】创建用例-模块树数量未更新 https://www.tapd.cn/55049933/s/1363903
This commit is contained in:
parent
a198c8cb09
commit
4fabc826c9
|
@ -832,9 +832,27 @@ export default {
|
|||
item.nodePath = nodePath.replaceAll("/未规划用例", "/" + this.$t('api_test.unplanned_case'));
|
||||
}
|
||||
});
|
||||
this.updateTestCaseNodeCount();
|
||||
});
|
||||
this.$emit("getTrashList");
|
||||
this.$emit("getPublicList");
|
||||
this.$emit("getPublicList")
|
||||
}
|
||||
},
|
||||
// 如果在其他tab页创建用例,会导致模块数量显示和列表不一致,这里重新更新下模块的用例数
|
||||
updateTestCaseNodeCount() {
|
||||
if (this.selectNode && this.treeNodes && this.selectNode.data
|
||||
&& this.selectNode.data.caseNum !== this.page.total) {
|
||||
|
||||
let updateCount = this.page.total - this.selectNode.data.caseNum;
|
||||
let node = this.selectNode;
|
||||
this.selectNode.data.caseNum = this.page.total;
|
||||
while (node) {
|
||||
node = node.parent;
|
||||
if (node && node.data) {
|
||||
node.data.caseNum += updateCount;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
search() {
|
||||
|
|
Loading…
Reference in New Issue