From 4235003784c7d6737760115e5a74f8be068abc1c Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Wed, 27 Jan 2021 18:05:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89):?= =?UTF-8?q?=20=E4=BF=AE=E5=A4=8D=E7=94=A8=E4=BE=8B=E5=88=97=E8=A1=A8-?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E7=94=A8=E4=BE=8B=EF=BC=8C=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E6=B2=A1=E5=A4=8D=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/api/definition/components/case/ApiCaseItem.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 7fcfa5c573..021c0aaa71 100644 --- a/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue +++ b/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue @@ -213,7 +213,7 @@ }, copyCase(data) { let uuid = getUUID(); - let obj = {name: "copy_" + data.name, priority: data.priority, active: true, request: data.request, uuid: uuid}; + let obj = {name: "copy_" + data.name, priority: data.priority, active: true, tags: data.tags, request: data.request, uuid: uuid}; this.$emit('copyCase', obj); }, selectTestCase(item, $event) { From 8e2bd2224e8204e0e803027b62714614d771872d Mon Sep 17 00:00:00 2001 From: "song.tianyang" Date: Wed, 27 Jan 2021 18:10:04 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E5=A4=8D=E5=88=B6=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9C=BA=E6=99=AF=E5=90=8D=E7=A7=B0=E5=90=8E?= =?UTF-8?q?=EF=BC=8Ctab=E9=A1=B5=E7=9A=84=E5=90=8D=E7=A7=B0=E6=B2=A1?= =?UTF-8?q?=E8=B7=9F=E7=9D=80=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复复制场景修改场景名称后,tab页的名称没跟着变的问题 --- .../components/api/automation/ApiAutomation.vue | 10 ++++++++++ .../api/automation/scenario/EditApiScenario.vue | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend/src/business/components/api/automation/ApiAutomation.vue b/frontend/src/business/components/api/automation/ApiAutomation.vue index d8b76fefaf..e806819a7c 100644 --- a/frontend/src/business/components/api/automation/ApiAutomation.vue +++ b/frontend/src/business/components/api/automation/ApiAutomation.vue @@ -237,8 +237,18 @@ this.$refs.apiScenarioList.search(data); }, refresh(data) { + this.setTabTitle(data); this.$refs.apiScenarioList.search(data); }, + setTabTitle(data) { + for (let index in this.tabs) { + let tab = this.tabs[index]; + if (tab.name === this.activeName) { + tab.label = data.name; + break; + } + } + }, editScenario(row) { this.addTab({name: 'edit', currentScenario: row}); }, diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index 582b148523..bc6f32603c 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -848,7 +848,7 @@ if (this.currentScenario.tags instanceof String) { this.currentScenario.tags = JSON.parse(this.currentScenario.tags); } - this.$emit('refresh'); + this.$emit('refresh',this.currentScenario); }) } })