Commit 856e5a81 authored by 皮倩雯's avatar 皮倩雯

fix: '修改关联权限站点配置显示错误问题'

parent 7e522935
Pipeline #82900 failed with stages
......@@ -219,6 +219,7 @@ const RelateRoleModal = props => {
mult={mult}
OUName={role.visibleTitle}
getValueCallback={getRoleValueCallback}
tab="roles"
/>
))}
</div>
......@@ -234,6 +235,7 @@ const RelateRoleModal = props => {
mult={mult}
OUName={station.visibleTitle}
getValueCallback={getStationValueCallback}
tab="sites"
/>
))}
</div>
......
......@@ -14,6 +14,7 @@ const ListCardItem = props => {
multiRoleList,
multistationList,
mult,
tab,
} = props;
const [indeterminate, setIndeterminate] = useState(false);
const [allChecked, setAllChecked] = useState(false); // 全选状态
......@@ -29,13 +30,7 @@ const ListCardItem = props => {
userList.map((item, index) => {
let obj = { ...item };
obj.label = (
<span
className={
searchWord && obj.userName.includes(searchWord)
? styles.isSearch
: ''
}
>
<span className={searchWord && obj.userName.includes(searchWord) ? styles.isSearch : ''}>
{obj.userName || obj.roleName || obj.stationName}
</span>
);
......@@ -47,8 +42,6 @@ const ListCardItem = props => {
useEffect(() => {
if (mult == 'Yes') {
console.log(multiRoleList);
console.log(multistationList);
let arr2 = [];
if (multiRoleList != undefined) {
multiRoleList.map((item, index) => {
......@@ -60,10 +53,6 @@ const ListCardItem = props => {
arr2.push(item1);
});
}
console.log(arr2);
console.log(userList);
console.log(itemid);
// 勾选展示
let flag = 0;
let aa = [];
......@@ -81,9 +70,6 @@ const ListCardItem = props => {
}
}
});
console.log(aa);
console.log(userList.length);
console.log(flag);
if (flag == userList.length) {
setIndeterminate(false);
setAllChecked(true);
......@@ -137,11 +123,17 @@ const ListCardItem = props => {
if (defaultList.length === 0) {
return null;
}
const getName = val => {
if (val === 'sites') {
return '所有站点';
}
return '所有角色';
};
return (
<div
style={{
display:
OUName === '运维管理' && authority !== 'super' ? 'none' : 'block',
display: OUName === '运维管理' && authority !== 'super' ? 'none' : 'block',
}}
>
<div className={`${styles.divBox}`}>
......@@ -153,7 +145,7 @@ const ListCardItem = props => {
handleAllChecked(e);
}}
>
{OUName === '所有系统' ? '所有角色' : OUName}
{OUName === '所有系统' ? getName(tab) : OUName}
</Checkbox>
</div>
<div
......
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