diff --git a/project-management/frontend/src/business/head/ProjectHeaderMenus.vue b/project-management/frontend/src/business/head/ProjectHeaderMenus.vue index 33b1153c8e..169bea4c54 100644 --- a/project-management/frontend/src/business/head/ProjectHeaderMenus.vue +++ b/project-management/frontend/src/business/head/ProjectHeaderMenus.vue @@ -23,7 +23,54 @@ popper-class="submenu"> {{ $t('project.file_manage') }} - + + {{ $t("error_report_library.name") }} + + + {{ $t('workspace.template_manage') }} + + + {{ $t("organization.message_settings") }} + + + {{ $t('project.log') }} + + + {{ $t('project.version_manage') }} + + + {{ $t('project.app_manage') }} + + + {{ $t('project.code_segment.code_segment') }} + + @@ -68,6 +115,7 @@ import ProjectSwitch from "metersphere-frontend/src/components/head/ProjectSwitc import {hasLicense} from "metersphere-frontend/src/utils/permission"; import MsHeaderRightMenus from "metersphere-frontend/src/components/layout/HeaderRightMenus"; import {PROJECT_NAME} from "metersphere-frontend/src/utils/constants"; +import {hasPermission} from "metersphere-frontend/src/utils/permission"; export default { name: "ProjectHeaderMenus", @@ -76,8 +124,31 @@ export default { return { currentProject: sessionStorage.getItem(PROJECT_NAME), pathName: '', + showMenu: true }; }, + mounted() { + let menuCount = 0; + let permissions = [ + 'PROJECT_APP_MANAGER:READ+EDIT', + 'PROJECT_MESSAGE:READ', + 'PROJECT_OPERATING_LOG:READ', + 'PROJECT_CUSTOM_CODE:READ', + 'PROJECT_TEMPLATE:READ', + 'PROJECT_VERSION:READ', + 'PROJECT_ERROR_REPORT_LIBRARY:READ', + ]; + for (let permission of permissions) { + // 更多选项中菜单数量小于3个时,不显示更多选项 + if (menuCount >= 3) { + this.showMenu = false; + break; + } + if (hasPermission(permission)) { + menuCount++; + } + } + }, watch: { '$route': { immediate: true, diff --git a/system-setting/frontend/src/business/system/group/GroupMember.vue b/system-setting/frontend/src/business/system/group/GroupMember.vue index 9d82f27f90..8515cef9c5 100644 --- a/system-setting/frontend/src/business/system/group/GroupMember.vue +++ b/system-setting/frontend/src/business/system/group/GroupMember.vue @@ -375,7 +375,7 @@ export default { this.handleResourceOption(queryString ? this.sourceDataCopy.filter(this.createFilter(queryString)) : this.sourceDataCopy); }, createFilter(queryString) { - return item => (item.name.toLowerCase().indexOf(queryString.toLowerCase()) !== -1); + return item => (item.name && item.name.toLowerCase().indexOf(queryString.toLowerCase()) !== -1); }, resetUserOption(val) { if (val) {