|
@ -4,117 +4,145 @@ import { Menu } from 'antd'; |
|
|
import { ReadOutlined } from '@ant-design/icons'; |
|
|
import { ReadOutlined } from '@ant-design/icons'; |
|
|
const SubMenu = Menu.SubMenu; |
|
|
const SubMenu = Menu.SubMenu; |
|
|
export function getNavItem (user, dispatch) { |
|
|
export function getNavItem (user, dispatch) { |
|
|
const isshow = user?.userResources?. |
|
|
const isshow = user?.userResources?. |
|
|
some(i => i.resourceId === 'OVERLOADMANAGE' || |
|
|
some(i => i.resourceId === 'OVERLOADMANAGE' || |
|
|
i.resourceId === 'ROADMANAGE' || |
|
|
i.resourceId === 'ROADMANAGE' || |
|
|
i.resourceId === 'BRIDGEMANAGE' || |
|
|
i.resourceId === 'BRIDGEMANAGE' || |
|
|
i.resourceId === 'MAINTENANCEMANAGE' || |
|
|
i.resourceId === 'MAINTENANCEMANAGE' || |
|
|
i.resourceId === 'TRANSPORTATIONMANAGE' || |
|
|
i.resourceId === 'TRANSPORTATIONMANAGE' || |
|
|
i.resourceId === 'CONSERVATIONMANAGE' || |
|
|
i.resourceId === 'CONSERVATIONMANAGE' || |
|
|
i.resourceId === 'PUBLICTRANSPORTMANAGE' || |
|
|
i.resourceId === 'PUBLICTRANSPORTMANAGE' || |
|
|
i.resourceId === 'FILEMANAGE' || |
|
|
i.resourceId === 'FILEMANAGE' || |
|
|
i.resourceId === 'PUBLICITYVIDEO' || |
|
|
i.resourceId === 'PUBLICITYVIDEO' || |
|
|
i.resourceId === 'FEEDBACKMANAGE' || |
|
|
i.resourceId === 'FEEDBACKMANAGE' || |
|
|
i.resourceId === 'REPORTMANAGE' || |
|
|
i.resourceId === 'REPORTMANAGE' || |
|
|
i.resourceId === 'PATROLMANAGE' || |
|
|
i.resourceId === 'PATROLMANAGE' || |
|
|
i.resourceId === 'ASSESSMANAGE' || |
|
|
i.resourceId === 'ASSESSMANAGE' || |
|
|
i.resourceId === 'VIDEOCENTER' || |
|
|
i.resourceId === 'VIDEOCENTER' || |
|
|
i.resourceId === 'BUILDINGPROJECT' || |
|
|
i.resourceId === 'BUILDINGPROJECT' || |
|
|
i.resourceId === 'MAINTENANCESPOTCHECK' || |
|
|
i.resourceId === 'MAINTENANCESPOTCHECK' || |
|
|
i.resourceId === 'LUZHENG' || |
|
|
i.resourceId === 'LUZHENG' || |
|
|
i.resourceId === 'ADJUSTLOG' |
|
|
i.resourceId === 'ADJUSTLOG' |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
user?.username == 'SuperAdmin' || isshow ? |
|
|
user?.username == 'SuperAdmin' || isshow ? |
|
|
<SubMenu key="fillion" icon={<ReadOutlined />} title={'数据管理'}> |
|
|
<SubMenu key="fillion" icon={<ReadOutlined />} title={'数据管理'}> |
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'OVERLOADMANAGE') ? |
|
|
{ |
|
|
|
|
|
user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'REPORTMANAGE' || i.resourceId === 'BUILDINGPROJECT' || i.resourceId === 'FILEMANAGE') ? |
|
|
|
|
|
<SubMenu key="build" title={'建设'}> |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'REPORTMANAGE') ? |
|
|
|
|
|
<Menu.Item key="fillionpatrolroad"> |
|
|
|
|
|
<Link to="/fillion/patrol_road">建设上报</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'BUILDINGPROJECT') ? |
|
|
|
|
|
<Menu.Item key="fillionbuilding"> |
|
|
|
|
|
<Link to="/fillion/processsing">在建项目</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'FILEMANAGE') ? |
|
|
|
|
|
<Menu.Item key="fileCont"> |
|
|
|
|
|
<Link to="/fillion/file">档案管理</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
</SubMenu> |
|
|
|
|
|
: '' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'VIDEOCENTER' || i.resourceId === 'LUZHENG' || i.resourceId === 'ROADMANAGE' || i.resourceId === 'BRIDGEMANAGE') ? |
|
|
|
|
|
<SubMenu key="manage" title={'管理'}> |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'VIDEOCENTER') ? |
|
|
|
|
|
<Menu.Item key="fillionvideoCenter"> |
|
|
|
|
|
<Link to="/fillion/videoCenter">视频中心</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'LUZHENG') ? |
|
|
|
|
|
<Menu.Item key="luzheng"> |
|
|
|
|
|
<Link to="/fillion/luzheng">路政管理</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'ROADMANAGE') ? |
|
|
|
|
|
<Menu.Item key="filliontransportation"> |
|
|
|
|
|
<Link to="/fillion/transportation">道路管理</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'BRIDGEMANAGE') ? |
|
|
|
|
|
<Menu.Item key="fillionbridge"> |
|
|
|
|
|
<Link to="/fillion/bridge">桥梁管理</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
</SubMenu> |
|
|
|
|
|
: '' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'MAINTENANCEMANAGE' || i.resourceId === 'PATROLMANAGE' || i.resourceId === 'FEEDBACKMANAGE' || i.resourceId === 'CONSERVATIONMANAGE' || i.resourceId === 'MAINTENANCESPOTCHECK' || i.resourceId === 'ADJUSTLOG' || i.resourceId === 'ASSESSMANAGE') ? |
|
|
|
|
|
<SubMenu key="conserve" title={'养护'}> |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'MAINTENANCEMANAGE') ? |
|
|
|
|
|
<Menu.Item key="fillionhighways"> |
|
|
|
|
|
<Link to="/fillion/highways">管养管理</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'PATROLMANAGE') ? |
|
|
|
|
|
<Menu.Item key="fillionpatrol"> |
|
|
|
|
|
<Link to="/fillion/patrol">巡查管理</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'FEEDBACKMANAGE') ? |
|
|
|
|
|
<Menu.Item key="fillionpatrolanomaly"> |
|
|
|
|
|
<Link to="/fillion/patrol_anomaly">异常反馈</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'CONSERVATIONMANAGE') ? |
|
|
|
|
|
<Menu.Item key="fillionmaintenance"> |
|
|
|
|
|
<Link to="/fillion/maintenance">养护管理</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'MAINTENANCESPOTCHECK') ? |
|
|
|
|
|
<Menu.Item key="maintenanceSpotCheck"> |
|
|
|
|
|
<Link to="/fillion/maintenanceSpotCheck">养护抽查</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'ADJUSTLOG') ? |
|
|
|
|
|
<Menu.Item key="adjustLog"> |
|
|
|
|
|
<Link to="/fillion/adjustLog">调整日志</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'ASSESSMANAGE') ? |
|
|
|
|
|
<Menu.Item key="fillionassess"> |
|
|
|
|
|
<Link to="/fillion/assess">考核评分</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
</SubMenu> |
|
|
|
|
|
: '' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'TRANSPORTATIONMANAGE' || i.resourceId === 'PUBLICTRANSPORTMANAGE') ? |
|
|
|
|
|
<SubMenu key="operation" title={'运营'}> |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'TRANSPORTATIONMANAGE') ? |
|
|
|
|
|
<Menu.Item key="fillionoperational"> |
|
|
|
|
|
<Link to="/fillion/operational">运政管理</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'PUBLICTRANSPORTMANAGE') ? |
|
|
|
|
|
<Menu.Item key="fillionpublic"> |
|
|
|
|
|
<Link to="/fillion/public">公交管理</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
</SubMenu> |
|
|
|
|
|
: '' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'OVERLOADMANAGE') ? |
|
|
<Menu.Item key="fillioninfor"> |
|
|
<Menu.Item key="fillioninfor"> |
|
|
<Link to="/fillion/infor">治超管理</Link> |
|
|
<Link to="/fillion/infor">治超管理</Link> |
|
|
</Menu.Item> : ''} |
|
|
</Menu.Item> : ''} |
|
|
{/* <Menu.Item key="filliontask"> |
|
|
{/* <Menu.Item key="filliontask"> |
|
|
<Link to="/fillion/task">任务管理</Link> |
|
|
<Link to="/fillion/task">任务管理</Link> |
|
|
</Menu.Item> */} |
|
|
</Menu.Item> */} |
|
|
|
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'LUZHENG') ? |
|
|
{/* <Menu.Item key="fillionenforce"> |
|
|
<Menu.Item key="luzheng"> |
|
|
|
|
|
<Link to="/fillion/luzheng">路政管理</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'ROADMANAGE') ? |
|
|
|
|
|
<Menu.Item key="filliontransportation"> |
|
|
|
|
|
<Link to="/fillion/transportation">道路管理</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'BRIDGEMANAGE') ? |
|
|
|
|
|
<Menu.Item key="fillionbridge"> |
|
|
|
|
|
<Link to="/fillion/bridge">桥梁管理</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'MAINTENANCEMANAGE') ? |
|
|
|
|
|
<Menu.Item key="fillionhighways"> |
|
|
|
|
|
<Link to="/fillion/highways">管养管理</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'TRANSPORTATIONMANAGE') ? |
|
|
|
|
|
<Menu.Item key="fillionoperational"> |
|
|
|
|
|
<Link to="/fillion/operational">运政管理</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{/* <Menu.Item key="fillionenforce"> |
|
|
|
|
|
<Link to="/fillion/enforce">执法管理</Link> |
|
|
<Link to="/fillion/enforce">执法管理</Link> |
|
|
</Menu.Item> */} |
|
|
</Menu.Item> */} |
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'CONSERVATIONMANAGE') ? |
|
|
|
|
|
<Menu.Item key="fillionmaintenance"> |
|
|
|
|
|
<Link to="/fillion/maintenance">养护管理</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'PATROLMANAGE') ? |
|
|
|
|
|
<Menu.Item key="fillionpatrol"> |
|
|
|
|
|
<Link to="/fillion/patrol">巡查管理</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'FEEDBACKMANAGE') ? |
|
|
|
|
|
<Menu.Item key="fillionpatrolanomaly"> |
|
|
|
|
|
<Link to="/fillion/patrol_anomaly">异常反馈</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'REPORTMANAGE') ? |
|
|
|
|
|
|
|
|
|
|
|
<Menu.Item key="fillionpatrolroad"> |
|
|
{/* <Menu.Item key="fillionvideois"> |
|
|
<Link to="/fillion/patrol_road">建设上报</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'BUILDINGPROJECT') ? |
|
|
|
|
|
<Menu.Item key="fillionbuilding"> |
|
|
|
|
|
<Link to="/fillion/processsing">在建项目</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'PUBLICTRANSPORTMANAGE') ? |
|
|
|
|
|
<Menu.Item key="fillionpublic"> |
|
|
|
|
|
<Link to="/fillion/public">公交管理</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'FILEMANAGE') ? |
|
|
|
|
|
<Menu.Item key="fileCont"> |
|
|
|
|
|
<Link to="/fillion/file">档案管理</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{/* <Menu.Item key="fillionvideois"> |
|
|
|
|
|
<Link to="/fillion/videois">视频管理</Link> |
|
|
<Link to="/fillion/videois">视频管理</Link> |
|
|
</Menu.Item> */} |
|
|
</Menu.Item> */} |
|
|
{/* <Menu.Item key="jiekouguanli"> |
|
|
{/* <Menu.Item key="jiekouguanli"> |
|
|
<Link to="/fillion/jiekouguanli">接口管理</Link> |
|
|
<Link to="/fillion/jiekouguanli">接口管理</Link> |
|
|
</Menu.Item> */} |
|
|
</Menu.Item> */} |
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'PUBLICITYVIDEO') ? |
|
|
|
|
|
<Menu.Item key="fillionpromotional"> |
|
|
|
|
|
<Link to="/fillion/promotional">宣传视频</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
|
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'ASSESSMANAGE') ? |
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'PUBLICITYVIDEO') ? |
|
|
<Menu.Item key="fillionassess"> |
|
|
<Menu.Item key="fillionpromotional"> |
|
|
<Link to="/fillion/assess">考核评分</Link> |
|
|
<Link to="/fillion/promotional">宣传视频</Link> |
|
|
</Menu.Item> : ''} |
|
|
</Menu.Item> : ''} |
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'VIDEOCENTER') ? |
|
|
</SubMenu> : null |
|
|
<Menu.Item key="fillionvideoCenter"> |
|
|
); |
|
|
<Link to="/fillion/videoCenter">视频中心</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'MAINTENANCESPOTCHECK') ? |
|
|
|
|
|
<Menu.Item key="maintenanceSpotCheck"> |
|
|
|
|
|
<Link to="/fillion/maintenanceSpotCheck">养护抽查</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'ADJUSTLOG') ? |
|
|
|
|
|
<Menu.Item key="adjustLog"> |
|
|
|
|
|
<Link to="/fillion/adjustLog">调整日志</Link> |
|
|
|
|
|
</Menu.Item> : ''} |
|
|
|
|
|
</SubMenu> : null |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
} |
|
|