From 41146ad7d1077f3a3c1693736d66a87d6a022cd6 Mon Sep 17 00:00:00 2001 From: fit2-zhao <yong.zhao@fit2cloud.com> Date: Tue, 22 Dec 2020 10:12:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=E4=BF=AE=E5=A4=8D=E6=89=A7=E8=A1=8C=E7=BC=BA?= =?UTF-8?q?=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/service/ApiAutomationService.java | 1 + .../api/service/ApiDefinitionService.java | 1 - .../automation/scenario/EditApiScenario.vue | 25 +++++++++++++------ .../components/runtest/RunTestHTTPPage.vue | 1 + 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java index f2204b3290..0a8bfcb90c 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java @@ -304,6 +304,7 @@ public class ApiAutomationService { ParameterConfig config = new ParameterConfig(); config.setConfig(envConfig); HashTree hashTree = request.getTestElement().generateHashTree(config); + request.getTestElement().getJmx(hashTree); // 调用执行方法 jMeterService.runDefinition(request.getId(), hashTree, request.getReportId(), ApiRunMode.SCENARIO.name()); createAPIScenarioReportResult(request.getId(), ReportTriggerMode.MANUAL.name(), request.getExecuteType(), request.getProjectId()); diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java index 1b29f1cda5..d4c38d44b7 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -290,7 +290,6 @@ public class ApiDefinitionService { createBodyFiles(bodyUploadIds, bodyFiles); HashTree hashTree = request.getTestElement().generateHashTree(); - request.getTestElement().getJmx(hashTree); // 调用执行方法 jMeterService.runDefinition(request.getId(), hashTree, request.getReportId(), ApiRunMode.DELIMIT.name()); return request.getId(); diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index d618d155e3..4853dc3d5a 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -123,20 +123,20 @@ <!-- 调试部分 --> <div class="ms-debug-div" @click="showAll"> <el-row style="margin: 5px"> - <el-col :span="6" class="ms-col-one"> + <el-col :span="6" class="ms-col-one ms-font"> {{currentScenario.name ===undefined || ''? $t('api_test.scenario.name') : currentScenario.name}} </el-col> - <el-col :span="3" class="ms-col-one"> + <el-col :span="3" class="ms-col-one ms-font"> {{$t('api_test.automation.step_total')}}:{{scenarioDefinition.length}} </el-col> - <el-col :span="3" class="ms-col-one"> + <el-col :span="3" class="ms-col-one ms-font"> <el-link class="head" @click="showScenarioParameters">{{$t('api_test.automation.scenario_total')}}</el-link> :{{this.currentScenario.variables!=undefined?this.currentScenario.variables.length-1: 0}} </el-col> - <el-col :span="3"> - <el-checkbox v-model="enableCookieShare" style="margin-top: 5px">{{ '共享cookie' }}</el-checkbox> + <el-col :span="3" class="ms-col-one ms-font"> + <el-checkbox v-model="enableCookieShare">{{ '共享cookie' }}</el-checkbox> </el-col> - <el-col :span="7"> + <el-col :span="7" class="ms-font"> {{$t('api_test.definition.request.run_env')}}: <el-select v-model="currentEnvironmentId" size="small" class="ms-htt-width" :placeholder="$t('api_test.definition.request.run_env')" @@ -826,7 +826,12 @@ margin-right: 10px; color: white; } + .ms-font{ + color: #303133; + font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", Arial, sans-serif; + font-size: 13px; + } .ms-col-one { margin-top: 6px; } @@ -912,8 +917,14 @@ margin-bottom: 0px; } + /deep/ .el-link { + font-weight: normal; + } + .head { - border-bottom: 1px solid #474849; + border-bottom: 1px solid #303133; + color: #303133; + font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", Arial, sans-serif; font-size: 13px; } </style> diff --git a/frontend/src/business/components/api/definition/components/runtest/RunTestHTTPPage.vue b/frontend/src/business/components/api/definition/components/runtest/RunTestHTTPPage.vue index d58117c3f8..e3c2b2ddfd 100644 --- a/frontend/src/business/components/api/definition/components/runtest/RunTestHTTPPage.vue +++ b/frontend/src/business/components/api/definition/components/runtest/RunTestHTTPPage.vue @@ -216,6 +216,7 @@ updateApi() { let url = "/api/definition/update"; let bodyFiles = this.getBodyUploadFiles(); + this.api.method = this.api.request.method; this.$fileUpload(url, null, bodyFiles, this.api, () => { this.$success(this.$t('commons.save_success')); this.$emit('saveApi', this.api);