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

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

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