From 58009a10c03aaa64327ccbf81b7e22c91d0f10c2 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Mon, 13 Sep 2021 15:14:49 +0800 Subject: [PATCH] =?UTF-8?q?fix=20(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89):?= =?UTF-8?q?=20=E4=BF=AE=E5=A4=8Dcase=E5=A4=8D=E5=88=B6=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20--bug=3D1006466=20--user=3D=E8=B5=B5?= =?UTF-8?q?=E5=8B=87=20=E3=80=90github#6021=E3=80=91CASE=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=EF=BC=8C=E4=BC=9A=E5=87=BA=E7=8E=B0=E6=97=A0=E6=B3=95=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E5=88=B0=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B=E7=9A=84?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E5=8F=82=E6=95=B0=EF=BC=8C=E4=B9=9F=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=A4=8D=E5=88=B6url=20https://www.tapd.cn/55049933/s?= =?UTF-8?q?/1045940?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/definition/components/case/ApiCaseItem.vue | 6 +++--- .../api/definition/components/case/ApiCaseList.vue | 12 +++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) 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 83478a7b00..d10d2ff136 100644 --- a/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue +++ b/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue @@ -444,13 +444,13 @@ export default { if (!row.message) { this.$success(this.$t('commons.save_success')); this.reload(); - if (!hideAlert) { - this.$emit('refresh'); - } // 刷新编辑后用例列表 if (this.api.source === "editCase") { this.$store.state.currentApiCase = {refresh: "true"}; } + if (!hideAlert) { + this.$emit('refresh'); + } } }); }, 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 b2094a81f3..0c8baf273f 100644 --- a/frontend/src/business/components/api/definition/components/case/ApiCaseList.vue +++ b/frontend/src/business/components/api/definition/components/case/ApiCaseList.vue @@ -190,6 +190,17 @@ export default { }, copy(apiCase) { this.api.id = apiCase.apiDefinitionId; + if (apiCase && apiCase.request) { + if (apiCase.request.type === "HTTPSamplerProxy") { + this.api.protocol = "HTTP"; + this.api.source = "editCase"; + } + this.api.method = apiCase.request.method + this.api.name = apiCase.request.name; + } + if(apiCase.tags){ + apiCase.tags =JSON.parse(apiCase.tags); + } this.condition = {components: API_CASE_CONFIGS}; this.sysAddition(apiCase); this.visible = true; @@ -257,7 +268,6 @@ export default { //this.$emit("refresh"); }, refresh() { - this.getApiTest(); this.$emit('refresh'); }, selectAll(isSelectAll) {