Commit c45f3976 authored by 皮倩雯's avatar 皮倩雯

角色管理界面优化

parent d280daa4
Pipeline #59967 waiting for manual action with stages
......@@ -20,6 +20,7 @@ const CardCheck = props => {
}
}, [delFlag]);
useEffect(() => {
console.log(cardMsg);
setPlainOptions(cardMsg.plainOptions);
setCheckedList(cardMsg.checkedList);
setIndeterminate(cardMsg.indeterminate);
......@@ -83,7 +84,7 @@ const CardCheck = props => {
onChange={e => onCheckAllChange(e)}
checked={checkAll}
>
{cardMsg.groupName}
{cardMsg.level}
</Checkbox>
</div>
<div className={styles.bottomCheckbox}>
......
......@@ -75,6 +75,7 @@ const NewSelectUser = props => {
label: val.userName,
value: val.userId,
groupName: item.groupName,
level: item.level,
};
});
if (checkedList.length === options.length && checkedList.length > 0) {
......@@ -85,6 +86,7 @@ const NewSelectUser = props => {
}
return {
groupName: item.groupName,
level: item.level,
groupId: item.groupId,
indeterminate,
checkAll,
......@@ -160,6 +162,7 @@ const NewSelectUser = props => {
label: val.userName,
value: val.userId,
groupName: item.groupName,
level: item.level,
};
});
if (checkedList.length === options.length && checkedList.length > 0) {
......@@ -170,6 +173,7 @@ const NewSelectUser = props => {
}
return {
groupName: item.groupName,
level: item.level,
groupId: item.groupId,
indeterminate,
checkAll,
......@@ -230,7 +234,6 @@ const NewSelectUser = props => {
),
},
];
console.log(allList, 'allList');
return (
<>
{/* <Modal
......@@ -297,6 +300,7 @@ const NewSelectUser = props => {
total={total}
showTotal={(totals, range) => `第${range[0]}-${range[1]} 条/共 ${totals} 条`}
defaultPageSize={pageSize}
pageSizeOptions={[10, 20]}
defaultCurrent={1}
current={currentPage}
onChange={paginationChange}
......
......@@ -17,6 +17,7 @@ const SelectUser = props => {
const [searchName, setSearchName] = useState();
const [deleKey, setDeleKey] = useState(); // 删除用户的key值
const [delFlag, setDelFlag] = useState(0); // 删除标识每次删除后加一
useEffect(() => {
if (visible) {
setCurrentPage(1);
......@@ -52,7 +53,6 @@ const SelectUser = props => {
});
setLoading(true);
Promise.all([p1, p2]).then(res => {
setLoading(false);
if (res[0].code === 0 && res[1].code === 0) {
setTotal(res[1].data.count);
let listCheck = res[0].data.map(item => ({
......@@ -76,7 +76,7 @@ const SelectUser = props => {
return {
label: val.userName,
value: val.userId,
groupName: item.groupName,
groupName: item.level,
};
});
if (checkedList.length === options.length && checkedList.length > 0) {
......@@ -85,8 +85,9 @@ const SelectUser = props => {
if (checkedList.length < options.length && checkedList.length > 0) {
indeterminate = true;
}
console.log(item.level);
return {
groupName: item.groupName,
groupName: item.level,
groupId: item.groupId,
indeterminate,
checkAll,
......@@ -94,7 +95,9 @@ const SelectUser = props => {
plainOptions: options,
};
});
console.log(list);
setAllist(list);
setLoading(false);
} else if (res[0].code !== 0) {
message.error(res[0].msg);
} else {
......@@ -161,7 +164,7 @@ const SelectUser = props => {
return {
label: val.userName,
value: val.userId,
groupName: item.groupName,
groupName: item.level,
};
});
if (checkedList.length === options.length && checkedList.length > 0) {
......@@ -170,8 +173,9 @@ const SelectUser = props => {
if (checkedList.length < options.length && checkedList.length > 0) {
indeterminate = true;
}
console.log(item.level);
return {
groupName: item.groupName,
groupName: item.level,
groupId: item.groupId,
indeterminate,
checkAll,
......@@ -179,6 +183,7 @@ const SelectUser = props => {
plainOptions: options,
};
});
console.log(list);
setAllist(list);
} else {
message.error(res.msg);
......@@ -207,8 +212,8 @@ const SelectUser = props => {
},
render: (text, record) => (
<span>
<Tooltip placement="topLeft" title={`${record.label}(${record.groupName})`}>
{record.label}({record.groupName})
<Tooltip placement="topLeft" title={`${record.label}(${record.level})`}>
{record.label}({record.level})
</Tooltip>
</span>
),
......
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