|
|
@ -43,7 +43,7 @@ |
|
|
|
<div class="event-item " origin="right">本年:<span>{{ earlyWarningEvents.year }}</span> 起</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="box-title"><span>在途车辆统计</span></div> |
|
|
|
<div class="box-title"><span>日累计车流量</span></div> |
|
|
|
<div class="box-content2"> |
|
|
|
<div class="count"> |
|
|
|
<div class="charts " ref="carStatisticsEchartBox"></div> |
|
|
@ -157,39 +157,19 @@ export default { |
|
|
|
}, |
|
|
|
bindCharts(){ |
|
|
|
const today = moment().format('YYYY-MM-DD') |
|
|
|
|
|
|
|
request({ |
|
|
|
url: '/business/traffic-statistics/history/realTimeTrafficFlow', |
|
|
|
method: 'get', |
|
|
|
params: { |
|
|
|
startDate: today, |
|
|
|
periodType: 4, |
|
|
|
direction: 1 |
|
|
|
} |
|
|
|
}).then(res1=>{ |
|
|
|
request({ |
|
|
|
url: '/business/traffic-statistics/history/realTimeTrafficFlow', |
|
|
|
url: '/business/traffic-statistics/history/trafficFlowAtTollTypes', |
|
|
|
method: 'get', |
|
|
|
params: { |
|
|
|
startDate: today, |
|
|
|
periodType: 4, |
|
|
|
direction: 3 |
|
|
|
} |
|
|
|
}).then(res3=>{ |
|
|
|
// totalPassengerFlow 客车 typeSpecialVehicleFlow//特种车 typeTruckFlow 其他 |
|
|
|
let total = 0, p0 = 0, p1=0,p2=0,_p0 = 0, _p1=0,_p2=0; |
|
|
|
res1.data.forEach(x=>{ |
|
|
|
total+=(x.totalPassengerFlow+x.typeTruckFlow+x.typeSpecialVehicleFlow) |
|
|
|
p0 += x.totalPassengerFlow |
|
|
|
p1 += x.typeSpecialVehicleFlow |
|
|
|
p2 += x.typeTruckFlow |
|
|
|
}) |
|
|
|
res3.data.forEach(x=>{ |
|
|
|
|
|
|
|
total+=(x.totalPassengerFlow+x.typeTruckFlow+x.typeSpecialVehicleFlow) |
|
|
|
p0 += x.totalPassengerFlow |
|
|
|
p1 += x.typeSpecialVehicleFlow |
|
|
|
p2 += x.typeTruckFlow |
|
|
|
}) |
|
|
|
total+=(res3.data.bus +res3.data.truck) |
|
|
|
p0 += res3.data.bus |
|
|
|
p1 += res3.data.truck |
|
|
|
|
|
|
|
if(total > 0){ |
|
|
|
_p0 = parseFloat((p0/total*100).toFixed(1)) |
|
|
@ -216,7 +196,7 @@ export default { |
|
|
|
myChart3.setOption(otherStatistics); |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
bindTrafficIncident(){ |
|
|
|
// 预警事件 |
|
|
|