From fbb6ceb1893e0106b7248308fe779cb5931d0a8b Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Mon, 4 Nov 2024 16:52:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=94=A8=E4=BE=8B=E8=AF=84=E5=AE=A1):=20?= =?UTF-8?q?=20=E9=99=84=E4=BB=B6=E7=9A=84=E6=96=87=E4=BB=B6=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=E9=99=90=E5=88=B6=E5=89=8D=E7=AB=AF=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E8=AF=AD=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1047315 --user=宋昌昌 【用例评审】评审的用例详情中,附件标签页显示的文件大小限制取值错误,测试计划中也存在相同问题 https://www.tapd.cn/55049933/s/1605442 --- .../frontend/src/business/system/components/UserImport.vue | 2 +- system-setting/frontend/src/i18n/lang/en-US.js | 3 ++- system-setting/frontend/src/i18n/lang/zh-CN.js | 3 ++- system-setting/frontend/src/i18n/lang/zh-TW.js | 3 ++- .../src/business/case/components/TestCaseEditOtherInfo.vue | 6 +++++- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/system-setting/frontend/src/business/system/components/UserImport.vue b/system-setting/frontend/src/business/system/components/UserImport.vue index 33a7e102af..edd8b1ae32 100644 --- a/system-setting/frontend/src/business/system/components/UserImport.vue +++ b/system-setting/frontend/src/business/system/components/UserImport.vue @@ -86,7 +86,7 @@ export default { return false; } if (file.size / 1024 / 1024 > this.uploadSize) { - this.$warning(this.$t('commons.upload_limit_size')); + this.$warning(this.$t('system_user.upload_limit_size_warn')); return false; } this.isLoading = true; diff --git a/system-setting/frontend/src/i18n/lang/en-US.js b/system-setting/frontend/src/i18n/lang/en-US.js index be7fcb1268..0f58eb03b9 100644 --- a/system-setting/frontend/src/i18n/lang/en-US.js +++ b/system-setting/frontend/src/i18n/lang/en-US.js @@ -5,7 +5,8 @@ import mf from "metersphere-frontend/src/i18n/lang/en-US" const message = { user: { search_get_more_tip: 'Search for other options', - remove_group_tip: 'Have at least one user group permission' + remove_group_tip: 'Have at least one user group permission', + upload_limit_size_warn: 'Upload file size cannot exceed {0} MB!', }, system: { environment_import_repeat_tip: "(Environment configuration with the same name filtered {0})", diff --git a/system-setting/frontend/src/i18n/lang/zh-CN.js b/system-setting/frontend/src/i18n/lang/zh-CN.js index f5bd8ae716..c828a3233d 100644 --- a/system-setting/frontend/src/i18n/lang/zh-CN.js +++ b/system-setting/frontend/src/i18n/lang/zh-CN.js @@ -5,7 +5,8 @@ import mf from "metersphere-frontend/src/i18n/lang/zh-CN" const message = { system_user: { search_get_more_tip: '搜索获取其他选项', - remove_group_tip: '至少拥有一个用户组权限' + remove_group_tip: '至少拥有一个用户组权限', + upload_limit_size_warn: '上传文件大小不能超过 {0} MB!', }, system: { environment_import_repeat_tip: "(已过滤同名称的环境配置 {0})", diff --git a/system-setting/frontend/src/i18n/lang/zh-TW.js b/system-setting/frontend/src/i18n/lang/zh-TW.js index 9c8a44f4e0..464ca777c2 100644 --- a/system-setting/frontend/src/i18n/lang/zh-TW.js +++ b/system-setting/frontend/src/i18n/lang/zh-TW.js @@ -5,7 +5,8 @@ import mf from "metersphere-frontend/src/i18n/lang/zh-TW" const message = { user: { search_get_more_tip: '搜索獲取其他選項', - remove_group_tip: '至少擁有一個用戶組權限' + remove_group_tip: '至少擁有一個用戶組權限', + upload_limit_size_warn: '上傳文件大小不能超過 {0} MB!', }, system: { environment_import_repeat_tip: "(已過濾同名稱的環境配置 {0})", diff --git a/test-track/frontend/src/business/case/components/TestCaseEditOtherInfo.vue b/test-track/frontend/src/business/case/components/TestCaseEditOtherInfo.vue index b30e6c449f..7a39a21af0 100644 --- a/test-track/frontend/src/business/case/components/TestCaseEditOtherInfo.vue +++ b/test-track/frontend/src/business/case/components/TestCaseEditOtherInfo.vue @@ -85,7 +85,7 @@
- {{ $t('test_track.case.upload_tip') }} + {{ $t("test_track.case.upload_tip", [0, uploadSize]) }}
@@ -168,6 +168,7 @@ import {byteToSize, getCurrentUser, getTypeByFileName, hasPermission} from "@/bu import axios from "axios"; import MsFileMetadataList from "metersphere-frontend/src/components/environment/commons/variable/QuoteFileList"; import MsFileBatchMove from "metersphere-frontend/src/components/environment/commons/variable/FileBatchMove"; +import {getUploadSizeLimit} from "metersphere-frontend/src/utils/index"; export default { name: "TestCaseEditOtherInfo", @@ -216,6 +217,9 @@ export default { }, hasProjectFilePermission() { return hasPermission("PROJECT_FILE:READ"); + }, + uploadSize() { + return getUploadSizeLimit(); } }, watch: {