Browse Source

路政权限

dev
dengyinhuan 1 year ago
parent
commit
f489bd6e87
  1. 3
      scripts/1.3.1/schema/3.insert_resource.sql
  2. 9
      web/client/src/sections/fillion/nav-item.js

3
scripts/1.3.1/schema/3.insert_resource.sql

@ -0,0 +1,3 @@
INSERT INTO resource (code, name, parent_resource) VALUES ('LUZHENG', '路政管理', 'ALLSELECT');
DELETE FROM user_resource WHERE resource_id = 'OVERLOADMANAGE';
DELETE FROM resource WHERE code = 'OVERLOADMANAGE';

9
web/client/src/sections/fillion/nav-item.js

@ -20,20 +20,21 @@ export function getNavItem(user, dispatch) {
i.resourceId === 'ASSESSMANAGE' ||
i.resourceId === 'VIDEOCENTER' ||
i.resourceId === 'BUILDINGPROJECT' ||
i.resourceId === 'MAINTENANCESPOTCHECK'
i.resourceId === 'MAINTENANCESPOTCHECK' ||
i.resourceId === 'LUZHENG'
)
return (
user?.username == 'SuperAdmin' || isshow ?
<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 === 'OVERLOADMANAGE') ?
<Menu.Item key="fillioninfor">
<Link to="/fillion/infor">治超管理</Link>
</Menu.Item> : ''}
</Menu.Item> : ''} */}
{/* <Menu.Item key="filliontask">
<Link to="/fillion/task">任务管理</Link>
</Menu.Item> */}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'OVERLOADMANAGE') ?
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'LUZHENG') ?
<Menu.Item key="luzheng">
<Link to="/fillion/luzheng">路政管理</Link>
</Menu.Item> : ''}

Loading…
Cancel
Save