From 725d86a23a09c53aabd3558fcb5b7f34ea330f4d Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Tue, 18 Jan 2022 10:57:27 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B=E6=9D=83=E9=99=90=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1009648 --user=lyh [系统设置]-github-#9151 权限设置项目成员不允许修改测试用例的情况下,用例状态,责任人,等级,都可以修改,而且页面输入 Ctrl + S 还能保存用例 https://www.tapd.cn/55049933/s/1093136 --- .../components/track/case/components/TestCaseEdit.vue | 9 +++++++-- frontend/src/i18n/en-US.js | 1 + frontend/src/i18n/zh-CN.js | 1 + frontend/src/i18n/zh-TW.js | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) 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: "功能正在規劃中...",