parent
4bc3b5c80f
commit
9f3bf572fd
|
|
@ -20,19 +20,14 @@ export default function usePeoplePosition(mapMethods, currentBranchOffice, portA
|
|||
const peopleList = Array.isArray(data) ? data : [data];
|
||||
for (let i = 0; i < peopleList.length; i++) {
|
||||
const item = peopleList[i];
|
||||
if (!item?.locationRawJson)
|
||||
continue;
|
||||
const location = JSON.parse(item.locationRawJson).position;
|
||||
if (!location || !location.lon || !location.lat)
|
||||
continue;
|
||||
const id = item.terminalNo || item.staffNo;
|
||||
if (!id)
|
||||
continue;
|
||||
const index = points.current.findIndex(
|
||||
item1 => item1.id.toString() === id.toString(),
|
||||
);
|
||||
const x = location.lon;
|
||||
const y = location.lat;
|
||||
const x = item.lon;
|
||||
const y = item.lat;
|
||||
// 封闭区域模式只保留围栏内人员;人员离开围栏后立即移除已有点位。
|
||||
if (filterAreas.current.length > 0 && !isPointInAreas(filterAreas.current, x, y)) {
|
||||
if (index !== -1) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue