diff --git a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiExecutionInfoService.java b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiExecutionInfoService.java index e37f8e4fe5..f081be9942 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/definition/ApiExecutionInfoService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/definition/ApiExecutionInfoService.java @@ -56,7 +56,7 @@ public class ApiExecutionInfoService { } else { String apiCaseIdInTestPlan = extTestPlanApiCaseMapper.getApiTestCaseIdById(resourceID); if (StringUtils.isNotEmpty(apiCaseIdInTestPlan)) { - apiBasieInfoByCaseId = extApiTestCaseMapper.selectApiBasicInfoByCaseId(resourceID); + apiBasieInfoByCaseId = extApiTestCaseMapper.selectApiBasicInfoByCaseId(apiCaseIdInTestPlan); if (apiBasieInfoByCaseId != null) { this.insertApiCaseExecutionInfo(resourceID, result.getStatus(), result.getTriggerMode(), result.getProjectId(), ExecutionExecuteTypeEnum.TEST_PLAN.name(), apiBasieInfoByCaseId.getVersionId()); } diff --git a/framework/sdk-parent/frontend/src/i18n/lang/en-US.js b/framework/sdk-parent/frontend/src/i18n/lang/en-US.js index dcde992724..26aa738a2c 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/en-US.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/en-US.js @@ -2010,10 +2010,10 @@ const message = { }, table_value: { case_type: { - api: "Api case", - scene: "Scenario case", - load: "Load case", - functional: "Functional case" + api: "Api", + scene: "Scenario", + load: "Load", + functional: "Functional" } } }, 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 18d5195c5f..3589dae64e 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 @@ -302,8 +302,8 @@ export default { un_pass: "UnPass", comment: "Comment", my_review: "My Review", - my_create: "My Create", - reviewed_by_me: "Review By Me", + my_create: "Create", + reviewed_by_me: "Review", creator: "Creator", done: "Commented use cases", result_distribution: "Result Distribution", diff --git a/test-track/backend/src/main/java/io/metersphere/dto/TrackStatisticsDTO.java b/test-track/backend/src/main/java/io/metersphere/dto/TrackStatisticsDTO.java index 408982636f..73a8de0385 100644 --- a/test-track/backend/src/main/java/io/metersphere/dto/TrackStatisticsDTO.java +++ b/test-track/backend/src/main/java/io/metersphere/dto/TrackStatisticsDTO.java @@ -5,6 +5,7 @@ import io.metersphere.i18n.Translator; import io.metersphere.request.testcase.TrackCount; import lombok.Getter; import lombok.Setter; +import org.apache.commons.collections.MapUtils; import org.apache.commons.lang3.StringUtils; import java.util.HashMap; @@ -134,6 +135,13 @@ public class TrackStatisticsDTO { } this.allCaseCountNumber += countResult.getCountNumber(); } + if (MapUtils.isEmpty(chartData)) { + // 空数据展示 + chartData.put(TrackCount.P0, 0); + chartData.put(TrackCount.P1, 0); + chartData.put(TrackCount.P2, 0); + chartData.put(TrackCount.P3, 0); + } this.chartData = chartData; } @@ -181,6 +189,13 @@ public class TrackStatisticsDTO { } this.allRelevanceCaseCount += countResult.getCountNumber(); } + + if (MapUtils.isEmpty(chartData)) { + // 空数据展示 + chartData.put(Translator.get("api_case"), 0); + chartData.put(Translator.get("performance_case"), 0); + chartData.put(Translator.get("scenario_case"), 0); + } this.chartData = chartData; } diff --git a/test-track/backend/src/main/java/io/metersphere/service/TrackService.java b/test-track/backend/src/main/java/io/metersphere/service/TrackService.java index b46a85d0e0..0cc265d5b8 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/TrackService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/TrackService.java @@ -243,6 +243,11 @@ public class TrackService { } }); } + if (MapUtils.isEmpty(bugStatusMap)) { + for (IssueStatus statusEnum : IssueStatus.values()) { + bugStatusMap.put(Translator.get(statusEnum.getI18nKey()), 0); + } + } return bugStatusMap; } diff --git a/test-track/frontend/src/business/home/TrackHome.vue b/test-track/frontend/src/business/home/TrackHome.vue index 1f0b9e562b..59457e8b11 100644 --- a/test-track/frontend/src/business/home/TrackHome.vue +++ b/test-track/frontend/src/business/home/TrackHome.vue @@ -135,15 +135,15 @@ export default { } .track-home-layout :deep(.dashboard-card) { - height: 392px; + height: 408px; } .track-home-layout :deep(.main-info) { - height: 197px; + height: 208px; } .track-home-layout :deep(.main-info-card) { - height: 197px; + height: 208px; width: 100%; color: #646A73; background-color: #FFFFFF; @@ -179,18 +179,43 @@ export default { } .track-home-layout :deep(.home-table-cell) { - height: 38px; + height: 40px; background-color: #F5F6F7; font-size: 14px; font-weight: 500; border: 1px solid rgba(31, 35, 41, 0.15); border-right-width: 0; border-left-width: 0; - color: #1F2329; + color: #646A73; line-height: 22px; } .track-home-layout :deep(.el-card) { border: 0; } + +.track-home-layout :deep(.table-title) { + color: #1F2329; + font-weight: 500; + font-size: 18px; + line-height: 26px; +} + +.track-home-layout :deep(.el-table__row), +.adjust-table :deep(.el-table__row .el-link) { + height: 40px; + font-size: 14px; + font-weight: 400; + line-height: 22px; + color: #1F2329; +} + +.track-home-layout :deep(.el-table__body tr:hover ) { + cursor: pointer; +} + +.track-home-layout :deep(.el-table .cell) { + padding-left: 12px; + padding-right: 12px; +} diff --git a/test-track/frontend/src/business/home/components/CaseCountCard.vue b/test-track/frontend/src/business/home/components/CaseCountCard.vue index e2aa1f9617..c817df630a 100644 --- a/test-track/frontend/src/business/home/components/CaseCountCard.vue +++ b/test-track/frontend/src/business/home/components/CaseCountCard.vue @@ -70,7 +70,7 @@ {{ $t("home.case_review_dashboard.not_pass") }}
- + {{ formatAmount(trackData.unPassCount) }}
@@ -80,7 +80,7 @@ {{ $t("home.case_review_dashboard.pass") }}
- + {{ formatAmount(trackData.passCount) }}
diff --git a/test-track/frontend/src/business/home/components/CaseMaintenance.vue b/test-track/frontend/src/business/home/components/CaseMaintenance.vue index 16e66a925d..2bd2ecc86f 100644 --- a/test-track/frontend/src/business/home/components/CaseMaintenance.vue +++ b/test-track/frontend/src/business/home/components/CaseMaintenance.vue @@ -14,7 +14,7 @@
- +
@@ -91,11 +91,10 @@ export default { grid: { left: 0, containLabel: true, - bottom: 24, - top: 60, + top: 80, right: 24, width: 600, - height: 250 + height: 255 }, legend: { itemWidth: 8, @@ -103,7 +102,7 @@ export default { data: [{icon: 'rect', name: this.$t('test_track.home.function_case_count')}, {icon: 'rect', name: this.$t('test_track.home.relevance_case_count')}], orient: 'horizontal', left: '0', - top: '10' + top: '24' }, series: [ { diff --git a/test-track/frontend/src/business/home/components/FailureTestCaseList.vue b/test-track/frontend/src/business/home/components/FailureTestCaseList.vue index 39ee003cc4..3cd29880d0 100644 --- a/test-track/frontend/src/business/home/components/FailureTestCaseList.vue +++ b/test-track/frontend/src/business/home/components/FailureTestCaseList.vue @@ -1,11 +1,9 @@