From 6136851ade0367d0a148ca81c550a41c914a9fb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Wed, 29 Apr 2026 22:07:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(index):=20=E4=BF=AE=E5=A4=8D=E9=82=AE?= =?UTF-8?q?=E7=AE=A1=E8=A7=92=E8=89=B2=E8=BD=A6=E8=BE=86=E5=AE=9A=E4=BD=8D?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E6=9D=83=E9=99=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除交警和邮管角色禁止地图查看车辆定位的限制 - 允许邮管角色通过 organizationParentId 查询管辖范围内车辆 - 保持快递角色使用 organizationParentId 查询车辆不变 --- src/pages/index/index.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index 7860209..c5d9b8c 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -197,7 +197,10 @@ function Home() { // 邮管(youzheng)可以查看管辖范围内车辆,通过 organizationParentId 查询 if (roleCode == 'youzheng') { // @ts-ignore - where.organizationParentId = user.organizationId; + // where.organizationParentId = undefined; + where.limit = 1000; + // @ts-ignore + where.status = 1; } if (roleCode == 'kuaidi') { // @ts-ignore @@ -213,7 +216,7 @@ function Home() { // 转换WGS84坐标到GCJ02坐标 let markerLat = item.latitude; let markerLng = item.longitude; - + if (item.latitude && item.longitude && !isNaN(item.latitude) && !isNaN(item.longitude) && @@ -231,7 +234,7 @@ function Home() { console.error('标记点坐标转换错误:', error); } } - + // @ts-ignore arr.push({ id: item.id, @@ -279,11 +282,11 @@ function Home() { setList(res?.list || []) if (res?.list && res?.list.length > 0) { const data = res?.list[0]; - + // 转换WGS84坐标到GCJ02坐标 let displayLat = data.latitude; let displayLng = data.longitude; - + if (data.latitude && data.longitude && !isNaN(data.latitude) && !isNaN(data.longitude) && @@ -301,7 +304,7 @@ function Home() { console.error('搜索结果坐标转换错误:', error); } } - + setLongitude(displayLng) setLatitude(displayLat) if (isAdmin) {