Commit d7363ce2 authored by Maofei94's avatar Maofei94

Merge branch 'master' of g.civnet.cn:ReactWeb5/maintenance

parents 4d344e9e 9cc69699
Pipeline #21966 skipped with stages
......@@ -229,17 +229,21 @@ const SiteManage = props => {
dataList[index].isChecked = e.target.checked;
dataList[index].Users.forEach(item => {
item.isChecked = e.target.checked;
let delIndex = selectList.findIndex(
v => v.GroupId === dataList[index].GroupId && v.userID === item.userID,
);
if (e.target.checked) {
selectList.push({
GroupId: dataList[index].GroupId,
GroupName: dataList[index].GroupName,
userName: item.userName,
userID: item.userID,
isChecked: dataList[index].isChecked,
});
if (delIndex === -1) {
selectList.push({
GroupId: dataList[index].GroupId,
GroupName: dataList[index].GroupName,
userName: item.userName,
userID: item.userID,
isChecked: dataList[index].isChecked,
});
}
}
if (!e.target.checked) {
let delIndex = selectList.findIndex(v => v.userID === item.userID);
selectList.splice(delIndex, 1);
}
});
......@@ -252,7 +256,9 @@ const SiteManage = props => {
dataList[index].Users[vIndex].isChecked = e.target.checked;
let checked = isAllChecked(index);
let hasIndex = selectList.findIndex(
item => item.userID === dataList[index].Users[vIndex].userID,
item =>
item.userID === dataList[index].Users[vIndex].userID &&
item.GroupId === dataList[index].GroupId,
);
dataList[index].isChecked = checked;
if (hasIndex === -1) {
......
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