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