md
This commit is contained in:
parent
62174891d8
commit
6d87feaa93
@ -14,8 +14,11 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dayjs": "^1.11.10",
|
"@turf/turf": "^7.2.0",
|
||||||
"file-saver": "2.0.5"
|
"coordtransform": "^2.1.2",
|
||||||
|
"dayjs": "^1.11.13",
|
||||||
|
"file-saver": "2.0.5",
|
||||||
|
"maptalks": "^1.4.1"
|
||||||
},
|
},
|
||||||
"dcloudext": {
|
"dcloudext": {
|
||||||
"category": [
|
"category": [
|
||||||
|
|||||||
@ -5,9 +5,14 @@
|
|||||||
<template v-slot:body>
|
<template v-slot:body>
|
||||||
<div style="min-height: 100%;display: flex;flex-direction: column;">
|
<div style="min-height: 100%;display: flex;flex-direction: column;">
|
||||||
<view style="position: relative;">
|
<view style="position: relative;">
|
||||||
<map :markers="map.markers" :latitude="map.latitude" :longitude="map.longitude"
|
<maptalks-map
|
||||||
|
:dataList="dataList"
|
||||||
|
style="width: 750rpx;height: 70vh;"
|
||||||
|
></maptalks-map>
|
||||||
|
|
||||||
|
<!-- <map :markers="map.markers" :latitude="map.latitude" :longitude="map.longitude"
|
||||||
style="width: 750rpx;height: 400rpx;"
|
style="width: 750rpx;height: 400rpx;"
|
||||||
></map>
|
></map> -->
|
||||||
|
|
||||||
<view class="mp-base-block">
|
<view class="mp-base-block">
|
||||||
<bpd-send-reciever-tmp :value="modelInfo"></bpd-send-reciever-tmp>
|
<bpd-send-reciever-tmp :value="modelInfo"></bpd-send-reciever-tmp>
|
||||||
@ -51,7 +56,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as apiService from "@/common/api"
|
import * as apiService from "@/common/api"
|
||||||
import BpdSendRecieverTmp from "@/components/buns-post-detail-templates/bpd-send-reciever-tmp"
|
// import BpdSendRecieverTmp from "@/components/buns-post-detail-templates/bpd-send-reciever-tmp"
|
||||||
|
import BpdMapRecieverPanel from "@/components/buns-post-detail-templates/bpd-map-reciever-panel"
|
||||||
|
import maptalksMap from "@/components/map-talks/maptalks-panel"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
@ -62,13 +69,14 @@
|
|||||||
return this.$store.getters.dicData
|
return this.$store.getters.dicData
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: { BpdSendRecieverTmp },
|
components: { BpdMapRecieverPanel,maptalksMap },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
queryOption: {
|
queryOption: {
|
||||||
billCode: '', // 运单id
|
billCode: '', // 运单id
|
||||||
},
|
},
|
||||||
modelInfo: {},
|
modelInfo: {},
|
||||||
|
dataList:[],
|
||||||
map: {
|
map: {
|
||||||
latitude: 23.106574, //纬度
|
latitude: 23.106574, //纬度
|
||||||
longitude: 113.324587, //经度
|
longitude: 113.324587, //经度
|
||||||
@ -106,6 +114,33 @@
|
|||||||
let res = await apiService.getOrderDetail({billCode: this.queryOption.billCode, _loading: true})
|
let res = await apiService.getOrderDetail({billCode: this.queryOption.billCode, _loading: true})
|
||||||
// 通过对象合并才能修改父级 数据
|
// 通过对象合并才能修改父级 数据
|
||||||
Object.assign(this.modelInfo, res.data || {})
|
Object.assign(this.modelInfo, res.data || {})
|
||||||
|
|
||||||
|
const resLbs = await apiService.getLbsRecordListByBillCode({
|
||||||
|
billCode: this.queryOption.billCode
|
||||||
|
});
|
||||||
|
|
||||||
|
if (resLbs && resLbs.code === 200) {
|
||||||
|
let lbsRecordList=resLbs.data.lbsRecordList;
|
||||||
|
if( lbsRecordList && lbsRecordList.length>0){
|
||||||
|
let currentInfo=lbsRecordList[lbsRecordList.length-1];
|
||||||
|
this.map.latitude=this.cvtToWgs84(currentInfo.longitude, currentInfo.latitude)[1];
|
||||||
|
this.map.longitude=this.cvtToWgs84(currentInfo.longitude, currentInfo.latitude)[0];
|
||||||
|
|
||||||
|
this.dataList=lbsRecordList;
|
||||||
|
const points = lbsRecordList.map(item => ({
|
||||||
|
latitude: this.cvtToWgs84(item.longitude, item.latitude)[1],
|
||||||
|
longitude: this.cvtToWgs84(item.longitude, item.latitude)[0]
|
||||||
|
}));
|
||||||
|
this.map.polyline[0].points = points;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
cvtToWgs84(longitude, latitude) {
|
||||||
|
let lng = longitude / 1000000;
|
||||||
|
let lat = latitude / 1000000;
|
||||||
|
return coordtransform.wgs84togcj02(lng, lat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user