中英文切换 初始化
This commit is contained in:
@@ -9,6 +9,7 @@ import arrowImg from '../assets/images/arrow.png';
|
||||
import iotImg from '../assets/images/iot.png';
|
||||
import envConfig from '../../env';
|
||||
import { TracePoint, TPAction, TPMode } from '../lib/TracePoint/tracePoint';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
|
||||
const CYAN_ALARM_COLOR = new window.Cesium.Color(
|
||||
@@ -343,10 +344,11 @@ const CesiumMap = React.forwardRef(({ ifClear, ifClearPlanLine, ifClearNavLine,
|
||||
}, [markedPoints]);
|
||||
|
||||
function showRobotTooltip(tooltip, robot, position) {
|
||||
const { t } = useTranslation();
|
||||
const statusMap = {
|
||||
1: { text: "工作中", color: "#10b981" },
|
||||
2: { text: "空闲", color: "#f59e0b" },
|
||||
3: { text: "离线", color: "#f87171" }
|
||||
2: { text: t('devices.idle'), color: "#f59e0b" },
|
||||
3: { text: t('devices.offline'), color: "#f87171" }
|
||||
};
|
||||
let status = statusMap[robot.feStatus] || statusMap[1];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user