From 4626ebbe34cfc6def5f58fe12c9120be3945f2da Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Mon, 13 Jun 2022 10:49:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89):=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=94=A8=E4=BE=8B=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --user=郭雨琦 --bug=1013977 --- .../components/track/case/TestCase.vue | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/frontend/src/business/components/track/case/TestCase.vue b/frontend/src/business/components/track/case/TestCase.vue index c70347103d..1ab385dd42 100644 --- a/frontend/src/business/components/track/case/TestCase.vue +++ b/frontend/src/business/components/track/case/TestCase.vue @@ -431,7 +431,7 @@ export default { changeRedirectParam(redirectIDParam) { this.redirectID = redirectIDParam; if (redirectIDParam != null) { - if (this.redirectFlag == "none") { + if (this.redirectFlag === "none") { this.activeName = "default"; this.redirectFlag = "redirected"; } @@ -611,13 +611,9 @@ export default { if (!index) { this.type = "edit"; this.testCaseReadOnly = false; - if (!this.ignoreTreeNodes) { - if (testCase.label !== "redirect") { - if (this.treeNodes.length < 1) { - this.$warning(this.$t('test_track.case.create_module_first')); - return; - } - } + if (!this.ignoreTreeNodes && testCase.label !== "redirect" && this.treeNodes.length < 1) { + this.$warning(this.$t('test_track.case.create_module_first')); + return; } let hasEditPermission = hasPermission('PROJECT_TRACK_CASE:READ+EDIT'); this.$set(testCase, 'rowClickHasPermission', hasEditPermission); @@ -632,11 +628,9 @@ export default { if (!index) { this.type = "edit"; this.testCaseReadOnly = false; - if (testCase.label !== "redirect") { - if (this.treeNodes.length < 1) { - this.$warning(this.$t('test_track.case.create_module_first')); - return; - } + if (testCase.label !== "redirect" && this.treeNodes.length < 1) { + this.$warning(this.$t('test_track.case.create_module_first')); + return; } let hasEditPermission = hasPermission('PROJECT_TRACK_CASE:READ+EDIT'); this.$set(testCase, 'rowClickHasPermission', hasEditPermission);