Commit 2be9ad2b authored by 邓超's avatar 邓超

fix: 修复角色管理权限管理问题

parent 99c0f515
Pipeline #39987 passed with stages
...@@ -20,7 +20,7 @@ const ListCardItem = props => { ...@@ -20,7 +20,7 @@ const ListCardItem = props => {
const [checkList, setCheckList] = useState([]); // 复选框列表选中的值 const [checkList, setCheckList] = useState([]); // 复选框列表选中的值
const [defaultList, setDefaultList] = useState([]); // 默认的选项 const [defaultList, setDefaultList] = useState([]); // 默认的选项
const [submitArr, setSubmitArr] = useState([]); // 提交的数组 const [submitArr, setSubmitArr] = useState([]); // 提交的数组
const authority = JSON.parse(localStorage.getItem('panda-oms-authority')); const authority = sessionStorage.getItem('userType');
// const submitArr = []; // const submitArr = [];
...@@ -141,7 +141,7 @@ const ListCardItem = props => { ...@@ -141,7 +141,7 @@ const ListCardItem = props => {
<div <div
style={{ style={{
display: display:
OUName === '运维管理' && authority[1] !== 'super' ? 'none' : 'block', OUName === '运维管理' && authority !== 'super' ? 'none' : 'block',
}} }}
> >
<div className={`${styles.divBox}`}> <div className={`${styles.divBox}`}>
......
...@@ -76,90 +76,66 @@ const incident = () => { ...@@ -76,90 +76,66 @@ const incident = () => {
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
width: 150, width: 150,
render: record => { render: record => (
if (record) {
return (
<Tooltip placement="topLeft" title={record}> <Tooltip placement="topLeft" title={record}>
{record} {record}
</Tooltip> </Tooltip>
); ),
}
},
}, },
{ {
title: '事件主表', title: '事件主表',
dataIndex: 'tableName', dataIndex: 'tableName',
key: 'tableName', key: 'tableName',
width: 200, width: 200,
render: record => { render: record => (
if (record) {
return (
<Tooltip placement="topLeft" title={record}> <Tooltip placement="topLeft" title={record}>
{record} {record}
</Tooltip> </Tooltip>
); ),
}
},
}, },
{ {
title: '编码', title: '编码',
dataIndex: 'code', dataIndex: 'code',
key: 'code', key: 'code',
width: 80, width: 80,
render: record => { render: record => (
if (record) {
return (
<Tooltip placement="topLeft" title={record}> <Tooltip placement="topLeft" title={record}>
{record} {record}
</Tooltip> </Tooltip>
); ),
}
},
}, },
{ {
title: '摘要字段', title: '摘要字段',
dataIndex: 'summaryFields', dataIndex: 'summaryFields',
key: 'summaryFields', key: 'summaryFields',
width: 100, width: 100,
render: record => { render: record => (
if (record) {
return (
<Tooltip placement="topLeft" title={record}> <Tooltip placement="topLeft" title={record}>
{record} {record}
</Tooltip> </Tooltip>
); ),
}
},
}, },
{ {
title: '权限', title: '权限',
dataIndex: 'roles', dataIndex: 'roles',
key: 'roles', key: 'roles',
width: 50, width: 50,
render: record => { render: record => (
if (record) {
return (
<Tooltip placement="topLeft" title={record}> <Tooltip placement="topLeft" title={record}>
{record} {record}
</Tooltip> </Tooltip>
); ),
}
},
}, },
{ {
title: '流程', title: '流程',
dataIndex: 'flowCount', dataIndex: 'flowCount',
key: 'flowCount', key: 'flowCount',
width: 50, width: 50,
render: record => { render: record => (
if (record) {
return (
<Tooltip placement="topLeft" title={record}> <Tooltip placement="topLeft" title={record}>
{record} {record}
</Tooltip> </Tooltip>
); ),
}
},
}, },
{ {
title: '上报', title: '上报',
...@@ -172,34 +148,26 @@ const incident = () => { ...@@ -172,34 +148,26 @@ const incident = () => {
dataIndex: 'reportFields', dataIndex: 'reportFields',
key: 'reportFields', key: 'reportFields',
width: 80, width: 80,
render: record => { render: record => (
if (record) {
return (
<Tooltip placement="topLeft" title={record}> <Tooltip placement="topLeft" title={record}>
<span style={{ color: 'grey' }} key={record}> <span style={{ color: 'grey' }} key={record}>
{record} {record}
</span> </span>
</Tooltip> </Tooltip>
); ),
}
},
}, },
{ {
title: '显示字段', title: '显示字段',
dataIndex: 'displayFields', dataIndex: 'displayFields',
key: 'displayFields', key: 'displayFields',
width: 80, width: 80,
render: record => { render: record => (
if (record) {
return (
<Tooltip placement="topLeft" title={record}> <Tooltip placement="topLeft" title={record}>
<span style={{ color: 'grey' }} key={record}> <span style={{ color: 'grey' }} key={record}>
{record} {record}
</span> </span>
</Tooltip> </Tooltip>
); ),
}
},
}, },
{ {
...@@ -234,41 +202,11 @@ const incident = () => { ...@@ -234,41 +202,11 @@ const incident = () => {
key: 'createMode', key: 'createMode',
width: 80, width: 80,
}, },
// {
// title: '置顶条件',
// dataIndex: 'topWhere',
// key: 'topWhere',
// width: 100,
// render: item =>(
// <div
// ref={r => {
// if (r) {
// r.innerHTML = item;
// }
// }}
// />
// )
// }
// ,
// {
// title: '接口配置',
// dataIndex: 'interfaceConfig',
// key: 'interfaceConfig',
// width: 100,
// render: item =>(
// <div
// ref={r => {
// if (r) {
// r.innerHTML = item;
// }
// }}
// />
// )
// },
{ {
title: '操作', title: '操作',
key: 'action', key: 'action',
align: 'center', align: 'center',
width: 150,
render: record => ( render: record => (
<Space size="middle"> <Space size="middle">
<Tooltip title="编辑事件类型"> <Tooltip title="编辑事件类型">
......
...@@ -53,6 +53,7 @@ const Login = props => { ...@@ -53,6 +53,7 @@ const Login = props => {
const authority = [AUTHORITY.LOGIN, AUTHORITY[userMode]]; const authority = [AUTHORITY.LOGIN, AUTHORITY[userMode]];
setAuthority(authority); setAuthority(authority);
setAuth(authority); setAuth(authority);
sessionStorage.setItem('userType', AUTHORITY[userMode]);
if (userMode === USER_MODE.SUPER) { if (userMode === USER_MODE.SUPER) {
history.push(`/solution`); history.push(`/solution`);
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment