|
|
@ -4,15 +4,15 @@ import { Menu } from 'antd'; |
|
|
|
import { CarryOutOutlined } from '@ant-design/icons'; |
|
|
|
const SubMenu = Menu.SubMenu; |
|
|
|
|
|
|
|
export function getNavItem() { |
|
|
|
return ( |
|
|
|
<SubMenu key="resourceConsumption" icon={<CarryOutOutlined />} title='资源消费'> |
|
|
|
<Menu.Item key="approve"> |
|
|
|
<Link to="/resourceConsumption/approve">数据消费审批</Link> |
|
|
|
</Menu.Item> |
|
|
|
<Menu.Item key="myApplication"> |
|
|
|
<Link to="/resourceConsumption/myApplication">我的数据消费申请</Link> |
|
|
|
</Menu.Item> |
|
|
|
</ SubMenu > |
|
|
|
); |
|
|
|
export function getNavItem (user) { |
|
|
|
return ( |
|
|
|
<SubMenu key="resourceConsumption" icon={<CarryOutOutlined />} title='资源消费'> |
|
|
|
{user?.role == '系统管理员' && <Menu.Item key="approve"> |
|
|
|
<Link to="/resourceConsumption/approve">数据消费审批</Link> |
|
|
|
</Menu.Item>} |
|
|
|
{user?.role == '数据消费者' &&<Menu.Item key="myApplication"> |
|
|
|
<Link to="/resourceConsumption/myApplication">我的申请</Link> |
|
|
|
</Menu.Item>} |
|
|
|
</ SubMenu > |
|
|
|
); |
|
|
|
} |