diff --git a/env.js b/env.js index da1efa5..7bc1df2 100644 --- a/env.js +++ b/env.js @@ -35,14 +35,14 @@ const envConfig = { }, [ENV.PROD]: { //baseURL: 'https://pvcloudservice.satabot.com', - baseURL: 'http://1.95.137.212:8081',//http://192.168.2.56:8081 - ////baseURL: 'https://serviceri.satabot.com', - WS_URL: 'ws://1.95.137.212:9002/ws/', + //baseURL: 'http://1.95.137.212:8081',//http://192.168.2.56:8081 + //////baseURL: 'https://serviceri.satabot.com', + //WS_URL: 'ws://1.95.137.212:9002/ws/', //mqtt_url: "ws://1.95.137.212:8083/mqtt", //geoserver_url: "http://1.95.137.212:59018/geoserver" - //baseURL: 'http://1.95.137.212:59003',//http://192.168.2.56:8081 - //WS_URL: 'ws://1.95.137.212:59005/ws/', + baseURL: 'http://1.95.137.212:59003',//http://192.168.2.56:8081 + WS_URL: 'ws://1.95.137.212:59005/ws/', //baseURL: 'http://1.95.137.212:8081',//http://192.168.2.56:8081 diff --git a/src/assets/images/carplane.webp b/src/assets/images/carplane.webp new file mode 100644 index 0000000..7f3fe1e Binary files /dev/null and b/src/assets/images/carplane.webp differ diff --git a/src/components/Map.jsx b/src/components/Map.jsx index 763a2c0..3914711 100644 --- a/src/components/Map.jsx +++ b/src/components/Map.jsx @@ -1,5 +1,5 @@ import React, { useEffect, useRef, useState, useMemo, useImperativeHandle, forwardRef, useCallback } from 'react'; -import carImg from '../assets/images/carplane.png'; +import carImg from '../assets/images/carplane.webp'; import planeImg from '../assets/images/planeicon.png'; import cameraImg from '../assets/images/camera.png'; import droneInspectImg from '../assets/images/xunjiancar.png'; @@ -404,7 +404,7 @@ const CesiumMap = React.forwardRef(({ ifClear, ifClearPlanLine, ifClearNavLine, if (!viewer || !Cesium) return; console.log(message, "障碍物信息") - const payload = message?.data ?? message; + const payload = message; const objects = Array.isArray(payload) ? payload : (payload?.objects ?? []); if (objects.length === 0) return; @@ -570,7 +570,6 @@ const CesiumMap = React.forwardRef(({ ifClear, ifClearPlanLine, ifClearNavLine, const handleDetectFn = (res) => { - console.log(res, "监测到障碍物") if (!res) return; updateLiveObstacleBoxes(res); }; diff --git a/src/components/devices/DeviceStatusPage.tsx b/src/components/devices/DeviceStatusPage.tsx index 0573971..6b47fb5 100644 --- a/src/components/devices/DeviceStatusPage.tsx +++ b/src/components/devices/DeviceStatusPage.tsx @@ -559,8 +559,9 @@ export default function DeviceStatusPage() { mapRef.current?.flyToPosition?.(realtimePosition, { height: 300 }); }; const handleDetectionReport = (res) => { - setDeportInfo(res); console.log("获取障碍物信息", res) + + setDeportInfo(res); } useEffect(() => { const controller = new DeviceController(userInfo, messageApi); @@ -1362,6 +1363,7 @@ export default function DeviceStatusPage() { finishPoint={arrivedPoint} ifClearNavLine={clearNavLine} ifClearPlanLine={clearPlanLine} + detectReportInfo={detectReportInfo} from="deviceStatus" onMarkPoint={handleMapMarkPoint} onClearDraw={(fn) => { clearDrawRef.current = fn; }} @@ -1370,8 +1372,8 @@ export default function DeviceStatusPage() { {/*
{t('devices.rtPositioning')}:{runningStatus?.qual == 0 ? t('constants.locationInvalid') : runningStatus?.qual == 1 ? t('devices.gpsSingle') : runningStatus?.qual == 2 ? t('devices.dgpsDiff') : runningStatus?.qual == 4 ? t('devices.rtkFixed2') : runningStatus?.qual == 5 ? t('devices.rtkFloat') : t('constants.locationUnknown')}
*/} {/*
{t('devices.rtSatellites')}:{t('devices.satelliteCount', { count: runningStatus?.satelliteCnt || 0 })}
*/}
{t('devices.rtHeadingAngle')}:{runningStatus?.yaw !== undefined ? Number(runningStatus?.yaw).toFixed(1) + '°' : '-'}
-
{t('devices.rtRollAngle')}:{runningStatus?.roll !== undefined ? Number(runningStatus?.roll).toFixed(1) + '°' : '-'}
-
{t('devices.rtPitchAngle')}:{runningStatus?.pitch !== undefined ? Number(runningStatus?.pitch).toFixed(1) + '°' : '-'}
+ {/*
{t('devices.rtRollAngle')}:{runningStatus?.roll !== undefined ? Number(runningStatus?.roll).toFixed(1) + '°' : '-'}
+
{t('devices.rtPitchAngle')}:{runningStatus?.pitch !== undefined ? Number(runningStatus?.pitch).toFixed(1) + '°' : '-'}
*/} diff --git a/src/components/devices/MapEditorView.tsx b/src/components/devices/MapEditorView.tsx index 53e8e29..84f38e1 100644 --- a/src/components/devices/MapEditorView.tsx +++ b/src/components/devices/MapEditorView.tsx @@ -1051,6 +1051,7 @@ export const MapEditorView = React.forwardRef(function MapEditorView( onObstacleRadiusChange={handleObstacleRadiusChange} onObstacleRectResize={handleObstacleRectResize} siteMapInfoId={siteMapInfoId} + detectReportInfo={extraMapProps?.detectReportInfo} /> diff --git a/src/components/devices/TaskPlanningView.tsx b/src/components/devices/TaskPlanningView.tsx index 95f6e7b..5892e6f 100644 --- a/src/components/devices/TaskPlanningView.tsx +++ b/src/components/devices/TaskPlanningView.tsx @@ -308,7 +308,6 @@ export function TaskPlanningView({ selectedMachineSn, embedded = false, onStatsC //setShowVideo(true); }; const handleDetectionReport = (res) => { - console.log('收到障碍物物信息', res); setDeportInfo(res); } diff --git a/src/components/devices/deviceController.js b/src/components/devices/deviceController.js index bb9e72b..964cf64 100644 --- a/src/components/devices/deviceController.js +++ b/src/components/devices/deviceController.js @@ -176,7 +176,6 @@ export default class DeviceController { } if (msg?.type == 'detectionReport') { - console.log('detectionReport'); this.onDetectionReport?.(msg); } diff --git a/vite.config.ts b/vite.config.ts index 2dd039c..672f5e5 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -68,6 +68,7 @@ export default defineConfig(({ mode }) => { rollupOptions: { output: { + assetFileNames: 'assets/[name]-[hash][extname]' }, },