diff --git a/src/App.vue b/src/App.vue
index 6b7875d..23890be 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -15,4 +15,10 @@
color: #2c3e50;
overflow: hidden;
}
+.el-message{
+ padding:0.2rem !important;
+}
+.el-message__icon,.el-message__content{
+ font-size: 16px !important;
+}
diff --git a/src/views/components/carWarn.vue b/src/views/components/carWarn.vue
index 1fd09b4..bd0fbcb 100644
--- a/src/views/components/carWarn.vue
+++ b/src/views/components/carWarn.vue
@@ -53,14 +53,15 @@ export default {
let yesterDay1 = now.setDate(now.getDate() - 1);
let param = {
"StartTime": dateFormat(new Date(yesterDay1), 'yyyy-MM-dd'),
- "EndTime": dateFormat(new Date(), 'yyyy-MM-dd')
+ "EndTime": dateFormat(new Date(), 'yyyy-MM-dd'),
+ "Imei": "41000001254"
}
lunzApi.getMessInfoByMessType(key, param).then(res => {
let resData = res.Data;
resData.map(item => {
let idx = this.carList.findIndex(item2 => item2.deviceId == item.Imei);
item.carNo = idx > -1 ? this.carList[idx].cardNo : '-';
- item.TimeStamp = dateFormat(new Date(TimeStamp), 'yyyy-MM-dd hh:mm:ss')
+ item.TimeStamp = dateFormat(new Date(item.TimeStamp), 'yyyy-MM-dd hh:mm:ss')
this.carWarn.push(item);
})
})
diff --git a/src/views/components/pathMap.vue b/src/views/components/pathMap.vue
index 3cb645b..83d81a8 100644
--- a/src/views/components/pathMap.vue
+++ b/src/views/components/pathMap.vue
@@ -103,7 +103,7 @@ export default {
时速:${res.Data.spd}km/h
海拔:${res.Data.alt}
ACC检测:${this.locationAcc[res.Data.acc]}
- 昨日轨迹
+ 行车轨迹
`;
let infoWindow = new BMapGL.InfoWindow(sContent);
// marker添加点击事件
@@ -124,11 +124,10 @@ export default {
queryPath(deviceId) {
let now = new Date();
let yesterDay1 = now.setDate(now.getDate() - 1);
- let yesterDay2 = now.setDate(now.getDate() - 1);
let param = {
"Imei": deviceId,
- "StartTime": dateFormat(new Date(yesterDay2), 'yyyy-MM-dd'),
- "EndTime": dateFormat(new Date(yesterDay1), 'yyyy-MM-dd'),
+ "StartTime": dateFormat(new Date(yesterDay1), 'yyyy-MM-dd'),
+ "EndTime": dateFormat(new Date(), 'yyyy-MM-dd'),
"MaxValue": 500
}
lunzApi.getLocationsByImei(this.key, param).then(res => {
@@ -142,16 +141,21 @@ export default {
}
// this.polyline = new BMapGL.Polyline(point, { strokeColor: '#F5533D', strokeWeight: 2, strokeOpacity: 1, })
// this.baiduMap.addOverlay(this.polyline);
- this.polyline = new BMapGL.Polyline(point,{
- strokeColor: '#F5533D',
- strokeWeight: 3,
- strokeOpacity: 1,
+ this.polyline = new BMapGL.Polyline(point, {
+ strokeColor: '#F5533D',
+ strokeWeight: 3,
+ strokeOpacity: 1,
});
let trackAni = new BMapGLLib.TrackAnimation(this.baiduMap, this.polyline, {
- overallView: true,
- tilt: 30,
- duration: 20000,
- delay: 300
+ overallView: true,
+ tilt: 30,
+ duration: 20000,
+ delay: 300
+ }, error => {
+ this.$message({
+ message: '未查询到今日行车轨迹',
+ type: 'warning'
+ });
});
trackAni.start();
})