From 88c20730029c5a4a6a0bd1d8993cb4f90f1c62c3 Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Fri, 19 Mar 2021 16:51:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA-?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B=E4=B8=8B=E6=8B=89=E6=A1=86?= =?UTF-8?q?-=E5=88=9B=E5=BB=BA=E7=94=A8=E4=BE=8B=EF=BC=8C=E4=BC=9A?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=B2=A1=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/business/components/track/case/TestCase.vue | 11 ++++++++--- .../components/track/case/components/TestCaseEdit.vue | 11 +++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/frontend/src/business/components/track/case/TestCase.vue b/frontend/src/business/components/track/case/TestCase.vue index f3bae0ef40..a2eba81345 100644 --- a/frontend/src/business/components/track/case/TestCase.vue +++ b/frontend/src/business/components/track/case/TestCase.vue @@ -260,9 +260,14 @@ export default { this.$warning(this.$t('commons.check_project_tip')); return; } -/* - this.openRecentTestCaseEditDialog(caseId); -*/ + if (caseId) { + this.$get('test/case/get/' + caseId, response => { + let testCase = response.data; + this.editTestCase(testCase) + }); + } else { + this.addTab({name: 'add'}); + } this.$router.push('/track/case/all'); } }, diff --git a/frontend/src/business/components/track/case/components/TestCaseEdit.vue b/frontend/src/business/components/track/case/components/TestCaseEdit.vue index 2d9ec236b8..a7a7b014e8 100644 --- a/frontend/src/business/components/track/case/components/TestCaseEdit.vue +++ b/frontend/src/business/components/track/case/components/TestCaseEdit.vue @@ -551,7 +551,11 @@ export default { let tmp = {}; Object.assign(tmp, testCase); tmp.steps = JSON.parse(testCase.steps); + if (tmp.steps == null) { + tmp.steps = [] + } Object.assign(this.form, tmp); + this.form.module = testCase.nodeId; this.getFileMetaData(testCase); }, @@ -964,4 +968,11 @@ export default { width: 100%; } +/deep/ .el-button-group > .el-button:first-child { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + height: 32px; + width: 56px; +} +