Commit 4736c58e authored by 皮倩雯's avatar 皮倩雯

fix: '角色管理手持系统图标显示逻辑优化'

parent 33328837
......@@ -154,16 +154,21 @@ const SiteManage = () => {
setSpinLoading(false);
if (res.code === 0) {
const { roleList } = res.data;
console.log(res.data);
let arr = transTree(roleList);
console.log(arr);
console.log(roleList);
let list = [...roleList];
list.map((i, j) => {
if (i.visibleTitle.indexOf('手持') !== -1 && i.type !== 'mobile') {
list.splice(j, 1);
list.push(i);
}
});
console.log(list);
let arr = transTree(list);
setTreeData(arr);
let aa = [];
arr.forEach(i => {
console.log(i.visibleValue);
aa.push(i.visibleValue);
});
console.log(aa);
setKeepTree(aa);
}
});
......@@ -251,7 +256,11 @@ const SiteManage = () => {
} else if (item.visibleValue == 'CS') {
item.icon = <WindowsOutlined />;
} else {
item.icon = <DesktopOutlined />;
if (item.visibleTitle.indexOf('手持') !== -1) {
item.icon = <MobileOutlined />;
} else {
item.icon = <DesktopOutlined />;
}
}
return (
item.visibleTitle !== '其它角色' &&
......
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