fix(测试计划): 查询缺陷失败时捕获异常

This commit is contained in:
shiziyuan9527 2020-12-29 15:18:42 +08:00
parent 88a633237f
commit 213a7db8fd
1 changed files with 4 additions and 2 deletions

View File

@ -364,12 +364,14 @@ export default {
for (let i = 0; i < this.tableData.length; i++) {
if (this.tableData[i]) {
this.$set(this.tableData[i], "issuesSize", 0);
this.$get("/issues/get/" + this.tableData[i].caseId, response => {
let issues = response.data;
this.$get("/issues/get/" + this.tableData[i].caseId).then(response => {
let issues = response.data.data;
if (this.tableData[i]) {
this.$set(this.tableData[i], "issuesSize", issues.length);
this.$set(this.tableData[i], "issuesContent", issues);
}
}).catch(() => {
this.$set(this.tableData[i], "issuesContent", [{title: '获取缺陷失败',description: '获取缺陷失败',platform: '获取缺陷失败' }]);
})
}
}