fix(测试跟踪): 修复关联用例重复问题

This commit is contained in:
fit2-zhao 2020-11-25 17:24:30 +08:00
parent 45a7a05c14
commit 2b4f8266fb
2 changed files with 19 additions and 0 deletions

View File

@ -215,6 +215,16 @@
item.checked = false; item.checked = false;
}); });
flag ? this.testCases = tableData : this.testCases = this.testCases.concat(tableData); flag ? this.testCases = tableData : this.testCases = this.testCases.concat(tableData);
//
let hash = {}
this.testCases = this.testCases.reduce((item, next) => {
if (!hash[next.id]) {
hash[next.id] = true
item.push(next)
}
return item
}, [])
this.lineStatus = tableData.length === 50 && this.testCases.length < this.total; this.lineStatus = tableData.length === 50 && this.testCases.length < this.total;
}); });
} }

View File

@ -219,6 +219,15 @@
item.checked = false; item.checked = false;
}); });
flag ? this.testReviews = tableData : this.testReviews = this.testReviews.concat(tableData); flag ? this.testReviews = tableData : this.testReviews = this.testReviews.concat(tableData);
//
let hash = {}
this.testReviews = this.testReviews.reduce((item, next) => {
if (!hash[next.id]) {
hash[next.id] = true
item.push(next)
}
return item
}, [])
this.lineStatus = tableData.length === 50 && this.testReviews.length < this.total; this.lineStatus = tableData.length === 50 && this.testReviews.length < this.total;
}); });