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

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

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