diff --git a/frontend/src/business/components/track/case/components/TestCaseEdit.vue b/frontend/src/business/components/track/case/components/TestCaseEdit.vue index 7a0494f88c..a4898f920a 100644 --- a/frontend/src/business/components/track/case/components/TestCaseEdit.vue +++ b/frontend/src/business/components/track/case/components/TestCaseEdit.vue @@ -28,7 +28,7 @@ :current-project-id="currentProjectId" @compare="compare" @checkout="checkout" @create="create" @del="del"/> + @command="handleCommand" size="small" style="float: right;margin-right: 20px" :disabled="readOnly"> {{ $t('commons.save') }} {{ @@ -925,8 +925,13 @@ export default { }, createCtrlSHandle(event) { let curTabId = this.$store.state.curTabId; - if (curTabId === this.tabId) + if (curTabId === this.tabId) { + if (event.keyCode === 83 && event.ctrlKey && this.readOnly) { + this.$warning(this.$t("commons.no_operation_permission")); + return false; + } handleCtrlSEvent(event, this.saveCase); + } }, saveFollow() { if (this.showFollow) { diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 45ca7c11a7..b0fabdc7be 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -397,6 +397,7 @@ export default { end_time_cannot_over_than_start_time: "End time cannot before than start time", }, }, + no_operation_permission: "No operation permission!", enterprise_edition: "ENTERPRISE", open_source_version: "OPEN-SOURCE", function_planning: "The function is being planned...", diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index d0d54d231d..d8a5e6c35f 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -398,6 +398,7 @@ export default { end_time_cannot_over_than_start_time: "结束时间不能超过当前时间", }, }, + no_operation_permission: "无操作权限!", enterprise_edition: "企业版", open_source_version: "开源版", function_planning: "功能正在规划中...", diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index 250ff1e724..2c8fdb48f6 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -398,6 +398,7 @@ export default { end_time_cannot_over_than_start_time: "結束時間不能超過當前時間", }, }, + no_operation_permission: "無操作權限!", enterprise_edition: "企業版", open_source_version: "開源版", function_planning: "功能正在規劃中...",