图片换为 webp加载
This commit is contained in:
10
env.js
10
env.js
@@ -35,14 +35,14 @@ const envConfig = {
|
|||||||
},
|
},
|
||||||
[ENV.PROD]: {
|
[ENV.PROD]: {
|
||||||
//baseURL: 'https://pvcloudservice.satabot.com',
|
//baseURL: 'https://pvcloudservice.satabot.com',
|
||||||
baseURL: 'http://1.95.137.212:8081',//http://192.168.2.56:8081
|
//baseURL: 'http://1.95.137.212:8081',//http://192.168.2.56:8081
|
||||||
////baseURL: 'https://serviceri.satabot.com',
|
//////baseURL: 'https://serviceri.satabot.com',
|
||||||
WS_URL: 'ws://1.95.137.212:9002/ws/',
|
//WS_URL: 'ws://1.95.137.212:9002/ws/',
|
||||||
//mqtt_url: "ws://1.95.137.212:8083/mqtt",
|
//mqtt_url: "ws://1.95.137.212:8083/mqtt",
|
||||||
//geoserver_url: "http://1.95.137.212:59018/geoserver"
|
//geoserver_url: "http://1.95.137.212:59018/geoserver"
|
||||||
|
|
||||||
//baseURL: 'http://1.95.137.212:59003',//http://192.168.2.56:8081
|
baseURL: 'http://1.95.137.212:59003',//http://192.168.2.56:8081
|
||||||
//WS_URL: 'ws://1.95.137.212:59005/ws/',
|
WS_URL: 'ws://1.95.137.212:59005/ws/',
|
||||||
|
|
||||||
|
|
||||||
//baseURL: 'http://1.95.137.212:8081',//http://192.168.2.56:8081
|
//baseURL: 'http://1.95.137.212:8081',//http://192.168.2.56:8081
|
||||||
|
|||||||
BIN
src/assets/images/carplane.webp
Normal file
BIN
src/assets/images/carplane.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 63 KiB |
@@ -1,5 +1,5 @@
|
|||||||
import React, { useEffect, useRef, useState, useMemo, useImperativeHandle, forwardRef, useCallback } from 'react';
|
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 planeImg from '../assets/images/planeicon.png';
|
||||||
import cameraImg from '../assets/images/camera.png';
|
import cameraImg from '../assets/images/camera.png';
|
||||||
import droneInspectImg from '../assets/images/xunjiancar.png';
|
import droneInspectImg from '../assets/images/xunjiancar.png';
|
||||||
@@ -404,7 +404,7 @@ const CesiumMap = React.forwardRef(({ ifClear, ifClearPlanLine, ifClearNavLine,
|
|||||||
if (!viewer || !Cesium) return;
|
if (!viewer || !Cesium) return;
|
||||||
|
|
||||||
console.log(message, "障碍物信息")
|
console.log(message, "障碍物信息")
|
||||||
const payload = message?.data ?? message;
|
const payload = message;
|
||||||
const objects = Array.isArray(payload) ? payload : (payload?.objects ?? []);
|
const objects = Array.isArray(payload) ? payload : (payload?.objects ?? []);
|
||||||
|
|
||||||
if (objects.length === 0) return;
|
if (objects.length === 0) return;
|
||||||
@@ -570,7 +570,6 @@ const CesiumMap = React.forwardRef(({ ifClear, ifClearPlanLine, ifClearNavLine,
|
|||||||
|
|
||||||
|
|
||||||
const handleDetectFn = (res) => {
|
const handleDetectFn = (res) => {
|
||||||
console.log(res, "监测到障碍物")
|
|
||||||
if (!res) return;
|
if (!res) return;
|
||||||
updateLiveObstacleBoxes(res);
|
updateLiveObstacleBoxes(res);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -559,8 +559,9 @@ export default function DeviceStatusPage() {
|
|||||||
mapRef.current?.flyToPosition?.(realtimePosition, { height: 300 });
|
mapRef.current?.flyToPosition?.(realtimePosition, { height: 300 });
|
||||||
};
|
};
|
||||||
const handleDetectionReport = (res) => {
|
const handleDetectionReport = (res) => {
|
||||||
setDeportInfo(res);
|
|
||||||
console.log("获取障碍物信息", res)
|
console.log("获取障碍物信息", res)
|
||||||
|
|
||||||
|
setDeportInfo(res);
|
||||||
}
|
}
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const controller = new DeviceController(userInfo, messageApi);
|
const controller = new DeviceController(userInfo, messageApi);
|
||||||
@@ -1362,6 +1363,7 @@ export default function DeviceStatusPage() {
|
|||||||
finishPoint={arrivedPoint}
|
finishPoint={arrivedPoint}
|
||||||
ifClearNavLine={clearNavLine}
|
ifClearNavLine={clearNavLine}
|
||||||
ifClearPlanLine={clearPlanLine}
|
ifClearPlanLine={clearPlanLine}
|
||||||
|
detectReportInfo={detectReportInfo}
|
||||||
from="deviceStatus"
|
from="deviceStatus"
|
||||||
onMarkPoint={handleMapMarkPoint}
|
onMarkPoint={handleMapMarkPoint}
|
||||||
onClearDraw={(fn) => { clearDrawRef.current = fn; }}
|
onClearDraw={(fn) => { clearDrawRef.current = fn; }}
|
||||||
@@ -1370,8 +1372,8 @@ export default function DeviceStatusPage() {
|
|||||||
{/*<div style={{ fontWeight: 600, color: '#91caff' }}>{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')}</div>*/}
|
{/*<div style={{ fontWeight: 600, color: '#91caff' }}>{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')}</div>*/}
|
||||||
{/*<div>{t('devices.rtSatellites')}:{t('devices.satelliteCount', { count: runningStatus?.satelliteCnt || 0 })}</div>*/}
|
{/*<div>{t('devices.rtSatellites')}:{t('devices.satelliteCount', { count: runningStatus?.satelliteCnt || 0 })}</div>*/}
|
||||||
<div>{t('devices.rtHeadingAngle')}:{runningStatus?.yaw !== undefined ? Number(runningStatus?.yaw).toFixed(1) + '°' : '-'}</div>
|
<div>{t('devices.rtHeadingAngle')}:{runningStatus?.yaw !== undefined ? Number(runningStatus?.yaw).toFixed(1) + '°' : '-'}</div>
|
||||||
<div>{t('devices.rtRollAngle')}:{runningStatus?.roll !== undefined ? Number(runningStatus?.roll).toFixed(1) + '°' : '-'}</div>
|
{/*<div>{t('devices.rtRollAngle')}:{runningStatus?.roll !== undefined ? Number(runningStatus?.roll).toFixed(1) + '°' : '-'}</div>
|
||||||
<div>{t('devices.rtPitchAngle')}:{runningStatus?.pitch !== undefined ? Number(runningStatus?.pitch).toFixed(1) + '°' : '-'}</div>
|
<div>{t('devices.rtPitchAngle')}:{runningStatus?.pitch !== undefined ? Number(runningStatus?.pitch).toFixed(1) + '°' : '-'}</div>*/}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ConsolePanel>
|
</ConsolePanel>
|
||||||
|
|||||||
@@ -1051,6 +1051,7 @@ export const MapEditorView = React.forwardRef(function MapEditorView(
|
|||||||
onObstacleRadiusChange={handleObstacleRadiusChange}
|
onObstacleRadiusChange={handleObstacleRadiusChange}
|
||||||
onObstacleRectResize={handleObstacleRectResize}
|
onObstacleRectResize={handleObstacleRectResize}
|
||||||
siteMapInfoId={siteMapInfoId}
|
siteMapInfoId={siteMapInfoId}
|
||||||
|
detectReportInfo={extraMapProps?.detectReportInfo}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -308,7 +308,6 @@ export function TaskPlanningView({ selectedMachineSn, embedded = false, onStatsC
|
|||||||
//setShowVideo(true);
|
//setShowVideo(true);
|
||||||
};
|
};
|
||||||
const handleDetectionReport = (res) => {
|
const handleDetectionReport = (res) => {
|
||||||
console.log('收到障碍物物信息', res);
|
|
||||||
setDeportInfo(res);
|
setDeportInfo(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -176,7 +176,6 @@ export default class DeviceController {
|
|||||||
}
|
}
|
||||||
if (msg?.type
|
if (msg?.type
|
||||||
== 'detectionReport') {
|
== 'detectionReport') {
|
||||||
console.log('detectionReport');
|
|
||||||
this.onDetectionReport?.(msg);
|
this.onDetectionReport?.(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
|
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
output: {
|
output: {
|
||||||
|
assetFileNames: 'assets/[name]-[hash][extname]'
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user