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.
28 lines
1.2 KiB
28 lines
1.2 KiB
import React from 'react';
|
|
import { Link } from 'react-router-dom';
|
|
import { Menu } from 'antd';
|
|
import { SettingOutlined } from '@ant-design/icons';
|
|
import { Func } from '$utils';
|
|
const SubMenu = Menu.SubMenu;
|
|
|
|
export function getNavItem (user, dispatch) {
|
|
// if (!Func.isAuthorized("ORG_MANAGE")) {
|
|
// return null
|
|
// }
|
|
return (
|
|
Func.isAuthorized('PATROL_MANAGE') && <SubMenu key="patrolManage" icon={<SettingOutlined />} title={'巡检管理'}>
|
|
{Func.isAuthorized('PATROL_PLAN_CONFIG') && <Menu.Item key="patrolPlan">
|
|
<Link to="/patrolManage/patrolPlan">巡检计划制定</Link>
|
|
</Menu.Item>}
|
|
{Func.isAuthorized('PATROL_RECORD_VIEW') && <Menu.Item key="patrolRecord">
|
|
<Link to="/patrolManage/patrolRecord">巡检记录</Link>
|
|
</Menu.Item>}
|
|
{Func.isAuthorized('CHECKITEMSET') && <Menu.Item key="checkItems">
|
|
<Link to="/patrolManage/checkItems">检查项设定</Link>
|
|
</Menu.Item>}
|
|
{Func.isAuthorized('CHECKMOULD') && <Menu.Item key="patrolTemplate">
|
|
<Link to="/patrolManage/patrolTemplate">巡检模板</Link>
|
|
</Menu.Item>}
|
|
</SubMenu>
|
|
);
|
|
}
|