Commit b813194d by 匡雅琴

提测

1 parent dc9f6d5b
...@@ -55,9 +55,9 @@ export default { ...@@ -55,9 +55,9 @@ export default {
type: 'value', type: 'value',
name: '公里', name: '公里',
boundaryGap: true,//坐标轴两边留白 boundaryGap: true,//坐标轴两边留白
min: 0, // min: 0,
max: 1500, // max: 1500,
interval: 300, // interval: 300,
axisLabel: { axisLabel: {
interval: 0, interval: 0,
margin: 2, margin: 2,
......
...@@ -104,7 +104,7 @@ export default { ...@@ -104,7 +104,7 @@ export default {
fontSize: 12, fontSize: 12,
formatter: function(val) { formatter: function(val) {
if (!storedList.length) { if (!storedList.length) {
return `{无警情<br/>无风险}`; return `无警情`;
} else { } else {
return `${storedList[0].alarmLevel / 1}级警情`; return `${storedList[0].alarmLevel / 1}级警情`;
} }
...@@ -129,7 +129,8 @@ export default { ...@@ -129,7 +129,8 @@ export default {
y: 1, y: 1,
x1: 1, x1: 1,
y1: 0, y1: 0,
colorStops: [{ colorStops: [
{
offset: 0, offset: 0,
color: '#4ED5D7' color: '#4ED5D7'
}, },
...@@ -144,10 +145,12 @@ export default { ...@@ -144,10 +145,12 @@ export default {
{ {
offset: 0.8, offset: 0.8,
color: '#F38906' color: '#F38906'
}, { },
{
offset: 1, offset: 1,
color: '#F23204' color: '#F23204'
}] }
]
}], }],
[1, "#46495E"] [1, "#46495E"]
] ]
......
...@@ -101,7 +101,9 @@ ...@@ -101,7 +101,9 @@
<div>定位-{{ item.address }}</div> <div>定位-{{ item.address }}</div>
</div> </div>
</template> </template>
<template v-else><div class="detail-msg-desc">--</div></template> <template v-else>
<div class="detail-msg-desc">--</div>
</template>
</div> </div>
</div> </div>
</div> </div>
...@@ -109,8 +111,8 @@ ...@@ -109,8 +111,8 @@
<div class="use-car-box"> <div class="use-car-box">
<div class="title">用车行为分析</div> <div class="title">用车行为分析</div>
<div class="line-charts" v-if="xAxisDataList.length"> <div class="line-charts" v-if="xAxisDataList.length">
<LineCharts id="useCarCharts" ref="useCarChartsRef" height="250px" <LineCharts id="useCarCharts" ref="useCarChartsRef" height="250px" :dataList="useCarData"
:dataList="useCarData" :xAxisData="xAxisDataList"></LineCharts> :xAxisData="xAxisDataList"></LineCharts>
</div> </div>
<div v-else class="empty-box"> <div v-else class="empty-box">
<img src="../../assets/images/empty-status.png" alt=""> <img src="../../assets/images/empty-status.png" alt="">
...@@ -150,7 +152,8 @@ export default { ...@@ -150,7 +152,8 @@ export default {
}, },
useCarData: [], useCarData: [],
xAxisDataList: [], xAxisDataList: [],
pieList: [] pieList: [],
resultList: [],
}; };
}, },
...@@ -159,12 +162,11 @@ export default { ...@@ -159,12 +162,11 @@ export default {
_this.$mapInit({ version: '1.4.2' }).then(AMap => { _this.$mapInit({ version: '1.4.2' }).then(AMap => {
window.AMap = AMap; window.AMap = AMap;
_this.initMap(); _this.initMap();
setTimeout(() => {
_this.getStayPointList(_vehicleId)
}, 500)
}) })
// _this.$refs.pieChartsRef.draw()
// _this.$refs.useCarChartsRef.drawBarLine()
// _this.searchAlarm()
const _vehicleId = _this.$route.query.vehicleId const _vehicleId = _this.$route.query.vehicleId
_this.getStayPointList(_vehicleId)
_this.getBasicInformation(_vehicleId) _this.getBasicInformation(_vehicleId)
_this.getResidentInformation(_vehicleId) _this.getResidentInformation(_vehicleId)
_this.getAlarmInformation(_vehicleId) _this.getAlarmInformation(_vehicleId)
...@@ -184,19 +186,19 @@ export default { ...@@ -184,19 +186,19 @@ export default {
) { ) {
window.AMap = AMap; window.AMap = AMap;
this.mapObj = mapService.init("map"); this.mapObj = mapService.init("map");
//this.bindEvent(); //this.bindEvent();
this.isInitMap = true; this.isInitMap = true;
// this.drawPoi() // this.drawPoi()
} else { } else {
this.checkMapLoaded = check(); this.checkMapLoaded = check();
} }
}, 100); }, 10);
}; };
this.checkMapLoaded = check(); this.checkMapLoaded = check();
}, },
// 设备停留点查询 // 设备停留点查询
getStayPointList(vehicleId) { getStayPointList(vehicleId) {
EventBus.$emit("uiMap.historyLocation.destroy");
GET_STAY_POINTLIST({ vehicleId }).then(res => { GET_STAY_POINTLIST({ vehicleId }).then(res => {
if (res.code != 200) { if (res.code != 200) {
this.$message({ this.$message({
...@@ -266,11 +268,9 @@ export default { ...@@ -266,11 +268,9 @@ export default {
item.endtime = item.endTime; item.endtime = item.endTime;
item.transferAddress = item.address || "--"; // 取后端返回address item.transferAddress = item.address || "--"; // 取后端返回address
}); });
console.log(_data); this.resultList = _data;
this.$nextTick(() => {
EventBus.$emit("uiMap.historyLocation.draw", _data); EventBus.$emit("uiMap.historyLocation.draw", _data);
}) })
})
}, },
// 获取车辆基本信息 // 获取车辆基本信息
getBasicInformation(vehicleId) { getBasicInformation(vehicleId) {
...@@ -312,7 +312,7 @@ export default { ...@@ -312,7 +312,7 @@ export default {
} }
this.alarmData.data = res.data.length > 6 ? res.data.slice(0, 6) : res.data this.alarmData.data = res.data.length > 6 ? res.data.slice(0, 6) : res.data
let _list = res.data let _list = res.data
if (_list.length === 0) { if (_list.length !== 0) {
this.$refs.pieChartsRef.draw() this.$refs.pieChartsRef.draw()
return return
} }
...@@ -354,7 +354,7 @@ export default { ...@@ -354,7 +354,7 @@ export default {
}); });
}, },
beforeDestroy() { beforeDestroy() {
this.checkLoadedTimeoutId && window.clearTimeout(this.checkLoadedTimeoutId); // this.checkLoadedTimeoutId && window.clearTimeout(this.checkLoadedTimeoutId);
}, },
}; };
</script> </script>
...@@ -415,7 +415,7 @@ export default { ...@@ -415,7 +415,7 @@ export default {
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
color: #FFFFFF; color: #FFFFFF;
min-width: 100px; width: 120px;
} }
&-right { &-right {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!