四好公路
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
909 B

3 years ago
import React from 'react';
import { Link } from 'react-router-dom';
import { Menu } from 'antd';
import { SettingOutlined } from '@ant-design/icons';
import { Func } from '$utils';
import { push } from 'react-router-redux';
const SubMenu = Menu.SubMenu;
export function getNavItem(user, dispatch) {
if (!Func.isAuthorized("ORG_MANAGE")) {
return null
}
// console.log(!Func.isAuthorized("ORG_MANAGE"));
if (user.type != 1 && user.type != 2 && user.type != 3) {
dispatch(push('/fillion/infor'));
return null
}
return (
<SubMenu key="organization" icon={<SettingOutlined />} title={'授权管理'}>
3 years ago
{Func.isAuthorized("ORG_MEMBER") && <Menu.Item key="userManage">
<Link to="/organization/user">用户管理</Link>
</Menu.Item>
}
3 years ago
</SubMenu>
);
}