From 8a9f1264738a7e229614f4129e88bfc4c01b7c0a Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Fri, 10 Feb 2023 14:45:35 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):?= =?UTF-8?q?=20=E7=BC=96=E8=BE=91=E7=94=A8=E6=88=B7=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=9C=80=E5=90=8E=E6=89=80=E5=B1=9E=E7=94=A8=E6=88=B7=E7=BB=84?= =?UTF-8?q?=E6=97=B6=E8=BF=9B=E8=A1=8C=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frontend/src/business/system/user/EditUser.vue | 6 +++++- 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 ++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/system-setting/frontend/src/business/system/user/EditUser.vue b/system-setting/frontend/src/business/system/user/EditUser.vue index 1d378b2045..9bfb6d3aff 100644 --- a/system-setting/frontend/src/business/system/user/EditUser.vue +++ b/system-setting/frontend/src/business/system/user/EditUser.vue @@ -39,7 +39,7 @@ > - + {{ $t('commons.delete') }} @@ -234,6 +234,10 @@ export default { }) }, removeGroup(item) { + if (this.form.groups.length === 1) { + this.$info(this.$t('system_user.remove_group_tip')); + return; + } let index = this.form.groups.indexOf(item); let isRemove = this.checkRemove(item, index); if (!isRemove) { diff --git a/system-setting/frontend/src/i18n/lang/en-US.js b/system-setting/frontend/src/i18n/lang/en-US.js index 66f9191e6d..50631fd5f3 100644 --- a/system-setting/frontend/src/i18n/lang/en-US.js +++ b/system-setting/frontend/src/i18n/lang/en-US.js @@ -4,7 +4,8 @@ import mf from "metersphere-frontend/src/i18n/lang/en-US" const message = { user: { - search_get_more_tip: 'Search for other options' + search_get_more_tip: 'Search for other options', + remove_group_tip: 'Have at least one user group permission' }, 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 c4880b7964..9ae20fecfd 100644 --- a/system-setting/frontend/src/i18n/lang/zh-CN.js +++ b/system-setting/frontend/src/i18n/lang/zh-CN.js @@ -4,7 +4,8 @@ import mf from "metersphere-frontend/src/i18n/lang/zh-CN" const message = { system_user: { - search_get_more_tip: '搜索获取其他选项' + search_get_more_tip: '搜索获取其他选项', + remove_group_tip: '至少拥有一个用户组权限' }, 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 7f1791fca7..7efd23d426 100644 --- a/system-setting/frontend/src/i18n/lang/zh-TW.js +++ b/system-setting/frontend/src/i18n/lang/zh-TW.js @@ -4,7 +4,8 @@ import mf from "metersphere-frontend/src/i18n/lang/zh-TW" const message = { user: { - search_get_more_tip: '搜索獲取其他選項' + search_get_more_tip: '搜索獲取其他選項', + remove_group_tip: '至少擁有一個用戶組權限' }, system: { environment_import_repeat_tip: "(已過濾同名稱的環境配置 {0})",