xx
This commit is contained in:
@@ -147,19 +147,15 @@ export default function RobotTaskPage() {
|
|||||||
|
|
||||||
// 根据任务ID获取路径并显示在地图上
|
// 根据任务ID获取路径并显示在地图上
|
||||||
const loadTaskPath = async (taskId) => {
|
const loadTaskPath = async (taskId) => {
|
||||||
return;
|
//return;
|
||||||
if (!taskId) return;
|
if (!taskId) return;
|
||||||
try {
|
try {
|
||||||
const res = await getRouteByTask({ taskId });
|
const res = await getRouteByTask({ taskId });
|
||||||
if (res?.code === 200 && res?.data) {
|
if (res?.code === 200 && res?.data) {
|
||||||
let pathPoints = [];
|
let pathPoints = [];
|
||||||
try {
|
try {
|
||||||
if (res.data.jsonData) {
|
const data = res.data;
|
||||||
const data = typeof res.data.jsonData === 'string'
|
pathPoints = data || [];
|
||||||
? JSON.parse(res.data.jsonData)
|
|
||||||
: res.data.jsonData;
|
|
||||||
pathPoints = data?.path || [];
|
|
||||||
}
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('解析任务路径数据失败:', err);
|
console.error('解析任务路径数据失败:', err);
|
||||||
}
|
}
|
||||||
@@ -1635,7 +1631,7 @@ export default function RobotTaskPage() {
|
|||||||
title={`机器人全景视频 - ${executingRobot.deviceAlias || executingRobot.serialNumber}`}
|
title={`机器人全景视频 - ${executingRobot.deviceAlias || executingRobot.serialNumber}`}
|
||||||
onClose={() => setShowVideo(false)}
|
onClose={() => setShowVideo(false)}
|
||||||
>
|
>
|
||||||
<div style={{ height: 'clamp(300px, 30vw, 600px)', }}>
|
<div style={{ height: 'clamp(300px, 30vw, 600px)', }}>
|
||||||
<MowerAllView
|
<MowerAllView
|
||||||
serialNumber={executingRobot.serialNumber}
|
serialNumber={executingRobot.serialNumber}
|
||||||
robotVideo={robotVideo}
|
robotVideo={robotVideo}
|
||||||
|
|||||||
Reference in New Issue
Block a user