From 3073b94c714019ca5641076baa67acd2d9b17569 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Fri, 18 Nov 2022 11:07:06 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):?= =?UTF-8?q?=20=E4=BC=98=E5=8C=96=E9=A6=96=E9=A1=B5=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E5=8F=8A=E5=B1=95=E7=A4=BA=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frontend/src/i18n/lang/track/en-US.js | 12 +- .../track/dto/request/IssuesRequest.java | 16 +- .../base/mapper/ext/ExtIssuesMapper.java | 2 + .../base/mapper/ext/ExtIssuesMapper.xml | 13 +- .../io/metersphere/constants/IssueStatus.java | 42 +++ .../controller/IssuesController.java | 4 +- .../controller/TrackController.java | 4 - .../io/metersphere/dto/BugStatistics.java | 2 + .../metersphere/dto/TrackStatisticsDTO.java | 75 +++--- .../io/metersphere/service/IssuesService.java | 24 +- .../io/metersphere/service/TrackService.java | 105 +++++--- .../resources/i18n/commons_en_US.properties | 10 + .../resources/i18n/commons_zh_CN.properties | 10 + .../resources/i18n/commons_zh_TW.properties | 10 + .../src/business/constants/table-constants.js | 5 + .../frontend/src/business/home/TrackHome.vue | 24 +- .../business/home/components/BugCountCard.vue | 114 +++++---- .../home/components/CaseCountCard.vue | 173 ++++++------- .../home/components/CaseMaintenance.vue | 49 ++-- .../home/components/FailureTestCaseList.vue | 6 +- .../home/components/RelevanceCaseCard.vue | 111 ++++---- .../business/home/components/ReviewList.vue | 45 +++- .../home/components/RunningTaskList.vue | 6 +- .../home/components/card/HoverCard.vue | 2 +- .../home/components/chart/BugCountChart.vue | 222 ---------------- .../home/components/chart/CaseCountChart.vue | 242 ------------------ .../home/components/chart/CountChart.vue | 228 +++++++++++++++++ .../components/chart/RelevanceCountChart.vue | 224 ---------------- .../frontend/src/business/issue/IssueList.vue | 6 +- test-track/frontend/src/i18n/lang/en-US.js | 16 +- 30 files changed, 771 insertions(+), 1031 deletions(-) create mode 100644 test-track/backend/src/main/java/io/metersphere/constants/IssueStatus.java delete mode 100644 test-track/frontend/src/business/home/components/chart/BugCountChart.vue delete mode 100644 test-track/frontend/src/business/home/components/chart/CaseCountChart.vue create mode 100644 test-track/frontend/src/business/home/components/chart/CountChart.vue delete mode 100644 test-track/frontend/src/business/home/components/chart/RelevanceCountChart.vue diff --git a/framework/sdk-parent/frontend/src/i18n/lang/track/en-US.js b/framework/sdk-parent/frontend/src/i18n/lang/track/en-US.js index 365a2dde55..18d5195c5f 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/track/en-US.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/track/en-US.js @@ -351,15 +351,15 @@ export default { test_rate: "Test Rate", tested_case: "Tested Case", review_progress: "Review Progress", - case_count: "Statistics of the number of use cases", - relevance_case: "Related Case", - case_maintenance: "Use case person responsible distribution", - bug_count: "Statistics of test plan remaining defects", + case_count: "Statistics of cases", + relevance_case: "Statistics of related cases", + case_maintenance: "Statistics of case maintenance", + bug_count: "Statistics of test plan unclosed bugs", case_review: "Use case review", review_rate: "Reviewed", coverage: "Coverage", - function_case_count: "Functional Case Count", - relevance_case_count: "Related Case Count", + function_case_count: "Functional Case", + relevance_case_count: "Related Case", serial_number: "Index", test_plan_name: "Plan Name", case_size: "Case Count", diff --git a/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/request/IssuesRequest.java b/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/request/IssuesRequest.java index fe38bc800a..cf087cf58a 100644 --- a/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/request/IssuesRequest.java +++ b/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/request/IssuesRequest.java @@ -66,11 +66,19 @@ public class IssuesRequest extends BaseQueryRequest { private List exportIds; /** - * 本周遗留缺陷 + * 本周测试计划遗留缺陷 */ - private Boolean thisWeekUnClosedIssue = false; + private Boolean thisWeekUnClosedTestPlanIssue = false; /** - * 本周遗留缺陷ID + * 测试计划遗留的缺陷 */ - private List thisWeekUncloseIds; + private Boolean unClosedTestPlanIssue = false; + /** + * 测试计划关联所有缺陷 + */ + private Boolean allTestPlanIssue = false; + /** + * 过滤缺陷ID + */ + private List filterIds; } diff --git a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.java b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.java index ce524b9248..11851c3db1 100644 --- a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.java +++ b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.java @@ -48,4 +48,6 @@ public interface ExtIssuesMapper { Long getThisWeekIssueCount(@Param("ids") List ids, @Param("projectId") String projectId); List getTestPlanThisWeekIssue(String projectId); + + List getTestPlanIssue(String projectId); } diff --git a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml index 11c21c638e..d6162ef489 100644 --- a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml +++ b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml @@ -179,6 +179,15 @@ and tp.project_id = #{projectId} + +