|
|
@ -52,6 +52,10 @@ const Index = ({ ...props }) => { |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
function judgeRight (code) { |
|
|
|
return userInfo && userInfo.userResources && userInfo.userResources.some(item => item.resourceId === code) |
|
|
|
} |
|
|
|
|
|
|
|
return ( |
|
|
|
<View className='page'> |
|
|
|
<View className='myBox'> |
|
|
@ -64,14 +68,18 @@ const Index = ({ ...props }) => { |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
|
|
|
|
{ |
|
|
|
judgeRight('WXPATROLREPOR') ? |
|
|
|
<View className='box' onClick={isSuperAdmin ? () => toPatrolReport('patrol') : () => toMyReport('patrol')}> |
|
|
|
<Image className='box-img' src={reportImg} /> |
|
|
|
<View className='box-txt'> |
|
|
|
{isSuperAdmin ? '巡查上报' : '巡查上报'} |
|
|
|
</View> |
|
|
|
<Image className='img' src={moreImg} /> |
|
|
|
</View> |
|
|
|
|
|
|
|
</View> : '' |
|
|
|
} |
|
|
|
{ |
|
|
|
judgeRight('WXMAINTENANCEREPORT') ? |
|
|
|
<View className='box' onClick={isSuperAdmin ? () => toPatrolReport('conserve') : () => toMyReport('conserve')}> |
|
|
|
<Image className='box-img' src={reportImg} /> |
|
|
|
<View className='box-txt'> |
|
|
@ -79,15 +87,20 @@ const Index = ({ ...props }) => { |
|
|
|
</View> |
|
|
|
<Image className='img' src={moreImg} /> |
|
|
|
</View> |
|
|
|
|
|
|
|
: '' |
|
|
|
} |
|
|
|
{ |
|
|
|
judgeRight('WXBUILDINGROAD') ? |
|
|
|
<View className='box' onClick={isSuperAdmin ? () => toPatrolReport('road') : () => toMyReport('road')}> |
|
|
|
<Image className='box-img' src={reportImg} /> |
|
|
|
<View className='box-txt'> |
|
|
|
{isSuperAdmin ? '在建道路上报' : '在建道路'} |
|
|
|
</View> |
|
|
|
<Image className='img' src={moreImg} /> |
|
|
|
</View> |
|
|
|
|
|
|
|
</View> : '' |
|
|
|
} |
|
|
|
{ |
|
|
|
judgeRight('WXFEEDBACKMANAGE') ? |
|
|
|
<View className='box' onClick={isSuperAdmin ? () => toPatrolReport('anomaly') : () => toMyReport('anomaly')}> |
|
|
|
<Image className='box-img' src={reportImg} /> |
|
|
|
<View className='box-txt'> |
|
|
@ -95,7 +108,8 @@ const Index = ({ ...props }) => { |
|
|
|
</View> |
|
|
|
<Image className='img' src={moreImg} /> |
|
|
|
</View> |
|
|
|
|
|
|
|
: '' |
|
|
|
} |
|
|
|
<View className='box' onClick={changePassword} style={{ marginTop: '2rpx' }}> |
|
|
|
<Image className='box-img' src={pswdImg} /> |
|
|
|
<View className='box-txt'>修改密码</View> |
|
|
|