测权限控制 释放权限 优化ws连接
This commit is contained in:
@@ -39,6 +39,8 @@ const CesiumMap = React.forwardRef(({ ifClear, ifClearPlanLine, ifClearNavLine,
|
||||
const planLineRef = useRef(null); // points 规划航线
|
||||
const navLineRef = useRef(null); // 完成点实时轨迹
|
||||
const markedPointsRef = useRef([]); // 标记点实体
|
||||
const { t } = useTranslation();
|
||||
|
||||
|
||||
const realtimeEntityRef = useRef(null);
|
||||
const realtimeLineRef = useRef(null);
|
||||
@@ -343,8 +345,7 @@ const CesiumMap = React.forwardRef(({ ifClear, ifClearPlanLine, ifClearNavLine,
|
||||
}
|
||||
}, [markedPoints]);
|
||||
|
||||
function showRobotTooltip(tooltip, robot, position) {
|
||||
const { t } = useTranslation();
|
||||
function showRobotTooltip(tooltip, robot, position, t) {
|
||||
const statusMap = {
|
||||
1: { text: t('common.working'), color: "#10b981" },
|
||||
2: { text: t('devices.idle'), color: "#f59e0b" },
|
||||
@@ -1400,7 +1401,7 @@ const CesiumMap = React.forwardRef(({ ifClear, ifClearPlanLine, ifClearNavLine,
|
||||
const picked = viewer.scene.pick(movement.endPosition);
|
||||
if (window.Cesium.defined(picked) && picked.id?.properties?.robot) {
|
||||
const robot = picked.id.properties.robot.getValue();
|
||||
showRobotTooltip(tooltipRef.current, robot, movement.endPosition);
|
||||
showRobotTooltip(tooltipRef.current, robot, movement.endPosition, t);
|
||||
} else {
|
||||
tooltipRef.current.style.display = "none";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user