From 29bb8eb816070e6a469656b4dd6d1c095f53cd29 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Thu, 21 Jan 2021 14:02:05 +0800 Subject: [PATCH] =?UTF-8?q?style(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89):=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=94=A8=E4=BE=8B=20=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E5=A4=84=E7=90=86=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/case/ApiCaseHeader.vue | 18 +------ .../components/case/ApiCaseItem.vue | 50 ++++++++++++++----- .../components/case/ApiCaseList.vue | 4 +- 3 files changed, 40 insertions(+), 32 deletions(-) diff --git a/frontend/src/business/components/api/definition/components/case/ApiCaseHeader.vue b/frontend/src/business/components/api/definition/components/case/ApiCaseHeader.vue index 3e031e4357..49c9f097ac 100644 --- a/frontend/src/business/components/api/definition/components/case/ApiCaseHeader.vue +++ b/frontend/src/business/components/api/definition/components/case/ApiCaseHeader.vue @@ -50,16 +50,8 @@ @setEnvironment="setEnvironment"/> - - - +{{$t('api_test.definition.request.case')}} - - {{$t('api_test.automation.batch_execute')}} - {{$t('test_track.case.batch_edit_case')}} - - + +{{$t('api_test.definition.request.case')}} @@ -166,14 +158,6 @@ addCase() { this.$emit('addCase'); }, - handleCommand(e) { - if (e === "run") { - this.$emit('batchRun'); - } - if (e === 'batch_edit_case') { - this.$emit('batchEditCase'); - } - }, getColor(enable, method) { if (enable) { return this.methodColorMap.get(method); diff --git a/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue b/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue index 219a83de3c..e1cfe6c7e5 100644 --- a/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue +++ b/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue @@ -3,17 +3,23 @@
- - - -
-
{{ index + 1 }}
-
- - - - - + + + + + + + + +
+
{{ index + 1 }}
+
+ + + + +
+
@@ -41,7 +47,7 @@
- +
@@ -114,6 +120,7 @@ import MsRequestResultTail from "../response/RequestResultTail"; import MsJmxStep from "../step/JmxStep"; import ApiResponseComponent from "../../../automation/scenario/component/ApiResponseComponent"; + import ShowMoreBtn from "../../../../track/case/components/ShowMoreBtn"; export default { name: "ApiCaseItem", @@ -130,7 +137,8 @@ MsDubboBasisParameters, MsApiExtendBtns, MsRequestResultTail, - MsJmxStep + MsJmxStep, + ShowMoreBtn }, data() { return { @@ -146,6 +154,10 @@ condition: {}, responseData: {type: 'HTTP', responseResult: {}, subRequestResults: []}, isShowInput: false, + buttons: [ + {name: this.$t('api_test.automation.batch_execute'), handleClick: this.handleRunBatch}, + {name: this.$t('test_track.case.batch_edit_case'), handleClick: this.handleEditBatch} + ], } }, props: { @@ -172,6 +184,12 @@ }, watch: {}, methods: { + handleRunBatch() { + this.$emit('batchRun'); + }, + handleEditBatch() { + this.$emit('batchEditCase'); + }, deleteCase(index, row) { this.$alert(this.$t('api_test.definition.request.delete_confirm') + ' ' + row.name + " ?", '', { confirmButtonText: this.$t('commons.confirm'), @@ -327,6 +345,12 @@ margin-right: 10px; } + .ms-opt-btn { + position: fixed; + left: 60px; + z-index: 1; + } + .tag-item { margin-right: 20px; } diff --git a/frontend/src/business/components/api/definition/components/case/ApiCaseList.vue b/frontend/src/business/components/api/definition/components/case/ApiCaseList.vue index 55cfccbcfe..4d5ab0a566 100644 --- a/frontend/src/business/components/api/definition/components/case/ApiCaseList.vue +++ b/frontend/src/business/components/api/definition/components/case/ApiCaseList.vue @@ -7,9 +7,7 @@ @getApiTest="getApiTest" @setEnvironment="setEnvironment" @addCase="addCase" - @batchRun="batchRun" @selectAll="selectAll" - @batchEditCase="batchEditCase" :condition="condition" :priorities="priorities" :apiCaseList="apiCaseList" @@ -28,6 +26,8 @@ @singleRun="singleRun" @copyCase="copyCase" @showExecResult="showExecResult" + @batchEditCase="batchEditCase" + @batchRun="batchRun" :environment="environment" :is-case-edit="isCaseEdit" :api="api"