Merge remote-tracking branch 'origin/master_dev'
# Conflicts: # src/views/dispatch/Dispatch.vue
正在显示
2 个修改的文件
包含
8 行增加
和
5 行删除
@@ -2,13 +2,15 @@ import axios from 'axios' | @@ -2,13 +2,15 @@ import axios from 'axios' | ||
2 | import http from "../http"; | 2 | import http from "../http"; |
3 | 3 | ||
4 | let baseServiceURL = 'wms-server-warehouse' | 4 | let baseServiceURL = 'wms-server-warehouse' |
5 | +const serviceName = '/cloud-user-center' | ||
5 | 6 | ||
6 | 7 | ||
7 | //车辆定位 | 8 | //车辆定位 |
8 | export const selectVehicle = params => { return axios.get(`${baseServiceURL}/map/location/lastlocation`, { params: params }); }; | 9 | export const selectVehicle = params => { return axios.get(`${baseServiceURL}/map/location/lastlocation`, { params: params }); }; |
9 | //出任务 | 10 | //出任务 |
10 | export const insertSelective = params => { return http.post(`${baseServiceURL}/map/location/insertSelective`, params); }; | 11 | export const insertSelective = params => { return http.post(`${baseServiceURL}/map/location/insertSelective`, params); }; |
11 | - | 12 | +//获取用户列表 |
13 | +export const getUserList = params => { return http.post(`${serviceName}/crm/list`, params) }; | ||
12 | 14 | ||
13 | //车辆轨迹 | 15 | //车辆轨迹 |
14 | export const historyTrack = params => { return axios.get(`${baseServiceURL}/map/location/historyTrack`, { params: params }); }; | 16 | export const historyTrack = params => { return axios.get(`${baseServiceURL}/map/location/historyTrack`, { params: params }); }; |
@@ -113,6 +113,11 @@ | @@ -113,6 +113,11 @@ | ||
113 | // 获取车辆位置信息 | 113 | // 获取车辆位置信息 |
114 | const vehicle = res.data.data.firstVcl; | 114 | const vehicle = res.data.data.firstVcl; |
115 | // 在获取车辆位置成功的部分,创建信息窗口或者自定义标记 | 115 | // 在获取车辆位置成功的部分,创建信息窗口或者自定义标记 |
116 | + | ||
117 | + if (vehicle.lon && vehicle.lat) { | ||
118 | + const lon = parseFloat(vehicle.lon) / 600000.0; // 将经度字符串转换为数值并除以 600000.0 | ||
119 | + const lat = parseFloat(vehicle.lat) / 600000.0; // 将纬度字符串转换为数值并除以 600000.0 | ||
120 | + //const coords = wgs84togcj02(lon, lat); | ||
116 | const markerContent = document.createElement('div'); | 121 | const markerContent = document.createElement('div'); |
117 | markerContent.innerHTML = ` | 122 | markerContent.innerHTML = ` |
118 | <div class="rounded-corner" STYLE="width: 200px;background-color: rgba(255,255,255,0.7);text-align: center"> | 123 | <div class="rounded-corner" STYLE="width: 200px;background-color: rgba(255,255,255,0.7);text-align: center"> |
@@ -121,10 +126,6 @@ | @@ -121,10 +126,6 @@ | ||
121 | <p>剩余距离:${vehicle.remainDistance}公里</p > | 126 | <p>剩余距离:${vehicle.remainDistance}公里</p > |
122 | </div> | 127 | </div> |
123 | `; | 128 | `; |
124 | - if (vehicle.lon && vehicle.lat) { | ||
125 | - const lon = parseFloat(vehicle.lon) / 600000.0; // 将经度字符串转换为数值并除以 600000.0 | ||
126 | - const lat = parseFloat(vehicle.lat) / 600000.0; // 将纬度字符串转换为数值并除以 600000.0 | ||
127 | - //const coords = wgs84togcj02(lon, lat); | ||
128 | // 添加车辆位置标记 | 129 | // 添加车辆位置标记 |
129 | const marker = new AMap.Marker({ | 130 | const marker = new AMap.Marker({ |
130 | position: [lon, lat], | 131 | position: [lon, lat], |
-
请 注册 或 登录 后发表评论