From 455c1ff9dc80dfdb4dfbf99e8e19409794835cb4 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Tue, 11 Jan 2022 13:48:23 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=89=88=E6=9C=AC=E5=AF=B9=E6=AF=94):=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89=E4=B8=8E=E6=80=A7=E8=83=BD?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=89=88=E6=9C=AC=E5=AF=B9=E6=AF=94=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8C=96=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --user=郭雨琦 版本对比自动化执行 --- .../complete/EditCompleteHTTPApi.vue | 13 +-- .../complete/version/HttpApiVersionDiff.vue | 110 ++++++++++++++++-- .../performance/test/DiffVersion.vue | 76 ++++++------ .../performance/test/EditPerformanceTest.vue | 4 - .../components/performance/v_node_diff.js | 1 + 5 files changed, 151 insertions(+), 53 deletions(-) diff --git a/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue b/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue index 30b3964cc9..fa7e50b04e 100644 --- a/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue +++ b/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue @@ -154,10 +154,6 @@ :response="response" :old-response="oldResponse" > - - 取 消 - 确 定 - @@ -182,6 +178,7 @@ import {createComponent } from ".././jmeter/components"; import { TYPE_TO_C} from "@/business/components/api/automation/scenario/Setting"; const {Body} = require("@/business/components/api/definition/model/ApiTestModel"); +const Sampler = require("@/business/components/api/definition/components/jmeter/components/sampler/sampler"); const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/); const versionHistory = requireComponent.keys().length > 0 ? requireComponent("./version/VersionHistory.vue") : {}; @@ -235,7 +232,7 @@ export default { newMockBaseUrl: "", count: 0, versionData: [], - oldRequest:{}, + oldRequest:Sampler, oldResponse:{} }; }, @@ -441,7 +438,6 @@ export default { this.httpForm.versionId = this.$refs.versionHistory.currentVersion.id; } } - this.$emit('saveApi', this.httpForm); this.count = 0; this.$store.state.apiMap.delete(this.httpForm.id); @@ -555,14 +551,12 @@ export default { this.setRequest(res.data) if (!this.setRequest(res.data)) { this.oldRequest = createComponent("HTTPSamplerProxy"); + this.dialogVisible = true; } this.formatApi(res.data) } }); }); - if(this.newData){ - this.dialogVisible = true; - } }, setRequest(api) { if (api.request !== undefined) { @@ -574,6 +568,7 @@ export default { if (!this.oldRequest.headers) { this.oldRequest.headers = []; } + this.dialogVisible = true; return true; } return false; diff --git a/frontend/src/business/components/api/definition/components/complete/version/HttpApiVersionDiff.vue b/frontend/src/business/components/api/definition/components/complete/version/HttpApiVersionDiff.vue index 30d1806ae0..2e9e8c24ee 100644 --- a/frontend/src/business/components/api/definition/components/complete/version/HttpApiVersionDiff.vue +++ b/frontend/src/business/components/api/definition/components/complete/version/HttpApiVersionDiff.vue @@ -111,7 +111,24 @@ - + + + + + + + + + + + + + + + + @@ -225,9 +242,26 @@ - + + + + + + + + + + + + + + + + + - diff --git a/frontend/src/business/components/performance/test/DiffVersion.vue b/frontend/src/business/components/performance/test/DiffVersion.vue index 4d49d57aef..8f8163347f 100644 --- a/frontend/src/business/components/performance/test/DiffVersion.vue +++ b/frontend/src/business/components/performance/test/DiffVersion.vue @@ -1,6 +1,7 @@