地图轨迹跳转链接优化,更换轨迹查询接口

main
xuechunyuan 3 years ago
parent aef46e8cbf
commit d1b9550b87
  1. 4
      public/index.html
  2. 6
      src/api/data.js
  3. 3
      src/views/components/carMile.vue
  4. 13
      src/views/components/pathMap.vue

@ -8,8 +8,8 @@
<title><%= htmlWebpackPlugin.options.title %></title>
<!-- <script src="//mapopen.bj.bcebos.com/github/BMapGLLib/TrackAnimation/src/TrackAnimation.min.js"></script> -->
<script src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=FLPUL1102GNBvV2nVDy5kDIjYM9VGyYl"></script>
<script src="//mapv.baidu.com/build/mapv.min.js"></script>
<script src="https://unpkg.com/mapvgl@1.0.0-beta.168/dist/mapvgl.min.js"></script>
<!-- <script src="//mapv.baidu.com/build/mapv.min.js"></script> -->
<!-- <script src="https://unpkg.com/mapvgl@1.0.0-beta.168/dist/mapvgl.min.js"></script> -->
<style>
*{
padding: 0;

@ -28,6 +28,12 @@ export const lunzApi = {
method: 'post',
data,
}),
//指定设备某一天的轨迹记录
getLocationsByImei2: (appKey, data) => request({
url: '/api/PIInfo/getArcTrackbyimei?appKey=' + appKey,
method: 'post',
data,
}),
//设备昨日公里数
getYesterdayMile: (key) => request({
url: '/gatewayapi/ApiPlat/GetYesterdayMile',

@ -33,7 +33,7 @@
<div style="cursor:pointer;">{{ item.cardNo }}</div>
</td>
<td><div>{{ item.mile }}</div></td>
<td><a class="btn_path" :href="`https://lcrm3.lunz.cn/#/Equipment/LocatMonitor/Path/${item.key}`"
<td><a class="btn_path" :href="`https://gatewayapi.lunz.cn/api/ApiPlat/LocatInfoAllPage?imei=${item.deviceId}&KEY=${locationKey}&messkey=1`"
target="_blank">查询</a></td>
</tr>
</tbody>
@ -49,6 +49,7 @@ export default {
return {
carList: carList,//
carMile: [],
locationKey:key
}
},
mounted() {

@ -62,7 +62,7 @@ export default {
this.baiduMap.setMapStyleV2({
styleJson: styleJson
})
alert('自定义样式')
// alert('')
// this.view = new mapvgl.View({
// map: this.baiduMap
// });
@ -255,7 +255,14 @@ export default {
"EndTime": dateFormat(new Date(yesterDay1), 'yyyy-MM-dd'),
"MaxValue": 500
}
lunzApi.getLocationsByImei(this.key, param).then(res => {
param = {
"IMEI": deviceId,
"StartDateTime":dateFormat(new Date(yesterDay2), 'yyyy-MM-dd'),
"EndDateTime":dateFormat(new Date(yesterDay1), 'yyyy-MM-dd'),
"MaxValues":500,
"LocType":1
}
lunzApi.getLocationsByImei2(this.appKey, param).then(res => {
if (res.Data == null) {
this.$message({
message: '未查询到今日行车轨迹',
@ -264,7 +271,7 @@ export default {
return;
}
let point = [];
res.Data.map(item => {
res.Data.Locations.map(item => {
point.push(new BMapGL.Point(item.Lng, item.Lat));
});
if (this.polyline) {

Loading…
Cancel
Save