feb955a5
liuqimichale
车流量section
|
1
2
3
|
<template>
<div>
<titlesection title="今日车流量"></titlesection>
|
4831b33d
liuqimichale
进出场
|
4
|
<lineChart :chart-data="lineChartData" class="flexfm inout-wrap" >
|
feb955a5
liuqimichale
车流量section
|
5
6
7
8
9
10
|
</lineChart>
</div>
</template>
<script>
import titlesection from '../components/titlesection'
|
feb955a5
liuqimichale
车流量section
|
11
|
import lineChart from '../components/lineChart'
|
adf82b69
liuqimichale
调取接口
|
12
|
import { dayAddress } from '../api/api'
|
feb955a5
liuqimichale
车流量section
|
13
14
15
16
17
18
19
20
21
|
export default {
name: 'vehiclesection',
components: {
titlesection,
lineChart
},
data() {
return {
|
adf82b69
liuqimichale
调取接口
|
22
|
lineChartData: {},
|
feb955a5
liuqimichale
车流量section
|
23
24
25
26
27
|
dzNum: '23454',
ydpNum: '4454'
}
},
created() {
|
adf82b69
liuqimichale
调取接口
|
28
|
this.getList()
|
feb955a5
liuqimichale
车流量section
|
29
30
31
|
},
methods: {
getList() {
|
adf82b69
liuqimichale
调取接口
|
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
dayAddress({
orgIds: this.GLOBAL.paramsvariables
}).then((response)=>{
const data = response.data.data
let xData = [], indata = [], outdata = []
for (let i=0;i<data.length;i++){
xData.push(data[i].queryDate)
indata.push(data[i].inNum)
outdata.push(data[i].outNum)
}
this.lineChartData = {
xData: xData,
yData: {
indata:indata,
outdata:outdata,
},
legendData: ['出场','进场']
}
})
|
feb955a5
liuqimichale
车流量section
|
51
52
53
54
55
56
57
58
59
60
61
|
},
}
}
</script>
<style lang="scss" scoped>
.inout-wrap{
display: flex;
}
</style>
|