fix(测试跟踪): 创建用例,模块树数量未更新

--bug=1025561 --user=陈建星 【测试跟踪】创建用例-模块树数量未更新 https://www.tapd.cn/55049933/s/1363903
This commit is contained in:
chenjianxing 2023-04-18 18:14:54 +08:00 committed by jianxing
parent a198c8cb09
commit 4fabc826c9
1 changed files with 19 additions and 1 deletions

View File

@ -832,9 +832,27 @@ export default {
item.nodePath = nodePath.replaceAll("/未规划用例", "/" + this.$t('api_test.unplanned_case')); item.nodePath = nodePath.replaceAll("/未规划用例", "/" + this.$t('api_test.unplanned_case'));
} }
}); });
this.updateTestCaseNodeCount();
}); });
this.$emit("getTrashList"); 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() { search() {