fix(index): 修复邮管角色车辆定位查看权限问题
- 移除交警和邮管角色禁止地图查看车辆定位的限制 - 允许邮管角色通过 organizationParentId 查询管辖范围内车辆 - 保持快递角色使用 organizationParentId 查询车辆不变
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user