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})",