From b913e2b804d1044b1ac9a662e191cc6ca2946676 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Tue, 24 Aug 2021 19:00:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(TCP-Mock):=20#1006121=20=E3=80=90=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=B5=8B=E8=AF=95=E3=80=91tcp=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E7=9A=84mock=E6=9C=9F=E6=9C=9B=E5=88=87=E6=8D=A2=E5=90=8E?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E6=B2=A1=E5=8F=98=EF=BC=9B#1006127=20?= =?UTF-8?q?=E3=80=90=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95=E3=80=91tcp?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E5=BC=80=E4=B8=A4=E4=B8=AA=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=8C=E7=82=B9=E3=80=90mock=E8=AE=BE=E7=BD=AE=E3=80=91?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E4=BC=9A=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【【接口测试】tcp同时开两个接口,点【mock设置】按钮会串】https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001006127;测试计划批量执行、定时任务、Jenkins调用时报告模板更新;【【接口测试】tcp同时开两个接口,点【mock设置】按钮会串】https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001006127 --- .../definition/components/mock/MockConfig.vue | 1 + .../components/mock/TcpMockConfig.vue | 30 +++++++++++-------- .../components/request/tcp/TcpParams.vue | 12 ++++++-- 3 files changed, 29 insertions(+), 14 deletions(-) diff --git a/frontend/src/business/components/api/definition/components/mock/MockConfig.vue b/frontend/src/business/components/api/definition/components/mock/MockConfig.vue index 4db85d68a3..319a48f9c4 100644 --- a/frontend/src/business/components/api/definition/components/mock/MockConfig.vue +++ b/frontend/src/business/components/api/definition/components/mock/MockConfig.vue @@ -340,6 +340,7 @@ export default { }); }, clickRow(row, column, event) { + this.cleanMockExpectConfig(); let selectUrl = "/mockConfig/mockExpectConfig/" + row.id; this.$get(selectUrl, response => { let data = response.data; diff --git a/frontend/src/business/components/api/definition/components/mock/TcpMockConfig.vue b/frontend/src/business/components/api/definition/components/mock/TcpMockConfig.vue index 5c9ab22e78..7322592eea 100644 --- a/frontend/src/business/components/api/definition/components/mock/TcpMockConfig.vue +++ b/frontend/src/business/components/api/definition/components/mock/TcpMockConfig.vue @@ -82,11 +82,11 @@ {{ $t('api_test.mock.rsp_param') }} - - - - - + + + + + @@ -153,8 +153,10 @@ export default { name: "", mockConfigId: "", request: { - reportType:'raw', - xmlDataStruct:[], + reportType: 'raw', + xmlDataStruct: [], + jsonDataStruct: "", + rawDataStruct: "", }, response: { httpCode: "", @@ -177,7 +179,7 @@ export default { }, props: { baseMockConfigData: {}, - type:String + type: String }, created() { this.mockConfigData = this.baseMockConfigData; @@ -252,8 +254,10 @@ export default { name: "", mockConfigId: "", request: { - reportType:'raw', - xmlDataStruct:[], + reportType: 'raw', + xmlDataStruct: [], + jsonDataStruct: "", + rawDataStruct: "", }, response: { httpCode: "", @@ -263,6 +267,7 @@ export default { }, }; this.$nextTick(function () { + this.$refs.tcpParam.reload(); this.showHeadTable = true; }); }, @@ -310,6 +315,7 @@ export default { }); }, clickRow(row, column, event) { + this.cleanMockExpectConfig(); let selectUrl = "/mockConfig/mockExpectConfig/" + row.id; this.$get(selectUrl, response => { let data = response.data; @@ -317,8 +323,8 @@ export default { this.mockExpectConfig = data; if (this.mockExpectConfig.request == null) { this.mockExpectConfig.request = { - reportType:'raw', - xmlDataStruct:[], + reportType: 'raw', + xmlDataStruct: [], }; } if (this.mockExpectConfig.response == null) { diff --git a/frontend/src/business/components/api/definition/components/request/tcp/TcpParams.vue b/frontend/src/business/components/api/definition/components/request/tcp/TcpParams.vue index 534b9c3291..02c8eeae43 100644 --- a/frontend/src/business/components/api/definition/components/request/tcp/TcpParams.vue +++ b/frontend/src/business/components/api/definition/components/request/tcp/TcpParams.vue @@ -1,6 +1,6 @@