修复地图中 鼠标悬浮显示机器 优化显示登录用用户的角色

This commit is contained in:
mmc
2026-08-31 14:16:36 +08:00
parent b5916dd408
commit 9212b45ece
2 changed files with 26 additions and 11 deletions

View File

@@ -239,6 +239,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')}

View File

@@ -2022,17 +2022,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;