Commit e8f870c6 authored by xiexiuxing's avatar xiexiuxing

fix:权限按钮

parent 6f236680
......@@ -310,6 +310,7 @@ const MemberDetail: React.FC<{}> = () => {
// console.log(cheIds, 'cheIds')
// 判断后台返回的选中id 是否和和当前选中id是一样
const flag = treeCheckIds.join(',') === cheIds.join(',') ? true : false;
// 如果后台返回的选中的id 和 当前选中id 是一样 则午休修改 提交一个空数据过去
const publicarr = [];
let list = [];
......@@ -348,17 +349,17 @@ const MemberDetail: React.FC<{}> = () => {
list = publicarr.filter((element, index, self) => {
return self.findIndex(x => x.menuId === element.menuId) === index
})
// console.log(list);
const publicParams = {
...values,
imFlag: !!values.imFlag,
auth: (flag && dataId.length < 0) ? [] : list.map(v => ({
menuId: v.menuId,
buttonIds: (Object.keys(authInfos).length != 0 && authInfos[v.menuId].buttonIds) ? authInfos[v.menuId].buttonIds : [],
buttonIds: (Object.keys(authInfos).length != 0 && authInfos[v.menuId]) ? authInfos[v.menuId].buttonIds : [],
checked: v.checked,
hasDataAuth: (Object.keys(authInfos).length != 0 && authInfos[v.menuId]?.hasDataAuth) ? authInfos[v.menuId]?.hasDataAuth : 0,
orgIds: (Object.keys(authInfos).length != 0 && authInfos[v.menuId]?.hasDataAuth) ? authInfos[v.menuId]?.orgIds : [],
hasDataAuth: (Object.keys(authInfos).length != 0 && authInfos[v.menuId]) ? authInfos[v.menuId]?.hasDataAuth : 0,
orgIds: (Object.keys(authInfos).length != 0 && authInfos[v.menuId]) ? authInfos[v.menuId]?.orgIds : [],
}))
};
......
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