From 96c9ead1131224db99b9bf4240306297ecfbad26 Mon Sep 17 00:00:00 2001 From: BugKing Date: Thu, 27 May 2021 10:15:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E7=8A=B6=E6=80=81=E5=8F=8A?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E5=8A=9F=E8=83=BD=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E7=8A=B6=E6=80=81=E4=B8=8B=E6=8B=89=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../track/plan/components/TestPlanList.vue | 12 ++++++------ .../functional/FunctionalTestCaseList.vue | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/frontend/src/business/components/track/plan/components/TestPlanList.vue b/frontend/src/business/components/track/plan/components/TestPlanList.vue index f4a91e2075..8520991e82 100644 --- a/frontend/src/business/components/track/plan/components/TestPlanList.vue +++ b/frontend/src/business/components/track/plan/components/TestPlanList.vue @@ -61,18 +61,18 @@ - + {{ $t('test_track.plan.plan_status_prepare') }} - {{ $t('test_track.plan.plan_status_running') }} - {{ $t('test_track.plan.plan_status_finished') }} - {{ $t('test_track.plan.plan_status_completed') }} @@ -280,7 +280,7 @@ export default { }, currentPage: 1, pageSize: 10, - isTestManagerOrTestUser: false, + hasEditPermission: false, total: 0, tableData: [], screenHeight: 'calc(100vh - 295px)', @@ -309,7 +309,7 @@ export default { if (!this.projectId) { this.projectId = this.$store.state.projectId; } - this.isTestManagerOrTestUser = true; + this.hasEditPermission = hasPermission('PROJECT_TRACK_PLAN:READ+EDIT'); this.initTableData(); }, methods: { diff --git a/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue b/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue index d0b995bf7a..e4b85114f3 100644 --- a/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue @@ -178,18 +178,18 @@ - + {{ $t('test_track.plan_view.pass') }} - {{ $t('test_track.plan_view.failure') }} - {{ $t('test_track.plan_view.blocking') }} - + {{ $t('test_track.plan_view.skip') }} @@ -264,7 +264,7 @@ import { TokenKey, WORKSPACE_ID } from "@/common/js/constants"; -import {hasRoles} from "@/common/js/utils"; +import {hasPermission} from "@/common/js/utils"; import PriorityTableItem from "../../../../common/tableItems/planview/PriorityTableItem"; import StatusTableItem from "../../../../common/tableItems/planview/StatusTableItem"; import TypeTableItem from "../../../../common/tableItems/planview/TypeTableItem"; @@ -331,7 +331,7 @@ export default { selectRows: new Set(), testPlan: {}, isReadOnly: false, - isTestManagerOrTestUser: false, + hasEditPermission: false, priorityFilters: [ {text: 'P0', value: 'P0'}, {text: 'P1', value: 'P1'}, @@ -419,7 +419,7 @@ export default { this.$refs.testPlanTestCaseEdit.openTestCaseEdit(row); }); this.refreshTableAndPlan(); - this.isTestManagerOrTestUser = true; + this.hasEditPermission = hasPermission('PROJECT_TRACK_PLAN:READ+EDIT'); this.getMaintainerOptions(); }, beforeDestroy() { @@ -494,7 +494,7 @@ export default { }); }, showDetail(row, event, column) { - this.isReadOnly = !this.isTestManagerOrTestUser; + this.isReadOnly = !this.hasEditPermission; this.$refs.testPlanTestCaseEdit.openTestCaseEdit(row); }, refresh() {