fix(测试跟踪): 功能用例列表部分操作模块数统计不是筛选后的结果

--bug=1015069 --user=陈建星 【测试跟踪】功能用例-搜索用例后操作用例保存或者移动模块后-右侧还是搜索结果但是左侧模块树显示所有的用例数 https://www.tapd.cn/55049933/s/1205224
This commit is contained in:
chenjianxing 2022-07-20 11:52:44 +08:00 committed by jianxing
parent 8e575df95f
commit b5bb9f7452
2 changed files with 5 additions and 3 deletions

View File

@ -7,6 +7,7 @@
:total='total'
:show-operator="true"
:public-total="publicTotal"
:case-condition="condition"
@refreshTable="refresh"
@setTreeNodes="setTreeNodes"
@exportTestCase="exportTestCase"
@ -671,7 +672,7 @@ export default {
if (this.publicEnable) {
this.$refs.publicNodeTree.list(this.condition);
} else if (!this.trashEnable) {
this.$refs.nodeTree.list(this.condition);
this.$refs.nodeTree.list();
}
},
setTable(data) {

View File

@ -126,6 +126,7 @@ export default {
showOperator: Boolean,
total: Number,
publicTotal: Number,
caseCondition: Object
},
watch: {
treeNodes() {
@ -181,9 +182,9 @@ export default {
this.$emit('enablePublic', this.condition.publicEnable);
this.$emit('toPublic', 'public');
},
list(caseCondition) {
list() {
if (this.projectId) {
this.result = getTestCaseNodesByCaseFilter(this.projectId, caseCondition, data => {
this.result = getTestCaseNodesByCaseFilter(this.projectId, this.caseCondition, data => {
this.treeNodes = data;
this.treeNodes.forEach(node => {
node.name = node.name === '未规划用例' ? this.$t('api_test.unplanned_case') : node.name