|
@@ -15,8 +15,8 @@ const formatRouter = (list) => {
|
|
|
let arr = [];
|
|
let arr = [];
|
|
|
for (const p of list) {
|
|
for (const p of list) {
|
|
|
if (p.menuType === 2) {
|
|
if (p.menuType === 2) {
|
|
|
- p.children = [];
|
|
|
|
|
authorities.push(p);
|
|
authorities.push(p);
|
|
|
|
|
+ p.hide = true;
|
|
|
} else {
|
|
} else {
|
|
|
//报表菜单 source = 2 为报表时 extend 为报表id
|
|
//报表菜单 source = 2 为报表时 extend 为报表id
|
|
|
if (p.source === 2 && p.extend) {
|
|
if (p.source === 2 && p.extend) {
|
|
@@ -68,7 +68,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 设置登录用户的权限
|
|
// 设置登录用户的权限
|
|
|
setAuthorities(state, authorities) {
|
|
setAuthorities(state, authorities) {
|
|
|
- state.authorities = authorities;
|
|
|
|
|
|
|
+ state.authorities = authorities.map((item) => item.permissionCode);
|
|
|
},
|
|
},
|
|
|
// 设置登录用户的权限路由
|
|
// 设置登录用户的权限路由
|
|
|
setAuthoritiesRouter(state, authoritiesRouter) {
|
|
setAuthoritiesRouter(state, authoritiesRouter) {
|