From 14dc4b664b85f232ab8b84dd2991591fbb06ab8f Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Tue, 20 Jun 2023 11:35:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=B5=8B=E8=AF=95=E6=B7=BB=E5=8A=A0=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=9D=83=E9=99=90=E6=A0=A1=E9=AA=8C=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1027188 --user=宋昌昌 【性能测试】项目成员勾选创建性能测试权限,创建测试页面置灰 https://www.tapd.cn/55049933/s/1383671 --- .../frontend/src/business/test/PerformanceTestList.vue | 5 +++++ performance-test/frontend/src/i18n/lang/en-US.js | 3 ++- performance-test/frontend/src/i18n/lang/zh-CN.js | 3 ++- performance-test/frontend/src/i18n/lang/zh-TW.js | 3 ++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/performance-test/frontend/src/business/test/PerformanceTestList.vue b/performance-test/frontend/src/business/test/PerformanceTestList.vue index 2fe610508d..eebfa60f4e 100644 --- a/performance-test/frontend/src/business/test/PerformanceTestList.vue +++ b/performance-test/frontend/src/business/test/PerformanceTestList.vue @@ -142,6 +142,7 @@ import { } from "@/api/performance"; import {getProjectVersions, isProjectVersionEnable} from "metersphere-frontend/src/api/version"; +import {hasPermission} from "metersphere-frontend/src/utils/permission" export default { components: { @@ -375,6 +376,10 @@ export default { this.$warning(this.$t('commons.check_project_tip')); return; } + if (!hasPermission('PROJECT_PERFORMANCE_TEST:READ+EDIT')) { + this.$warning(this.$t('performance_test.edit_performance_test_tips')); + return; + } this.$router.push('/performance/test/create'); }, getVersionOptions(currentVersion) { diff --git a/performance-test/frontend/src/i18n/lang/en-US.js b/performance-test/frontend/src/i18n/lang/en-US.js index e52454f8c4..918cc503b1 100644 --- a/performance-test/frontend/src/i18n/lang/en-US.js +++ b/performance-test/frontend/src/i18n/lang/en-US.js @@ -10,7 +10,8 @@ const message = { }, max_current_threads_tips: 'Exceeded the maximum concurrent number of this node {0}', sync_scenario_no_permission_tips: 'No permission to create the scenario cannot perform synchronization', - basic_config_file_limit_tip: 'Note: The maximum number of resource files is limited to 10' + basic_config_file_limit_tip: 'Note: The maximum number of resource files is limited to 10', + edit_performance_test_tips: 'No permission to edit test, please check it before operation' } } export default { diff --git a/performance-test/frontend/src/i18n/lang/zh-CN.js b/performance-test/frontend/src/i18n/lang/zh-CN.js index d5d78a9a3f..3e387171e6 100644 --- a/performance-test/frontend/src/i18n/lang/zh-CN.js +++ b/performance-test/frontend/src/i18n/lang/zh-CN.js @@ -10,7 +10,8 @@ const message = { }, max_current_threads_tips: '超出此节点{0}最大并发数', sync_scenario_no_permission_tips: '没有创建接口的权限无法执行同步', - basic_config_file_limit_tip: '注:资源文件数最大限制为10个' + basic_config_file_limit_tip: '注:资源文件数最大限制为10个', + edit_performance_test_tips: '没有编辑性能测试的权限,请勾选后再操作' } } diff --git a/performance-test/frontend/src/i18n/lang/zh-TW.js b/performance-test/frontend/src/i18n/lang/zh-TW.js index 06941ac64c..565243d0d6 100644 --- a/performance-test/frontend/src/i18n/lang/zh-TW.js +++ b/performance-test/frontend/src/i18n/lang/zh-TW.js @@ -10,7 +10,8 @@ const message = { }, max_current_threads_tips: '超出此節點{0}最大並發數', sync_scenario_no_permission_tips: '沒有创建接口的權限無法執行同步', - basic_config_file_limit_tip: '注:資源文件數最大限制為10個' + basic_config_file_limit_tip: '注:資源文件數最大限制為10個', + edit_performance_test_tips: '沒有編輯性能測試的權限,請勾選後再操作' } }