修复地图中 鼠标悬浮显示机器 优化显示登录用用户的角色
This commit is contained in:
@@ -240,6 +240,11 @@ export default function AppLayout() {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<span style={{ fontSize: 'clamp(12px, 1vw, 14px)' }}>{userInfo?.nickName || userInfo?.username}</span>
|
<span style={{ fontSize: 'clamp(12px, 1vw, 14px)' }}>{userInfo?.nickName || userInfo?.username}</span>
|
||||||
|
{userInfo?.roleKey === "admin" && <Tag color="red">管理员</Tag>}
|
||||||
|
{userInfo?.roleKey === "manager" && <Tag color="orange">组织管理员</Tag>}
|
||||||
|
{userInfo?.roleKey === "siteManager" && <Tag color="blue">场站管理员</Tag>}
|
||||||
|
|
||||||
|
|
||||||
</Space>
|
</Space>
|
||||||
<Button type="text" danger icon={<LogoutOutlined />} onClick={handleLogout} style={{ fontSize: 'clamp(12px, 1vw, 14px)' }}>
|
<Button type="text" danger icon={<LogoutOutlined />} onClick={handleLogout} style={{ fontSize: 'clamp(12px, 1vw, 14px)' }}>
|
||||||
{t('layout.logout')}
|
{t('layout.logout')}
|
||||||
|
|||||||
@@ -1854,17 +1854,27 @@ const CesiumMap = React.forwardRef(({ ifClear, ifClearPlanLine, ifClearNavLine,
|
|||||||
captureScreenshot
|
captureScreenshot
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return <>
|
return (
|
||||||
<div ref={containerRef} className="w-full h-full bg-slate-900 overflow-hidden" />
|
<div className="w-full h-full bg-slate-900 overflow-hidden relative">
|
||||||
<div
|
<div ref={containerRef} className="w-full h-full overflow-hidden" />
|
||||||
ref={tooltipRef}
|
<div
|
||||||
style={{
|
ref={tooltipRef}
|
||||||
position: "absolute", display: "none", pointerEvents: "none",
|
style={{
|
||||||
background: "rgba(0,0,0,0.75)", color: "#fff", padding: "8px 10px",
|
position: "absolute",
|
||||||
borderRadius: "4px", fontSize: "12px", zIndex: 9999, whiteSpace: "nowrap"
|
display: "none",
|
||||||
}}
|
pointerEvents: "none",
|
||||||
/>
|
background: "rgba(0,0,0,0.75)",
|
||||||
</>;
|
color: "#fff",
|
||||||
|
padding: "8px 10px",
|
||||||
|
borderRadius: "4px",
|
||||||
|
fontSize: "12px",
|
||||||
|
zIndex: 99999,
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default CesiumMap;
|
export default CesiumMap;
|
||||||
|
|||||||
Reference in New Issue
Block a user