From f3e0eb5b9de8e2b966e85f04af6776f886840e5b Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Sun, 7 Feb 2021 11:36:57 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=B8=AD=E5=8F=A6=E5=AD=98=E6=96=B0=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E7=BC=BA=E9=99=B7=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../definition/components/runtest/RunTestDubboPage.vue | 8 +++++--- .../api/definition/components/runtest/RunTestHTTPPage.vue | 6 +++--- .../api/definition/components/runtest/RunTestSQLPage.vue | 4 +++- .../api/definition/components/runtest/RunTestTCPPage.vue | 8 +++++--- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/frontend/src/business/components/api/definition/components/runtest/RunTestDubboPage.vue b/frontend/src/business/components/api/definition/components/runtest/RunTestDubboPage.vue index 1643d36bbb..364f7eb919 100644 --- a/frontend/src/business/components/api/definition/components/runtest/RunTestDubboPage.vue +++ b/frontend/src/business/components/api/definition/components/runtest/RunTestDubboPage.vue @@ -89,7 +89,7 @@ reportId: "", } }, - props: {apiData: {}, currentProtocol: String,syncTabs: Array, projectId: String}, + props: {apiData: {}, currentProtocol: String, syncTabs: Array, projectId: String}, methods: { handleCommand(e) { switch (e) { @@ -105,7 +105,7 @@ return this.runTest(); } }, - refresh(){ + refresh() { this.$emit('refresh'); }, runTest() { @@ -161,7 +161,9 @@ }, saveAsApi() { let data = {}; - data.request = JSON.stringify(this.api.request); + let req = this.api.request; + req.id = getUUID(); + data.request = JSON.stringify(req); data.method = this.api.method; data.status = this.api.status; data.userId = this.api.userId; 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 86e599809c..9a7fc0c0d0 100644 --- a/frontend/src/business/components/api/definition/components/runtest/RunTestHTTPPage.vue +++ b/frontend/src/business/components/api/definition/components/runtest/RunTestHTTPPage.vue @@ -186,11 +186,11 @@ }, saveAsApi() { let data = {}; - data.request = JSON.stringify(this.api.request); + let req = this.api.request; + req.id = getUUID(); + data.request = JSON.stringify(req); data.method = this.api.method; data.url = this.api.url; - let id = getUUID(); - data.id = id; data.status = this.api.status; data.userId = this.api.userId; data.description = this.api.description; diff --git a/frontend/src/business/components/api/definition/components/runtest/RunTestSQLPage.vue b/frontend/src/business/components/api/definition/components/runtest/RunTestSQLPage.vue index 68af7c8962..b5731a2289 100644 --- a/frontend/src/business/components/api/definition/components/runtest/RunTestSQLPage.vue +++ b/frontend/src/business/components/api/definition/components/runtest/RunTestSQLPage.vue @@ -160,7 +160,9 @@ }, saveAsApi() { let data = {}; - data.request = JSON.stringify(this.api.request); + let req = this.api.request; + req.id = getUUID(); + data.request = JSON.stringify(req); data.method = this.api.method; data.status = this.api.status; data.userId = this.api.userId; diff --git a/frontend/src/business/components/api/definition/components/runtest/RunTestTCPPage.vue b/frontend/src/business/components/api/definition/components/runtest/RunTestTCPPage.vue index e259438d5a..3253d23b5e 100644 --- a/frontend/src/business/components/api/definition/components/runtest/RunTestTCPPage.vue +++ b/frontend/src/business/components/api/definition/components/runtest/RunTestTCPPage.vue @@ -98,7 +98,7 @@ reportId: "", } }, - props: {apiData: {}, currentProtocol: String,syncTabs: Array, projectId: String}, + props: {apiData: {}, currentProtocol: String, syncTabs: Array, projectId: String}, methods: { handleCommand(e) { switch (e) { @@ -114,7 +114,7 @@ return this.$refs['requestForm'].validate(); } }, - refresh(){ + refresh() { this.$emit('refresh'); }, runTest() { @@ -173,7 +173,9 @@ }, saveAsApi() { let data = {}; - data.request = JSON.stringify(this.api.request); + let req = this.api.request; + req.id = getUUID(); + data.request = JSON.stringify(req); data.method = this.api.method; data.status = this.api.status; data.userId = this.api.userId;