Commit 9e1186d9 authored by xiejb's avatar xiejb
parents a77087a0 109914f5
......@@ -6,16 +6,12 @@
(stepList&&stepList.length > 0)||
(orderInfo.isCold && coldInfo && coldInfo.length > 0)) && !shoppingLoading"/>
<!-- 高德地图 -->
<a-map-view :transport="sendType" :point-list="mapPointList" :drive-point="driveLine"
v-if="mapPointList&&mapPointList.length > 0"/>
<div style="height:300px;
background-color:#fff;
line-height:300px;
text-align:center;
border-bottom: 1px solid #eeeeee"
v-else-if="(!shoppingLoading)">
<div style="position:relative;height:300px" v-if="gpsLoading || (mapPointList&&mapPointList.length > 0)">
<a-map-view :transport="sendType" :point-list="mapPointList" :drive-point="driveLine" v-if="!gpsLoading && (mapPointList&&mapPointList.length > 0)"/>
<div class="map-loading" v-if="gpsLoading">
{{ mapDataLoadingText }}
</div>
</div>
<!-- 物流主信息 -->
<div class="logistics-header">
<van-skeleton avatar :row="3" :loading="shoppingLoading"
......@@ -89,6 +85,7 @@ export default {
orderInfo: this.$route.query,
temperatureActive: 0,
shoppingLoading: true,
gpsLoading: false,
mapDataLoadingText: '地图数据加载中...',
icons: {
logo: require('@/assets/img/u48.png'),
......@@ -236,6 +233,7 @@ export default {
},
/* GPS 定位信息 */
getGpsPoint() {
this.gpsLoading = true
let data = {
'orderType': this.orderInfo.orderType, // 'SALE',
'shippingNo': this.shippingInfo.shippingNo, // '3S1255202103190010',
......@@ -252,12 +250,14 @@ export default {
this.$toast(res.msg)
this.mapDataLoadingText = res.msg
}
this.mapDataLoadingText = '定位数据请求失败'
this.mapDataLoadingText = '定位数据请求失败或无数据'
}
this.gpsLoading = false
}).catch(err => {
console.log('GPS信息', err)
this.mapDataLoadingText = '定位数据请求失败'
this.$toast('定位数据请求失败')
this.gpsLoading = false
})
},
/* 获取温度变化趋势数据 */
......@@ -290,6 +290,21 @@ export default {
height: calc(100vh - 46px);
overflow: scroll;
.map-loading {
height: 100px;
width: 100px;
background-color: rgb(255, 255, 255);
border-radius: 10px;
line-height: 100px;
text-align: center;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
}
.logistics-header {
background-color: #fff;
border-bottom: 1px solid $line;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment