From bbde7fd0344c0a898f9955883dd7b141970473b4 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Mon, 21 Nov 2022 18:57:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E8=B7=B3=E8=BD=AC=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1019766 --user=宋天阳 【接口测试】首页-接口用例数量统计,本周新增用例数量跳转,显示了非本周新增的用例 https://www.tapd.cn/55049933/s/1300082 --- .../automation/scenario/ApiScenarioModule.vue | 3 +++ .../components/list/ApiCaseSimpleList.vue | 2 +- .../home/components/card/MainInfoCard.vue | 15 ++++++++++----- .../business/home/components/chart/CountChart.vue | 8 ++++---- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/api-test/frontend/src/business/automation/scenario/ApiScenarioModule.vue b/api-test/frontend/src/business/automation/scenario/ApiScenarioModule.vue index 0ec259be0c..5f26dd68e3 100644 --- a/api-test/frontend/src/business/automation/scenario/ApiScenarioModule.vue +++ b/api-test/frontend/src/business/automation/scenario/ApiScenarioModule.vue @@ -331,6 +331,9 @@ export default { this.$warning(this.$t('commons.check_project_tip')); return; } + if (!this.currentModule) { + this.$error(this.$t('test_track.case.input_module')); + } this.$refs.basisScenario.open(this.currentModule); }, enableTrash() { diff --git a/api-test/frontend/src/business/definition/components/list/ApiCaseSimpleList.vue b/api-test/frontend/src/business/definition/components/list/ApiCaseSimpleList.vue index 0994433036..2599bb2515 100644 --- a/api-test/frontend/src/business/definition/components/list/ApiCaseSimpleList.vue +++ b/api-test/frontend/src/business/definition/components/list/ApiCaseSimpleList.vue @@ -842,7 +842,7 @@ export default { this.condition.selectThisWeedData = false; this.condition.id = null; this.condition.redirectFilter = null; - if (this.selectDataRange == 'thisWeekCount') { + if (this.selectDataRange == 'createdInWeek') { this.condition.selectThisWeedData = true; } else if ( this.selectDataRange === 'executionPassCount' || diff --git a/api-test/frontend/src/business/home/components/card/MainInfoCard.vue b/api-test/frontend/src/business/home/components/card/MainInfoCard.vue index 6796ec7964..b086ae8984 100644 --- a/api-test/frontend/src/business/home/components/card/MainInfoCard.vue +++ b/api-test/frontend/src/business/home/components/card/MainInfoCard.vue @@ -5,15 +5,15 @@ {{ title }}
- {{ countData.executedTimesInWeek }} - {{ countData.total }} + {{ formatAmount(countData.executedTimesInWeek) }} + {{ formatAmount(countData.total) }}
{{ $t('home.dashboard.public.executed_times') }}
- {{ countData.executedTimes }} + {{ formatAmount(countData.executedTimes) }}
@@ -26,7 +26,7 @@ class="common-amount-button" v-permission-disable="linkPermission" @click="redirect('createdInWeek')"> - +{{ countData.createdInWeek }} + +{{ formatAmount(countData.createdInWeek) }}
@@ -38,7 +38,7 @@ class="common-amount-button" v-permission-disable="linkPermission" @click="redirect('fakeError')"> - {{ countData.fakeErrorCount }} + {{ formatAmount(countData.fakeErrorCount) }} @@ -51,6 +51,8 @@ diff --git a/api-test/frontend/src/business/home/components/chart/CountChart.vue b/api-test/frontend/src/business/home/components/chart/CountChart.vue index 562d19a8cc..003e3e9ac4 100644 --- a/api-test/frontend/src/business/home/components/chart/CountChart.vue +++ b/api-test/frontend/src/business/home/components/chart/CountChart.vue @@ -95,10 +95,10 @@ export default { borderWidth = 3; dataIsNotEmpty = true; protocolData = [ - { value: this.apiData.httpCount, name: 'HTTP' }, - { value: this.apiData.rpcCount, name: 'RPC' }, - { value: this.apiData.tcpCount, name: 'TCP' }, - { value: this.apiData.sqlCount, name: 'SQL' }, + { value: this.formatAmount(this.apiData.httpCount), name: 'HTTP' }, + { value: this.formatAmount(this.apiData.rpcCount), name: 'RPC' }, + { value: this.formatAmount(this.apiData.tcpCount), name: 'TCP' }, + { value: this.formatAmount(this.apiData.sqlCount), name: 'SQL' }, ]; } let optionData = {