优化 map中实时车悬浮的提醒框子,优化已完成任务提醒哪个设备 优化页面 设备类型显示 和 在线状态显示 预设路线分组显示 优化路径规划中的问题

This commit is contained in:
mmc
2026-11-10 17:03:52 +08:00
parent 6401327522
commit ce9f52fc52
10 changed files with 575 additions and 327 deletions

View File

@@ -469,6 +469,7 @@ export default function DeviceStatusPage() {
if (hasWsData || hasLocData) {
return true;
}
return false;
//// 2. 检查 runningStatus 里是否有有效经纬度或实时状态字段
//const runningLon = runningStatus?.longitude;
//const runningLat = runningStatus?.latitude;
@@ -989,6 +990,17 @@ export default function DeviceStatusPage() {
return resultObj; // ✅返回
}
};
const getDeviceType = (device) => {
if (!device) return '';
if (device?.deviceType === 'I') {
return t("devices.paramEnum.deviceTypeI");
} else if (device?.deviceType === 'M') {
return t("devices.paramEnum.deviceTypeM");
} else if (device?.deviceType === 'U') {
return t("devices.paramEnum.deviceTypeU");
} return t("devices.robot");
}
// 打开保存模态框
const handleOpenSaveModal = () => {
//if (!completeFlag) {
@@ -1059,7 +1071,7 @@ export default function DeviceStatusPage() {
].filter(group => group?.options?.length > 0)}
/>
<Tag color={isUAV ? 'cyan' : 'blue'}>
{isUAV ? t('constants.uav') : device?.deviceType ? device?.deviceType : t('devices.robot')}
{isUAV ? t('constants.uav') : getDeviceType(device)}
</Tag>
<Tag color={isDeviceOnline ? 'green' : 'default'}>
{isDeviceOnline ? t('devices.online') : t('devices.offline')}