Browse Source

(*)超管权限修改

master
peng.peng 1 year ago
parent
commit
651d0ee246
  1. 4
      web/client/src/sections/dataQuality/nav-item.js
  2. 4
      web/client/src/sections/resourceConsumption/nav-item.js
  3. 4
      web/client/src/sections/safetySpecification/nav-item.js

4
web/client/src/sections/dataQuality/nav-item.js

@ -4,9 +4,9 @@ import { Menu } from 'antd';
import { CarryOutOutlined } from '@ant-design/icons'; import { CarryOutOutlined } from '@ant-design/icons';
const SubMenu = Menu.SubMenu; const SubMenu = Menu.SubMenu;
export function getNavItem (user) { export function getNavItem(user) {
return ( return (
user?.role == '系统管理员' && <SubMenu key="dataQuality" icon={<CarryOutOutlined />} title='数据质量'> user?.username == 'SuperAdmin' && <SubMenu key="dataQuality" icon={<CarryOutOutlined />} title='数据质量'>
<Menu.Item key="documentLibrary"> <Menu.Item key="documentLibrary">
<Link to="/dataQuality/documentLibrary">标准文档库</Link> <Link to="/dataQuality/documentLibrary">标准文档库</Link>

4
web/client/src/sections/resourceConsumption/nav-item.js

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

4
web/client/src/sections/safetySpecification/nav-item.js

@ -4,9 +4,9 @@ import { Menu } from 'antd';
import { CarryOutOutlined } from '@ant-design/icons'; import { CarryOutOutlined } from '@ant-design/icons';
const SubMenu = Menu.SubMenu; const SubMenu = Menu.SubMenu;
export function getNavItem (user) { export function getNavItem(user) {
return ( return (
user?.role == '系统管理员' && <SubMenu key="safetySpecification" icon={<CarryOutOutlined />} title='数据安全规范'> user?.username == 'SuperAdmin' && <SubMenu key="safetySpecification" icon={<CarryOutOutlined />} title='数据安全规范'>
<Menu.Item key="specificationLibrary"> <Menu.Item key="specificationLibrary">
<Link to="/safetySpecification/specificationLibrary">数据安全规范库</Link> <Link to="/safetySpecification/specificationLibrary">数据安全规范库</Link>
</Menu.Item> </Menu.Item>

Loading…
Cancel
Save