Commit b813194d by 匡雅琴

提测

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