From c69528cd8151bf8755a96493da943391f9f07296 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Thu, 20 May 2021 16:48:28 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=9D=83=E9=99=90=E7=AE=A1=E7=90=86):?= =?UTF-8?q?=20=E5=A4=84=E7=90=86=E5=86=B2=E7=AA=81track=20header=20menu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/api/head/ApiHeaderMenus.vue | 8 +-- .../components/common/head/CreateTest.vue | 4 +- .../components/common/head/HeaderTopMenus.vue | 9 +-- .../components/common/head/ProjectSwitch.vue | 6 +- .../head/PerformanceHeaderMenus.vue | 6 +- .../components/settings/SettingMenu.vue | 21 +++--- .../settings/workspace/WorkspaceMember.vue | 2 +- frontend/src/business/permission.js | 4 +- frontend/src/common/js/utils.js | 65 ++++++++++++++++++- 9 files changed, 95 insertions(+), 30 deletions(-) diff --git a/frontend/src/business/components/api/head/ApiHeaderMenus.vue b/frontend/src/business/components/api/head/ApiHeaderMenus.vue index 68275d6e10..45bd639abb 100644 --- a/frontend/src/business/components/api/head/ApiHeaderMenus.vue +++ b/frontend/src/business/components/api/head/ApiHeaderMenus.vue @@ -25,18 +25,18 @@ + v-roles="['test_manager','test_user','test_viewer']" index="4"> - + v-roles="['test_manager','test_user','test_viewer']" index="5"> @@ -45,7 +45,7 @@ + v-roles="['test_manager','test_user','test_viewer']" :index="'/api/monitor/view'"> {{ $t('commons.monitor') }} diff --git a/frontend/src/business/components/common/head/CreateTest.vue b/frontend/src/business/components/common/head/CreateTest.vue index c01577b02c..64a7077ddb 100644 --- a/frontend/src/business/components/common/head/CreateTest.vue +++ b/frontend/src/business/components/common/head/CreateTest.vue @@ -1,6 +1,6 @@ diff --git a/frontend/src/business/components/common/head/HeaderTopMenus.vue b/frontend/src/business/components/common/head/HeaderTopMenus.vue index 02b8e1694e..24e5ad64af 100644 --- a/frontend/src/business/components/common/head/HeaderTopMenus.vue +++ b/frontend/src/business/components/common/head/HeaderTopMenus.vue @@ -9,19 +9,20 @@ :key="menuKey" router> - + {{ $t('test_track.test_track') }} + v-permission="['PROJECT_API_DEFINITION:READ','PROJECT_API_SCENARIO:READ','PROJECT_API_REPORT:READ']"> {{ $t('commons.api') }} + v-permission="['PROJECT_PERFORMANCE_TEST:READ','PROJECT_PERFORMANCE_REPORT:READ']"> {{ $t('commons.performance') }} - {{ $t('commons.report_statistics.title') }} diff --git a/frontend/src/business/components/common/head/ProjectSwitch.vue b/frontend/src/business/components/common/head/ProjectSwitch.vue index 3c5b9ad97e..554e894657 100644 --- a/frontend/src/business/components/common/head/ProjectSwitch.vue +++ b/frontend/src/business/components/common/head/ProjectSwitch.vue @@ -2,15 +2,15 @@ Placeholder - + - + {{ $t("project.create") }} diff --git a/frontend/src/business/components/performance/head/PerformanceHeaderMenus.vue b/frontend/src/business/components/performance/head/PerformanceHeaderMenus.vue index 38af91329b..8c890917ee 100644 --- a/frontend/src/business/components/performance/head/PerformanceHeaderMenus.vue +++ b/frontend/src/business/components/performance/head/PerformanceHeaderMenus.vue @@ -8,17 +8,17 @@ {{ $t("i18n.home") }} - - - diff --git a/frontend/src/business/components/settings/SettingMenu.vue b/frontend/src/business/components/settings/SettingMenu.vue index 97f96668d0..b4b59b9250 100644 --- a/frontend/src/business/components/settings/SettingMenu.vue +++ b/frontend/src/business/components/settings/SettingMenu.vue @@ -1,6 +1,6 @@