@fleet-frontend/mower-maps 0.2.0-beta.56 → 0.2.0-beta.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +19 -16
- package/dist/index.js +19 -16
- package/dist/render/MowerMapRenderer.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -29158,27 +29158,30 @@ modelType, showStraddleBoundaryBorder = true, mapRef, mapJson, pathJson, realTim
|
|
|
29158
29158
|
}
|
|
29159
29159
|
const positionData = realTimeData?.find((item) => item?.type === RealTimeDataType.LOCATION);
|
|
29160
29160
|
if (positionData) {
|
|
29161
|
-
|
|
29162
|
-
if (
|
|
29161
|
+
// 如果当前是taskDelay的状态,或者状态为mowing或者standby,则指定的地块需要高亮,或者全局高亮
|
|
29162
|
+
if ((positionData?.taskDelay || positionData?.vehicleState === RobotStatus.MOWING || positionData?.vehicleState === RobotStatus.STANDBY) &&
|
|
29163
|
+
curMowPartitionData &&
|
|
29164
|
+
!curMowPartitionData?.partitionIds) {
|
|
29165
|
+
// 设置全局高亮
|
|
29166
|
+
if (curMowPartitionData &&
|
|
29167
|
+
!curMowPartitionData?.partitionIds) {
|
|
29168
|
+
const allPartitionIds = generateBoundaryData(mapJson)
|
|
29169
|
+
?.filter((item) => !item?.isIsolated)
|
|
29170
|
+
.map((item) => item?.id);
|
|
29171
|
+
setMowPartitionData({
|
|
29172
|
+
partitionIds: allPartitionIds,
|
|
29173
|
+
});
|
|
29174
|
+
curMowPartitionData = {
|
|
29175
|
+
partitionIds: allPartitionIds,
|
|
29176
|
+
};
|
|
29177
|
+
}
|
|
29178
|
+
}
|
|
29179
|
+
else if (!positionData?.taskDelay && positionData?.vehicleState === RobotStatus.WORKING) {
|
|
29163
29180
|
// 兜底收不到割草地块的实时数据,使用状态来兜底
|
|
29164
29181
|
setMowingPartitions(undefined);
|
|
29165
29182
|
setMowPartitionData({});
|
|
29166
29183
|
curMowPartitionData = {};
|
|
29167
29184
|
}
|
|
29168
|
-
else if (currentStatus === RobotStatus.MOWING &&
|
|
29169
|
-
curMowPartitionData &&
|
|
29170
|
-
!curMowPartitionData?.partitionIds) {
|
|
29171
|
-
// 如果当前是割草状态,但是地块数据初始化过且不存在则认为是全局割草,则把所有非孤立子区域地块都高亮
|
|
29172
|
-
const allPartitionIds = generateBoundaryData(mapJson)
|
|
29173
|
-
?.filter((item) => !item?.isIsolated)
|
|
29174
|
-
.map((item) => item?.id);
|
|
29175
|
-
setMowPartitionData({
|
|
29176
|
-
partitionIds: allPartitionIds,
|
|
29177
|
-
});
|
|
29178
|
-
curMowPartitionData = {
|
|
29179
|
-
partitionIds: allPartitionIds,
|
|
29180
|
-
};
|
|
29181
|
-
}
|
|
29182
29185
|
}
|
|
29183
29186
|
if (!mapJson || !svgMapRef.current)
|
|
29184
29187
|
return;
|
package/dist/index.js
CHANGED
|
@@ -29178,27 +29178,30 @@ modelType, showStraddleBoundaryBorder = true, mapRef, mapJson, pathJson, realTim
|
|
|
29178
29178
|
}
|
|
29179
29179
|
const positionData = realTimeData?.find((item) => item?.type === RealTimeDataType.LOCATION);
|
|
29180
29180
|
if (positionData) {
|
|
29181
|
-
|
|
29182
|
-
if (
|
|
29181
|
+
// 如果当前是taskDelay的状态,或者状态为mowing或者standby,则指定的地块需要高亮,或者全局高亮
|
|
29182
|
+
if ((positionData?.taskDelay || positionData?.vehicleState === RobotStatus.MOWING || positionData?.vehicleState === RobotStatus.STANDBY) &&
|
|
29183
|
+
curMowPartitionData &&
|
|
29184
|
+
!curMowPartitionData?.partitionIds) {
|
|
29185
|
+
// 设置全局高亮
|
|
29186
|
+
if (curMowPartitionData &&
|
|
29187
|
+
!curMowPartitionData?.partitionIds) {
|
|
29188
|
+
const allPartitionIds = generateBoundaryData(mapJson)
|
|
29189
|
+
?.filter((item) => !item?.isIsolated)
|
|
29190
|
+
.map((item) => item?.id);
|
|
29191
|
+
setMowPartitionData({
|
|
29192
|
+
partitionIds: allPartitionIds,
|
|
29193
|
+
});
|
|
29194
|
+
curMowPartitionData = {
|
|
29195
|
+
partitionIds: allPartitionIds,
|
|
29196
|
+
};
|
|
29197
|
+
}
|
|
29198
|
+
}
|
|
29199
|
+
else if (!positionData?.taskDelay && positionData?.vehicleState === RobotStatus.WORKING) {
|
|
29183
29200
|
// 兜底收不到割草地块的实时数据,使用状态来兜底
|
|
29184
29201
|
setMowingPartitions(undefined);
|
|
29185
29202
|
setMowPartitionData({});
|
|
29186
29203
|
curMowPartitionData = {};
|
|
29187
29204
|
}
|
|
29188
|
-
else if (currentStatus === RobotStatus.MOWING &&
|
|
29189
|
-
curMowPartitionData &&
|
|
29190
|
-
!curMowPartitionData?.partitionIds) {
|
|
29191
|
-
// 如果当前是割草状态,但是地块数据初始化过且不存在则认为是全局割草,则把所有非孤立子区域地块都高亮
|
|
29192
|
-
const allPartitionIds = generateBoundaryData(mapJson)
|
|
29193
|
-
?.filter((item) => !item?.isIsolated)
|
|
29194
|
-
.map((item) => item?.id);
|
|
29195
|
-
setMowPartitionData({
|
|
29196
|
-
partitionIds: allPartitionIds,
|
|
29197
|
-
});
|
|
29198
|
-
curMowPartitionData = {
|
|
29199
|
-
partitionIds: allPartitionIds,
|
|
29200
|
-
};
|
|
29201
|
-
}
|
|
29202
29205
|
}
|
|
29203
29206
|
if (!mapJson || !svgMapRef.current)
|
|
29204
29207
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MowerMapRenderer.d.ts","sourceRoot":"","sources":["../../src/render/MowerMapRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAuBf,OAAO,EAGL,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AA0B3B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,GAAG,CAAC;KACb;CACF;AA8FD,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"MowerMapRenderer.d.ts","sourceRoot":"","sources":["../../src/render/MowerMapRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAuBf,OAAO,EAGL,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AA0B3B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,GAAG,CAAC;KACb;CACF;AA8FD,eAAO,MAAM,gBAAgB,mGAutB5B,CAAC;AAIF,eAAe,gBAAgB,CAAC;AAChC,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,CAAC"}
|