|
@@ -99,6 +99,7 @@
|
|
|
this.reportType = reportType
|
|
|
this.queryDate = queryDate
|
|
|
this.getRevenueTrendsData()
|
|
|
+ this.getRoadTrafficFlowData()
|
|
|
},
|
|
|
getRevenueTrendsData() {
|
|
|
uni.$u.api.operationalAnalysisApi.getRevenueTrendsDataApi({
|
|
@@ -120,6 +121,27 @@
|
|
|
console.log(this.revenueTrendsData)
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ getRoadTrafficFlowData() {
|
|
|
+ uni.$u.api.operationalAnalysisApi.getRoadTrafficFlowDataApi({
|
|
|
+ reportType: this.reportType,
|
|
|
+ queryDate: this.queryDate
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ if (res.data.itemList && res.data.itemList.length) {
|
|
|
+ this.trafficFlowData.categories = res.data.itemList.map(item => {
|
|
|
+ return item.roadName
|
|
|
+ })
|
|
|
+ this.trafficFlowData.series[0].data = res.data.itemList.map(item => {
|
|
|
+ return item.vehicleCount
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.trafficFlowData.categories = []
|
|
|
+ this.trafficFlowData.series[0].data = []
|
|
|
+ }
|
|
|
+ console.log(this.trafficFlowData)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|