diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index 43ad006..7860209 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -176,10 +176,6 @@ function Home() { const user = await getUserInfo(); - // 交警和邮管不能在小程序主界面地图上看到任何一个车辆的定位 - if(Taro.getStorageSync('RoleCode') == 'jiaojing' || Taro.getStorageSync('RoleCode') == 'youzheng'){ - return false - } if (latitude) { // @ts-ignore where.latitude = latitude @@ -198,6 +194,11 @@ function Home() { // @ts-ignore where.organizationId = user.organizationId; } + // 邮管(youzheng)可以查看管辖范围内车辆,通过 organizationParentId 查询 + if (roleCode == 'youzheng') { + // @ts-ignore + where.organizationParentId = user.organizationId; + } if (roleCode == 'kuaidi') { // @ts-ignore where.organizationParentId = user.organizationId;