From 9c63bdceabbcb39b52a639c8326e93a4157694dd Mon Sep 17 00:00:00 2001 From: wenyann Date: Fri, 25 Jun 2021 11:28:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E5=92=8C=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E9=80=89=E6=8B=A9?= =?UTF-8?q?100=E6=9D=A1/=E9=A1=B5=E6=98=BE=E7=A4=BA=EF=BC=8C=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E9=9D=9E=E5=B8=B8=E5=8D=A1=E9=A1=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/domain/TestPlanTestCase.java | 6 +- .../base/domain/TestPlanTestCaseExample.java | 60 +++++++++ .../base/mapper/TestPlanTestCaseMapper.xml | 123 ++++++++++-------- .../mapper/ext/ExtTestPlanTestCaseMapper.java | 3 +- .../mapper/ext/ExtTestPlanTestCaseMapper.xml | 11 +- .../metersphere/job/sechedule/IssuesJob.java | 39 ++++++ .../track/dto/TestPlanCaseDTO.java | 1 + .../track/service/IssuesService.java | 5 +- .../service/TestPlanTestCaseService.java | 13 +- .../db/migration/V89__v1.10.4_release.sql | 16 ++- .../src/main/resources/generatorConfig.xml | 4 +- .../functional/FunctionalTestCaseList.vue | 16 +-- 12 files changed, 217 insertions(+), 80 deletions(-) create mode 100644 backend/src/main/java/io/metersphere/job/sechedule/IssuesJob.java diff --git a/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCase.java b/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCase.java index cfe4a317d9..b9b9863758 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCase.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCase.java @@ -1,9 +1,9 @@ package io.metersphere.base.domain; -import lombok.Data; - import java.io.Serializable; +import lombok.Data; + @Data public class TestPlanTestCase implements Serializable { private String id; @@ -26,5 +26,7 @@ public class TestPlanTestCase implements Serializable { private String createUser; + private Integer issuesCount; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCaseExample.java b/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCaseExample.java index 33e26b16ce..3498cecb28 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCaseExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCaseExample.java @@ -783,6 +783,66 @@ public class TestPlanTestCaseExample { addCriterion("create_user not between", value1, value2, "createUser"); return (Criteria) this; } + + public Criteria andIssuesCountIsNull() { + addCriterion("issues_count is null"); + return (Criteria) this; + } + + public Criteria andIssuesCountIsNotNull() { + addCriterion("issues_count is not null"); + return (Criteria) this; + } + + public Criteria andIssuesCountEqualTo(Integer value) { + addCriterion("issues_count =", value, "issuesCount"); + return (Criteria) this; + } + + public Criteria andIssuesCountNotEqualTo(Integer value) { + addCriterion("issues_count <>", value, "issuesCount"); + return (Criteria) this; + } + + public Criteria andIssuesCountGreaterThan(Integer value) { + addCriterion("issues_count >", value, "issuesCount"); + return (Criteria) this; + } + + public Criteria andIssuesCountGreaterThanOrEqualTo(Integer value) { + addCriterion("issues_count >=", value, "issuesCount"); + return (Criteria) this; + } + + public Criteria andIssuesCountLessThan(Integer value) { + addCriterion("issues_count <", value, "issuesCount"); + return (Criteria) this; + } + + public Criteria andIssuesCountLessThanOrEqualTo(Integer value) { + addCriterion("issues_count <=", value, "issuesCount"); + return (Criteria) this; + } + + public Criteria andIssuesCountIn(List values) { + addCriterion("issues_count in", values, "issuesCount"); + return (Criteria) this; + } + + public Criteria andIssuesCountNotIn(List values) { + addCriterion("issues_count not in", values, "issuesCount"); + return (Criteria) this; + } + + public Criteria andIssuesCountBetween(Integer value1, Integer value2) { + addCriterion("issues_count between", value1, value2, "issuesCount"); + return (Criteria) this; + } + + public Criteria andIssuesCountNotBetween(Integer value1, Integer value2) { + addCriterion("issues_count not between", value1, value2, "issuesCount"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestPlanTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestPlanTestCaseMapper.xml index 29978648a0..69278c7749 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/TestPlanTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/TestPlanTestCaseMapper.xml @@ -12,6 +12,7 @@ + @@ -78,7 +79,7 @@ id, plan_id, case_id, executor, `status`, remark, create_time, update_time, report_id, - create_user + create_user, issues_count results, issues, actual_result @@ -132,16 +133,16 @@ - insert into test_plan_test_case (id, plan_id, case_id, - executor, `status`, remark, - create_time, update_time, report_id, - create_user, results, issues, - actual_result) - values (#{id,jdbcType=VARCHAR}, #{planId,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR}, - #{executor,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, - #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{reportId,jdbcType=VARCHAR}, - #{createUser,jdbcType=VARCHAR}, #{results,jdbcType=LONGVARCHAR}, #{issues,jdbcType=LONGVARCHAR}, - #{actualResult,jdbcType=LONGVARCHAR}) + insert into test_plan_test_case (id, plan_id, case_id, + executor, `status`, remark, + create_time, update_time, report_id, + create_user, issues_count, results, + issues, actual_result) + values (#{id,jdbcType=VARCHAR}, #{planId,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR}, + #{executor,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, + #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{reportId,jdbcType=VARCHAR}, + #{createUser,jdbcType=VARCHAR}, #{issuesCount,jdbcType=INTEGER}, #{results,jdbcType=LONGVARCHAR}, + #{issues,jdbcType=LONGVARCHAR}, #{actualResult,jdbcType=LONGVARCHAR}) insert into test_plan_test_case @@ -176,6 +177,9 @@ create_user, + + issues_count, + results, @@ -217,6 +221,9 @@ #{createUser,jdbcType=VARCHAR}, + + #{issuesCount,jdbcType=INTEGER}, + #{results,jdbcType=LONGVARCHAR}, @@ -267,6 +274,9 @@ create_user = #{record.createUser,jdbcType=VARCHAR}, + + issues_count = #{record.issuesCount,jdbcType=INTEGER}, + results = #{record.results,jdbcType=LONGVARCHAR}, @@ -284,18 +294,19 @@ update test_plan_test_case set id = #{record.id,jdbcType=VARCHAR}, - plan_id = #{record.planId,jdbcType=VARCHAR}, - case_id = #{record.caseId,jdbcType=VARCHAR}, - executor = #{record.executor,jdbcType=VARCHAR}, - `status` = #{record.status,jdbcType=VARCHAR}, - remark = #{record.remark,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=BIGINT}, - update_time = #{record.updateTime,jdbcType=BIGINT}, - report_id = #{record.reportId,jdbcType=VARCHAR}, - create_user = #{record.createUser,jdbcType=VARCHAR}, - results = #{record.results,jdbcType=LONGVARCHAR}, - issues = #{record.issues,jdbcType=LONGVARCHAR}, - actual_result = #{record.actualResult,jdbcType=LONGVARCHAR} + plan_id = #{record.planId,jdbcType=VARCHAR}, + case_id = #{record.caseId,jdbcType=VARCHAR}, + executor = #{record.executor,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + remark = #{record.remark,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + report_id = #{record.reportId,jdbcType=VARCHAR}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + issues_count = #{record.issuesCount,jdbcType=INTEGER}, + results = #{record.results,jdbcType=LONGVARCHAR}, + issues = #{record.issues,jdbcType=LONGVARCHAR}, + actual_result = #{record.actualResult,jdbcType=LONGVARCHAR} @@ -303,15 +314,16 @@ update test_plan_test_case set id = #{record.id,jdbcType=VARCHAR}, - plan_id = #{record.planId,jdbcType=VARCHAR}, - case_id = #{record.caseId,jdbcType=VARCHAR}, - executor = #{record.executor,jdbcType=VARCHAR}, - `status` = #{record.status,jdbcType=VARCHAR}, - remark = #{record.remark,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=BIGINT}, - update_time = #{record.updateTime,jdbcType=BIGINT}, - report_id = #{record.reportId,jdbcType=VARCHAR}, - create_user = #{record.createUser,jdbcType=VARCHAR} + plan_id = #{record.planId,jdbcType=VARCHAR}, + case_id = #{record.caseId,jdbcType=VARCHAR}, + executor = #{record.executor,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + remark = #{record.remark,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + report_id = #{record.reportId,jdbcType=VARCHAR}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + issues_count = #{record.issuesCount,jdbcType=INTEGER} @@ -346,6 +358,9 @@ create_user = #{createUser,jdbcType=VARCHAR}, + + issues_count = #{issuesCount,jdbcType=INTEGER}, + results = #{results,jdbcType=LONGVARCHAR}, @@ -360,31 +375,33 @@ update test_plan_test_case - set plan_id = #{planId,jdbcType=VARCHAR}, - case_id = #{caseId,jdbcType=VARCHAR}, - executor = #{executor,jdbcType=VARCHAR}, - `status` = #{status,jdbcType=VARCHAR}, - remark = #{remark,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=BIGINT}, - update_time = #{updateTime,jdbcType=BIGINT}, - report_id = #{reportId,jdbcType=VARCHAR}, - create_user = #{createUser,jdbcType=VARCHAR}, - results = #{results,jdbcType=LONGVARCHAR}, - issues = #{issues,jdbcType=LONGVARCHAR}, - actual_result = #{actualResult,jdbcType=LONGVARCHAR} + set plan_id = #{planId,jdbcType=VARCHAR}, + case_id = #{caseId,jdbcType=VARCHAR}, + executor = #{executor,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + remark = #{remark,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + report_id = #{reportId,jdbcType=VARCHAR}, + create_user = #{createUser,jdbcType=VARCHAR}, + issues_count = #{issuesCount,jdbcType=INTEGER}, + results = #{results,jdbcType=LONGVARCHAR}, + issues = #{issues,jdbcType=LONGVARCHAR}, + actual_result = #{actualResult,jdbcType=LONGVARCHAR} where id = #{id,jdbcType=VARCHAR} update test_plan_test_case - set plan_id = #{planId,jdbcType=VARCHAR}, - case_id = #{caseId,jdbcType=VARCHAR}, - executor = #{executor,jdbcType=VARCHAR}, - `status` = #{status,jdbcType=VARCHAR}, - remark = #{remark,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=BIGINT}, - update_time = #{updateTime,jdbcType=BIGINT}, - report_id = #{reportId,jdbcType=VARCHAR}, - create_user = #{createUser,jdbcType=VARCHAR} + set plan_id = #{planId,jdbcType=VARCHAR}, + case_id = #{caseId,jdbcType=VARCHAR}, + executor = #{executor,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + remark = #{remark,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + report_id = #{reportId,jdbcType=VARCHAR}, + create_user = #{createUser,jdbcType=VARCHAR}, + issues_count = #{issuesCount,jdbcType=INTEGER} where id = #{id,jdbcType=VARCHAR} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java index cc5301c246..75e826ec33 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java @@ -11,7 +11,6 @@ import org.apache.ibatis.annotations.Param; import java.util.List; public interface ExtTestPlanTestCaseMapper { - List getReportMetric(@Param("planId") String planId); List getExecutors(@Param("planId") String planId); @@ -56,4 +55,6 @@ public interface ExtTestPlanTestCaseMapper { List selectIds(@Param("request") TestPlanFuncCaseConditions conditions); List selectIdsByQuery(@Param("request") BaseQueryRequest query); + + void update(@Param("count") int count, @Param("id") String id, @Param("caseId") String caseId, @Param("issues") String issues); } diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml index 72ab407931..09dddaa0df 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml @@ -230,7 +230,7 @@ test_case.custom_num) as customNum, test_plan_test_case.executor, test_plan_test_case.status, test_plan_test_case.actual_result, test_plan_test_case.update_time, test_plan_test_case.create_time,test_case_node.name as model, project.name as - projectName, + projectName,test_plan_test_case.issues as issues,test_plan_test_case.issues_count as issuesCount, test_plan_test_case.plan_id as planId from test_plan_test_case inner join test_case on test_plan_test_case.case_id = test_case.id @@ -475,6 +475,15 @@ #{id} + + update test_plan_test_case + + issues_count=#{count}, + issues = #{issues} + + + where plan_id=#{id,jdbcType=VARCHAR} and case_id=#{caseId,jdbcType=VARCHAR} + delete diff --git a/backend/src/main/java/io/metersphere/job/sechedule/IssuesJob.java b/backend/src/main/java/io/metersphere/job/sechedule/IssuesJob.java new file mode 100644 index 0000000000..bf2c52cd67 --- /dev/null +++ b/backend/src/main/java/io/metersphere/job/sechedule/IssuesJob.java @@ -0,0 +1,39 @@ +package io.metersphere.job.sechedule; + +import com.fit2cloud.quartz.anno.QuartzScheduled; +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import io.metersphere.base.domain.IssuesDao; +import io.metersphere.base.domain.TestPlanTestCase; +import io.metersphere.base.domain.TestPlanTestCaseWithBLOBs; +import io.metersphere.track.service.IssuesService; +import io.metersphere.track.service.TestPlanTestCaseService; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.util.List; + +@Component +public class IssuesJob { + @Resource + private IssuesService issuesService; + @Resource + private TestPlanTestCaseService testPlanTestCaseService; + + @QuartzScheduled(fixedDelay = 3600 * 1000) + //@Scheduled(fixedDelay = 3600 * 1000) + public void IssuesCount() { + int pageSize = 20; + int pages = 1; + for (int i = 0; i < pages; i++) { + Page> page = PageHelper.startPage(i, pageSize, true); + pages = page.getPages(); + List list = testPlanTestCaseService.listAll(); + list.forEach(l -> { + List issues = issuesService.getIssues(l.getCaseId()); + int issuesCount = issues.size(); + testPlanTestCaseService.updateIssues(issuesCount, l.getPlanId(), l.getCaseId(), issues.toString()); + }); + } + } +} diff --git a/backend/src/main/java/io/metersphere/track/dto/TestPlanCaseDTO.java b/backend/src/main/java/io/metersphere/track/dto/TestPlanCaseDTO.java index b925babbcf..e08968d79d 100644 --- a/backend/src/main/java/io/metersphere/track/dto/TestPlanCaseDTO.java +++ b/backend/src/main/java/io/metersphere/track/dto/TestPlanCaseDTO.java @@ -22,6 +22,7 @@ public class TestPlanCaseDTO extends TestCaseWithBLOBs { private String projectName; private String actualResult; private String maintainerName; + private int issuesCount; private List list; } diff --git a/backend/src/main/java/io/metersphere/track/service/IssuesService.java b/backend/src/main/java/io/metersphere/track/service/IssuesService.java index 9bd26a3d23..52960b630d 100644 --- a/backend/src/main/java/io/metersphere/track/service/IssuesService.java +++ b/backend/src/main/java/io/metersphere/track/service/IssuesService.java @@ -181,8 +181,9 @@ public class IssuesService { } public List getPlatforms(Project project) { - SessionUser user = SessionUtils.getUser(); - String orgId = user.getLastOrganizationId(); + String workspaceId = project.getWorkspaceId(); + Workspace workspace = workspaceMapper.selectByPrimaryKey(workspaceId); + String orgId = workspace.getOrganizationId(); boolean tapd = isIntegratedPlatform(orgId, IssuesManagePlatform.Tapd.toString()); boolean jira = isIntegratedPlatform(orgId, IssuesManagePlatform.Jira.toString()); boolean zentao = isIntegratedPlatform(orgId, IssuesManagePlatform.Zentao.toString()); diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanTestCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanTestCaseService.java index 5628e00ffe..e30372f386 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanTestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanTestCaseService.java @@ -66,6 +66,16 @@ public class TestPlanTestCaseService { @Resource private TestCaseCommentService testCaseCommentService; + public List listAll() { + TestPlanTestCaseExample example = new TestPlanTestCaseExample(); + example.createCriteria(); + return testPlanTestCaseMapper.selectByExampleWithBLOBs(example); + } + + public void updateIssues(int issuesCount, String id, String caseId, String issues) { + extTestPlanTestCaseMapper.update(issuesCount, id, caseId, issues); + } + public List list(QueryTestPlanCaseRequest request) { request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders())); List list = extTestPlanTestCaseMapper.list(request); @@ -216,6 +226,7 @@ public class TestPlanTestCaseService { /** * 更新测试计划关联接口测试的功能用例的状态 + * * @param testId 接口测试id */ public void updateTestCaseStates(String testId, String testName, String planId, String testType) { @@ -318,7 +329,7 @@ public class TestPlanTestCaseService { if (planTestCaseWithBLOBs != null) { TestCase testCase = testCaseMapper.selectByPrimaryKey(planTestCaseWithBLOBs.getCaseId()); TestPlan testPlan = testPlanMapper.selectByPrimaryKey(planTestCaseWithBLOBs.getPlanId()); - OperatingLogDetails details = new OperatingLogDetails(JSON.toJSONString(id), testCase.getProjectId(), testCase.getName(), planTestCaseWithBLOBs.getCreateUser(), new LinkedList<>()); + OperatingLogDetails details = new OperatingLogDetails(JSON.toJSONString(id), testCase.getProjectId(), testCase.getName(), planTestCaseWithBLOBs.getCreateUser(), new LinkedList<>()); return JSON.toJSONString(details); } return null; diff --git a/backend/src/main/resources/db/migration/V89__v1.10.4_release.sql b/backend/src/main/resources/db/migration/V89__v1.10.4_release.sql index 32812b5d53..6bcad5d869 100644 --- a/backend/src/main/resources/db/migration/V89__v1.10.4_release.sql +++ b/backend/src/main/resources/db/migration/V89__v1.10.4_release.sql @@ -1,9 +1,17 @@ -- 添加版本号 -ALTER TABLE api_scenario ADD version INT(10) DEFAULT 0 NULL COMMENT '版本号'; +ALTER TABLE api_scenario + ADD version INT(10) DEFAULT 0 NULL COMMENT '版本号'; -ALTER TABLE load_test ADD scenario_version INT(10) DEFAULT 0 NULL COMMENT '关联的接口自动化版本号'; +ALTER TABLE load_test + ADD scenario_version INT(10) DEFAULT 0 NULL COMMENT '关联的接口自动化版本号'; -ALTER TABLE load_test ADD scenario_id varchar(255) NULL COMMENT '关联的场景自动化ID'; +ALTER TABLE load_test + ADD scenario_id varchar(255) NULL COMMENT '关联的场景自动化ID'; +-- 测试计划用例列表添加缺陷数 + +alter table test_plan_test_case + add issues_count int(10) DEFAULT 0 null; -- 对接Jira等平台认证信息 -ALTER TABLE `user` ADD platform_info LONGTEXT NULL COMMENT ' 其他平台对接信息'; +ALTER TABLE `user` + ADD platform_info LONGTEXT NULL COMMENT ' 其他平台对接信息'; diff --git a/backend/src/main/resources/generatorConfig.xml b/backend/src/main/resources/generatorConfig.xml index 03907a864c..136fd72d2c 100644 --- a/backend/src/main/resources/generatorConfig.xml +++ b/backend/src/main/resources/generatorConfig.xml @@ -64,8 +64,8 @@ - diff --git a/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue b/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue index 920849dc65..f3199ce6d7 100644 --- a/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue @@ -464,20 +464,8 @@ export default { this.tableData[i].customFields = JSON.parse(this.tableData[i].customFields); } this.$set(this.tableData[i], "showTags", JSON.parse(this.tableData[i].tags)); - this.$set(this.tableData[i], "issuesSize", 0); - 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: '获取缺陷失败' - }]); - }); + this.$set(this.tableData[i], "issuesSize", this.tableData[i].issuesCount); + this.$set(this.tableData[i], "issuesContent", JSON.parse(this.tableData[i].issues)); } } this.$refs.table.clear();