diff --git a/framework/sdk-parent/frontend/src/store/modules/user.js b/framework/sdk-parent/frontend/src/store/modules/user.js index 6bfe1168a3..c30ae8899e 100644 --- a/framework/sdk-parent/frontend/src/store/modules/user.js +++ b/framework/sdk-parent/frontend/src/store/modules/user.js @@ -89,7 +89,6 @@ export default { if (res && res.code === 'ECONNABORTED') { return; } - clearSessionStorage() reject(res) }) }); diff --git a/performance-test/frontend/src/business/test/EditPerformanceTest.vue b/performance-test/frontend/src/business/test/EditPerformanceTest.vue index 88e8f35765..30d94e1e0d 100644 --- a/performance-test/frontend/src/business/test/EditPerformanceTest.vue +++ b/performance-test/frontend/src/business/test/EditPerformanceTest.vue @@ -416,6 +416,10 @@ export default { return formData; }, syncScenario() { + if (!hasPermission('PROJECT_API_SCENARIO:READ')) { + this.$warning(this.$t('performance_test.sync_scenario_no_permission_tips')); + return; + } let param = { id: this.test.id, scenarioId: this.test.scenarioId @@ -423,7 +427,7 @@ export default { syncScenario(param) .then(() => { this.getTest(this.$route.params.testId); - this.$success('更新成功'); + this.$success('commons.save_success'); }); }, cancel() { diff --git a/performance-test/frontend/src/i18n/lang/en-US.js b/performance-test/frontend/src/i18n/lang/en-US.js index 5d436b7357..c98699a03a 100644 --- a/performance-test/frontend/src/i18n/lang/en-US.js +++ b/performance-test/frontend/src/i18n/lang/en-US.js @@ -7,7 +7,8 @@ const message = { report: { test_duration: '{0} hours {1} minutes {2} seconds', test_duration_tips: 'Execution Time:{0} hours {1} minutes {2} seconds', - } + }, + sync_scenario_no_permission_tips: 'No permission to view the interface cannot perform synchronization', } } 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 6ef7a0d631..1029e88686 100644 --- a/performance-test/frontend/src/i18n/lang/zh-CN.js +++ b/performance-test/frontend/src/i18n/lang/zh-CN.js @@ -7,7 +7,8 @@ const message = { report: { test_duration: '{0}时{1}分{2}秒', test_duration_tips: '执行时长:{0}时{1}分{2}秒', - } + }, + sync_scenario_no_permission_tips: '没有查看接口的权限无法执行同步', } } diff --git a/performance-test/frontend/src/i18n/lang/zh-TW.js b/performance-test/frontend/src/i18n/lang/zh-TW.js index 5384d15238..666689f93d 100644 --- a/performance-test/frontend/src/i18n/lang/zh-TW.js +++ b/performance-test/frontend/src/i18n/lang/zh-TW.js @@ -7,7 +7,8 @@ const message = { report: { test_duration: '{0}時{1}分{2}秒', test_duration_tips: '執行時長:{0}時{1}分{2}秒', - } + }, + sync_scenario_no_permission_tips: '沒有查看接口的權限無法執行同步', } }