人员定位增加港区参数

master
LiuJiaNan 2026-08-12 15:23:50 +08:00
parent ffacaf7258
commit 5c802a5810
2 changed files with 3 additions and 2 deletions

View File

@ -72,6 +72,7 @@ function BottomUtils(props) {
const { connect: peoplePositionConnect, disconnect: peoplePositionDisconnect } = usePeoplePosition(
mapMethods,
currentBranchOffice,
portArea,
setPeopleList,
);

View File

@ -3,7 +3,7 @@ import { useRef } from "react";
import edgeQHD from "./edge/qhd.js";
import { isPointWithinTheArea } from "./utils";
export default function usePeoplePosition(mapMethods, currentBranchOffice, onPeopleChange) {
export default function usePeoplePosition(mapMethods, currentBranchOffice, portArea, onPeopleChange) {
const markType = "peoplePosition";
const points = useRef([]);
@ -12,7 +12,7 @@ export default function usePeoplePosition(mapMethods, currentBranchOffice, onPeo
const apiHost = window.process.env.app.API_HOST
.replace(/^https?:\/\//, "")
.replace(/\/$/, "");
const wsUrl = `${wsProtocol}//${apiHost}/personnelPosition/ws/location?corpinfoId=${currentBranchOffice}`;
const wsUrl = `${wsProtocol}//${apiHost}/personnelPosition/ws/location?corpinfoId=${currentBranchOffice}&portArea=${portArea}`;
const onMessage = async (message) => {
const data = JSON.parse(message.data);