diff --git a/src/resources/api/common/index.js b/src/resources/api/common/index.js index 57848803e36a442759b994dba4a0982234fa8e73..3a0b77b38d171a26c25b961e2190db9b9c5b3969 100644 --- a/src/resources/api/common/index.js +++ b/src/resources/api/common/index.js @@ -160,7 +160,7 @@ const common = { }, // 获取报表实例列表 updateReportMenu(params) { - return axios.post('/api/rest/reportinstance/search', params); + return axios.post('/api/rest/reportinstance/list', params); }, // 获取CMDB的模型类型和模型列表 updateCmdbMenu(params) { diff --git a/src/resources/store/modules/topMenu.js b/src/resources/store/modules/topMenu.js index b05e1e944350c613ff12669758a5c7a9983049f7..8849e03e579ff618a1a37891271d7407a2b4ba88 100644 --- a/src/resources/store/modules/topMenu.js +++ b/src/resources/store/modules/topMenu.js @@ -71,7 +71,7 @@ const actions = { const authorizedMenuList = getMenuList(routerConfig[moduleId], userAuthList, moduleId); const menuGroupList = sortMenuList(authorizedMenuList, moduleId, menuConfigList); if (routerConfig[moduleId]) { - const hasAuthorizedDynamicMenu = routerConfig[moduleId].some(route => route.meta && route.meta.istitle && userAuthList.length > 0 && userAuthList.includes(route.meta.authority)); + const hasAuthorizedDynamicMenu = routerConfig[moduleId].some(route => route.meta && route.meta.istitle && userAuthList.length > 0 && hasAuthNoMenu(route, userAuthList)); if (((hasAuthorizedDynamicMenu || authorizedMenuList.length > 0) && !showModuleList) || (showModuleList && (hasAuthorizedDynamicMenu || authorizedMenuList.length > 0) && showModuleList.indexOf(moduleId) > -1 && userAuthList.length > 0)) { //有权限菜单的模块才让显示 moduleList.push({ moduleId, moduleName, menuGroupList, description, isDefault, defaultPage }); @@ -104,7 +104,7 @@ const actions = { } const res = await commonApi.updateProcessMenu({ isAll: 0 }); if (!res.Return || !res.Return.workcenterList || res.Return.workcenterList.length === 0) return; - const processType = res.Return.workcenterList.map(type => ({ + const processType = res.Return.workcenterList.slice(0, 6).map(type => ({ name: type.name, path: `/task-overview-${type.uuid}`, url: `/task-overview-${type.uuid}`, @@ -178,8 +178,8 @@ const actions = { return; } const res = await commonApi.updateReportMenu({ pageSize: 6 }); - if (res.Return.tbodyList.length === 0) return; - const reportInstanceList = res.Return.tbodyList.map(item => ({ + if (res.Return && res.Return.length === 0) return; + const reportInstanceList = res.Return.slice(0, 6).map(item => ({ name: item.name, path: '/reportinstance-show/' + item.id, icon: 'tsfont-report' diff --git a/src/views/pages/framework/router.js b/src/views/pages/framework/router.js index 1ae1ff69ed40786b478ea04c83b562267cc45de2..1e74ce6e0f21c691d0ff09fe4ac44ecf4ba0550c 100644 --- a/src/views/pages/framework/router.js +++ b/src/views/pages/framework/router.js @@ -544,7 +544,7 @@ export default [ title: $t('router.framework.auditmanage'), ismenu: true, icon: 'tsfont-center', - authority: 'INTERFACE_MODIFY', + authority: 'API_AUDIT_VIEW', type: 'others' } }, @@ -676,7 +676,7 @@ export default [ title: $t('router.framework.licensemanage'), ismenu: true, icon: 'tsfont-plugin', - authority: 'ADMIN', + authority: 'LICENSE_MODIFY', type: 'license' } }, diff --git a/src/views/pages/framework/users/user-manage.vue b/src/views/pages/framework/users/user-manage.vue index 58c52ae636723792e0641fa9e6ee3bb68cc90905..5cca782a995cd01fa7759346de6c52cdf2e5b694 100644 --- a/src/views/pages/framework/users/user-manage.vue +++ b/src/views/pages/framework/users/user-manage.vue @@ -7,8 +7,8 @@ {{ $t('page.batchdelete') }} -
- +
+