Commit dc9f6d5b by 匡雅琴

提交

1 parent a8329824
......@@ -108,8 +108,10 @@
<!-- 用车行为分析 -->
<div class="use-car-box">
<div class="title">用车行为分析</div>
<LineCharts class="line-charts" v-if="useCarData.length" id="useCarCharts" ref="useCarChartsRef" height="250px"
<div class="line-charts" v-if="xAxisDataList.length">
<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="">
<div>暂无里程数据</div>
......@@ -334,13 +336,15 @@ export default {
this.useCarData = []
return
}
let _int = res.data.statisticsType == 1 ? 'weekInt' : 'dayInt'
let _type = res.data.statisticsType == 1 ? 'weekNum' : 'dayNum'
_dataList.forEach(item => {
this.xAxisDataList.push(res.data.statisticsType == 1 ? item.weekInt : item.dayInt)
this.useCarData.push(res.data.statisticsType == 1 ? item.weekNum : item.dayNum)
this.xAxisDataList.push(item[_int])
this.useCarData.push(item[_type])
})
this.$nextTick(() => {
setTimeout(() => {
this.$refs.useCarChartsRef.drawBarLine()
})
}, 1000)
})
}
},
......
......@@ -507,7 +507,8 @@ MapService.prototype = {
}
riskBtn.onclick = function() {
console.log(info);
queryCode = `vehicleId=${info.vidCode}`
let id = info.vidCode || localStorage.getItem('vehicleId');
queryCode = `vehicleId=${id}`
mapService.openPage(`#/monitor/alarmAnalysis?${queryCode}`)
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!