From df2f5df2f79714b40341eb8a2749b360b40da7a7 Mon Sep 17 00:00:00 2001 From: "song.tianyang" Date: Thu, 17 Dec 2020 19:10:51 +0800 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E9=A6=96?= =?UTF-8?q?=E9=A1=B5CSS=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 清除无效CSS样式、未使用CSS样式 --- .../components/api/homepage/components/ApiDetailCard.vue | 7 ++++--- .../components/api/homepage/components/ApiInfoCard.vue | 4 +--- .../components/api/homepage/components/SceneDetailCard.vue | 6 ------ .../api/homepage/components/ScheduleTaskDetailCard.vue | 7 +------ .../api/homepage/components/ScheduleTaskInfoCard.vue | 4 +--- .../api/homepage/components/TestCaseDetailCard.vue | 7 +------ .../api/homepage/components/TestCaseInfoCard.vue | 4 +--- 7 files changed, 9 insertions(+), 30 deletions(-) diff --git a/frontend/src/business/components/api/homepage/components/ApiDetailCard.vue b/frontend/src/business/components/api/homepage/components/ApiDetailCard.vue index cb763e94e9..504c104f77 100644 --- a/frontend/src/business/components/api/homepage/components/ApiDetailCard.vue +++ b/frontend/src/business/components/api/homepage/components/ApiDetailCard.vue @@ -8,7 +8,10 @@
+
{{$t('api_test.home_page.api_details_card.this_week_add',[apiCountData.thisWeekAddedCount])}} +
+
@@ -53,7 +56,5 @@ export default { } diff --git a/frontend/src/business/components/api/homepage/components/ApiInfoCard.vue b/frontend/src/business/components/api/homepage/components/ApiInfoCard.vue index 5ef667d712..b4c632a872 100644 --- a/frontend/src/business/components/api/homepage/components/ApiInfoCard.vue +++ b/frontend/src/business/components/api/homepage/components/ApiInfoCard.vue @@ -52,10 +52,8 @@ export default { diff --git a/frontend/src/business/components/api/homepage/components/ScheduleTaskDetailCard.vue b/frontend/src/business/components/api/homepage/components/ScheduleTaskDetailCard.vue index 59c5386970..3c2ac75d72 100644 --- a/frontend/src/business/components/api/homepage/components/ScheduleTaskDetailCard.vue +++ b/frontend/src/business/components/api/homepage/components/ScheduleTaskDetailCard.vue @@ -49,10 +49,5 @@ export default { } diff --git a/frontend/src/business/components/api/homepage/components/ScheduleTaskInfoCard.vue b/frontend/src/business/components/api/homepage/components/ScheduleTaskInfoCard.vue index 390a15269d..ead029291d 100644 --- a/frontend/src/business/components/api/homepage/components/ScheduleTaskInfoCard.vue +++ b/frontend/src/business/components/api/homepage/components/ScheduleTaskInfoCard.vue @@ -60,10 +60,8 @@ export default { diff --git a/frontend/src/business/components/api/homepage/components/TestCaseInfoCard.vue b/frontend/src/business/components/api/homepage/components/TestCaseInfoCard.vue index 77617ef9c4..a1c4a1619c 100644 --- a/frontend/src/business/components/api/homepage/components/TestCaseInfoCard.vue +++ b/frontend/src/business/components/api/homepage/components/TestCaseInfoCard.vue @@ -59,10 +59,8 @@ export default { diff --git a/frontend/src/business/components/api/homepage/components/ApiDetailCard.vue b/frontend/src/business/components/api/homepage/components/ApiDetailCard.vue deleted file mode 100644 index 504c104f77..0000000000 --- a/frontend/src/business/components/api/homepage/components/ApiDetailCard.vue +++ /dev/null @@ -1,60 +0,0 @@ - - - - diff --git a/frontend/src/business/components/api/homepage/components/ApiInfoCard.vue b/frontend/src/business/components/api/homepage/components/ApiInfoCard.vue index b4c632a872..2c7db625e6 100644 --- a/frontend/src/business/components/api/homepage/components/ApiInfoCard.vue +++ b/frontend/src/business/components/api/homepage/components/ApiInfoCard.vue @@ -1,33 +1,93 @@ @@ -55,7 +115,47 @@ export default { line-height: 100px; text-align: center; } -.countNumber{ - font-size: 40px; +.count-number{ + font-family:'ArialMT', 'Arial', sans-serif; + font-size:33px; + color: #6C317C; +} + +.main-number-show { + width: 100px; + height: 100px; + border-style: solid; + border-width: 7px; + border-color: #CDB9D2; + border-radius:50%; + +} + +.count-number-show{ + margin:20px auto; +} +.detail-container{ + margin-top: 30px +} +.no-shadow-card{ + -webkit-box-shadow: 0 0px 0px 0 rgba(0,0,0,.1); + box-shadow: 0 0px 0px 0 rgba(0,0,0,.1); +} +.default-property{ + +} +.main-property{ + color: #F39021; +} + +.el-card /deep/ .el-card__header { + border-bottom: 0px solid #EBEEF5; +} + +.count-info-div{ + margin: 3px; +} +.count-info-div >>>p{ + font-size: 10px; } diff --git a/frontend/src/business/components/api/homepage/components/FailureTestCaseList.vue b/frontend/src/business/components/api/homepage/components/FailureTestCaseList.vue index 4edee720cd..1e7235817b 100644 --- a/frontend/src/business/components/api/homepage/components/FailureTestCaseList.vue +++ b/frontend/src/business/components/api/homepage/components/FailureTestCaseList.vue @@ -7,7 +7,18 @@ - + + + + @@ -16,10 +27,14 @@ - diff --git a/frontend/src/business/components/api/homepage/components/SceneInfoCard.vue b/frontend/src/business/components/api/homepage/components/SceneInfoCard.vue index 758f145d9c..7da19aaa67 100644 --- a/frontend/src/business/components/api/homepage/components/SceneInfoCard.vue +++ b/frontend/src/business/components/api/homepage/components/SceneInfoCard.vue @@ -1,29 +1,88 @@ @@ -52,13 +111,50 @@ export default { diff --git a/frontend/src/business/components/api/homepage/components/ScheduleTaskDetailCard.vue b/frontend/src/business/components/api/homepage/components/ScheduleTaskDetailCard.vue deleted file mode 100644 index 3c2ac75d72..0000000000 --- a/frontend/src/business/components/api/homepage/components/ScheduleTaskDetailCard.vue +++ /dev/null @@ -1,53 +0,0 @@ - - - - diff --git a/frontend/src/business/components/api/homepage/components/ScheduleTaskInfoCard.vue b/frontend/src/business/components/api/homepage/components/ScheduleTaskInfoCard.vue index ead029291d..8d57c6ddcf 100644 --- a/frontend/src/business/components/api/homepage/components/ScheduleTaskInfoCard.vue +++ b/frontend/src/business/components/api/homepage/components/ScheduleTaskInfoCard.vue @@ -1,40 +1,96 @@ - diff --git a/frontend/src/business/components/api/homepage/components/TestCaseInfoCard.vue b/frontend/src/business/components/api/homepage/components/TestCaseInfoCard.vue index a1c4a1619c..97d07a8615 100644 --- a/frontend/src/business/components/api/homepage/components/TestCaseInfoCard.vue +++ b/frontend/src/business/components/api/homepage/components/TestCaseInfoCard.vue @@ -1,33 +1,105 @@ @@ -42,7 +114,7 @@ export default { data() { return { result: {}, - loading: false + loading: false, } }, props:{ @@ -52,6 +124,7 @@ export default { }, created() { + }, activated() { } @@ -62,8 +135,47 @@ export default { line-height: 100px; text-align: center; } +.count-number{ + font-family:'ArialMT', 'Arial', sans-serif; + font-size:33px; + color: #6C317C; +} -.countNumber{ - font-size: 40px; +.main-number-show { + width: 100px; + height: 100px; + border-style: solid; + border-width: 7px; + border-color: #CDB9D2; + border-radius:50%; + +} + +.count-number-show{ + margin:20px auto; +} +.detail-container{ + margin-top: 30px +} +.no-shadow-card{ + -webkit-box-shadow: 0 0px 0px 0 rgba(0,0,0,.1); + box-shadow: 0 0px 0px 0 rgba(0,0,0,.1); +} +.default-property{ + +} +.main-property{ + color: #F39021; +} + +.el-card /deep/ .el-card__header { + border-bottom: 0px solid #EBEEF5; +} + +.count-info-div{ + margin: 3px; +} +.count-info-div >>>p{ + font-size: 10px; } diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 3be77383b3..5ac9a8deef 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -582,6 +582,7 @@ export default { remove: "Remove", view_ref: "View ref", case_ref: "Case ref", + schedule: "Scheduled Task", scenario_ref: "Scenario ref", plan_ref: "Plan ref", batch_add_plan: "Add plan", @@ -800,14 +801,32 @@ export default { title: "API count", }, test_case_count_card:{ - title: "Test case count", + title: "Api test case count", }, test_scene_count_card:{ - title: "Scene count", + title: "Scene test case count", }, schedule_task_count_card:{ title: "Schedule task count", }, + detail_card:{ + running:"Running", + not_started:"Not started", + finished:"Finished", + uncoverage:"Uncoverage", + coverage:"Coverage", + unexecute:"Unexecute", + execution_failed:"Execution failed", + execution_pass:"Execution passed", + failed:"Failure", + success:"Success", + rate:{ + completion:"Completion rate", + coverage:"Coverage rate", + pass:"Pass rate", + success:"Success rate", + }, + }, api_details_card:{ title: "API", this_week_add:"Added {0} this week", @@ -817,30 +836,46 @@ export default { this_week_add:"Added {0} this week", this_week_execute:"Executed {0} this week", executed:"Executed {0} in history", + this_week_add_sm:"Added {0}
this week", + this_week_execute_sm:"Executed {0}
this week", + executed_sm:"Executed {0}
in history", }, test_scene_details_card:{ title: "Scene", this_week_add:"Added {0} this week", this_week_execute:"Executed {0} this week", executed:"Executed {0} in history", + this_week_add_sm:"Added {0}
this week", + this_week_execute_sm:"Executed {0}
this week", + executed_sm:"Executed {0}
in history", }, schedule_task_details_card:{ title: "Schedule task", this_week_add:"Added {0} this week", this_week_execute:"Executed {0} this week", executed:"Executed {0} in history", + this_week_add_sm:"Added {0}
this week", + this_week_execute_sm:"Executed {0}
this week", + executed_sm:"Executed {0}
in history", }, failed_case_list:{ - title: "Top 10 failure process set cases in the past 7 days", + title: "Top 10 failure cases about test plan in the past 7 days", table_coloum:{ index: "Ranking", case_name: "Case name", + case_type: "Case Type", test_plan: "Test plan", failure_times: "Failure times", }, + table_value:{ + case_type:{ + api: "Api case", + scene: "Scenario case", + } + } }, running_task_list:{ - title: "Running task", + title: "Running schedule task", table_coloum:{ index: "Index", scenario: "Scene", diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index 98f7261c6d..6b8087e6df 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -581,6 +581,7 @@ export default { remove: "删除", view_ref: "查看引用", case_ref: "用例引用", + schedule: "定时任务", scenario_ref: "场景引用", plan_ref: "测试计划引用", batch_add_plan: "添加到测试计划", @@ -798,50 +799,84 @@ export default { home_page:{ unit_of_measurement:"个", api_count_card:{ - title: "接口总数", + title: "接口数量统计", }, test_case_count_card:{ - title: "用例总数", + title: "接口用例数量统计", }, test_scene_count_card:{ - title: "场景总数", + title: "场景用例数量统计", }, schedule_task_count_card:{ - title: "定时任务总数", + title: "定时任务数量统计", + }, + detail_card:{ + running:"进行中", + not_started:"未开始", + finished:"已完成", + uncoverage:"未覆盖", + coverage:"已覆盖", + unexecute:"未执行", + execution_failed:"未通过", + execution_pass:"已通过", + failed:"失败", + success:"成功", + rate:{ + completion:"完成率", + coverage:"覆盖率", + pass:"通过率", + success:"成功率", + }, }, api_details_card:{ title: "接口", - this_week_add:"本周新增{0}个", + this_week_add:"本周新增: {0}个", }, test_case_details_card:{ title: "用例", this_week_add:"本周新增: {0}个", this_week_execute:"本周执行: {0}次", executed:"历史总执行: {0}次", + this_week_add_sm:"本周新增:
{0}个", + this_week_execute_sm:"本周执行:
{0}次", + executed_sm:"历史总执行:
{0}次", }, test_scene_details_card:{ title: "场景", this_week_add:"本周新增: {0}个", this_week_execute:"本周执行: {0}次", executed:"历史总执行: {0}次", + this_week_add_sm:"本周新增:
{0}个", + this_week_execute_sm:"本周执行:
{0}次", + executed_sm:"历史总执行:
{0}次", }, schedule_task_details_card:{ title: "定时任务", this_week_add:"本周新增: {0}个", this_week_execute:"本周执行: {0}次", executed:"历史总执行: {0}次", + this_week_add_sm:"本周新增:
{0}个", + this_week_execute_sm:"本周执行:
{0}次", + executed_sm:"历史总执行:
{0}次", }, failed_case_list:{ - title: "过去7天流程集失败用例TOP 10", + title: "过去7天测试计划失败用例TOP 10", table_coloum:{ index: "排名", case_name: "用例名称", + case_type: "用例类型", test_plan: "所属测试计划", failure_times: "失败次数", }, + table_value:{ + case_type:{ + api: "接口用例", + scene: "场景用例", + } + } }, running_task_list:{ - title: "运行中的任务", + title: "运行中的定时任务", table_coloum:{ index: "序号", scenario: "场景名称", diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index b96c0bb2f7..849537ec9f 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -581,6 +581,7 @@ export default { remove: "删除", view_ref: "查看引用", case_ref: "用例引用", + schedule: "定時任務", scenario_ref: "场景引用", plan_ref: "测试计划引用", batch_add_plan: "添加到测试计划", @@ -797,50 +798,84 @@ export default { home_page:{ unit_of_measurement:"個", api_count_card:{ - title: "接口總數", + title: "接口數量統計", }, test_case_count_card:{ - title: "用例總數", + title: "接口用例數量統計", }, test_scene_count_card:{ - title: "場景總數", + title: "場景用例數量統計", }, schedule_task_count_card:{ - title: "定時任務總數", + title: "定時任務數量統計", + }, + detail_card:{ + running:"進行中", + not_started:"未開始", + finished:"已完成", + uncoverage:"未覆蓋", + coverage:"已覆蓋", + unexecute:"未執行", + execution_failed:"未通過", + execution_pass:"已通過", + failed:"失敗", + success:"成功", + rate:{ + completion:"完成率", + coverage:"覆蓋率", + pass:"通過率", + success:"成功率", + }, }, api_details_card:{ title: "接口", - this_week_add:"本週新增{0}个", + this_week_add:"本週新增: {0}个", }, test_case_details_card:{ title: "用例", this_week_add:"本週新增: {0}个", this_week_execute:"本週執行: {0}次", executed:"歷史總執行: {0}次", + this_week_add_sm:"本週新增:
{0}个", + this_week_execute_sm:"本週執行:
{0}次", + executed_sm:"歷史總執行:
{0}次", }, test_scene_details_card:{ title: "場景", this_week_add:"本週新增: {0}个", this_week_execute:"本週執行: {0}次", executed:"歷史總執行: {0}次", + this_week_add_sm:"本週新增:
{0}个", + this_week_execute_sm:"本週執行:
{0}次", + executed_sm:"歷史總執行:
{0}次", }, schedule_task_details_card:{ title: "定時任務", this_week_add:"本週新增: {0}个", this_week_execute:"本週執行: {0}次", executed:"歷史總執行: {0}次", + this_week_add_sm:"本週新增:
{0}个", + this_week_execute_sm:"本週執行:
{0}次", + executed_sm:"歷史總執行:
{0}次", }, failed_case_list:{ - title: "過去7天流程集失敗用例TOP 10", + title: "過去7天測試計畫失敗用例TOP 10", table_coloum:{ index: "排名", case_name: "用例名稱", + case_type: "用例類型", test_plan: "所屬測試計畫", failure_times: "失敗次數", }, + table_value:{ + case_type:{ + api: "接口用例", + scene: "場景用例", + } + } }, running_task_list:{ - title: "運行中的任務", + title: "運行中的定時任務", table_coloum:{ index: "序號", scenario: "場景名稱",