feb955a5
liuqimichale
车流量section
|
1
2
3
|
<template>
<div>
<titlesection title="今日车流量"></titlesection>
|
159ba68d
liuqimichale
火狐兼容性
|
4
5
6
7
|
<div style="padding: 10px 10px;width: 100%;height: calc(100% - 30px)">
<lineChart :chart-data="lineChartData" class=" inout-wrap" >
</lineChart>
</div>
|
feb955a5
liuqimichale
车流量section
|
8
9
10
11
12
|
</div>
</template>
<script>
import titlesection from '../components/titlesection'
|
feb955a5
liuqimichale
车流量section
|
13
|
import lineChart from '../components/lineChart'
|
adf82b69
liuqimichale
调取接口
|
14
|
import { dayAddress } from '../api/api'
|
feb955a5
liuqimichale
车流量section
|
15
16
17
18
19
20
21
22
23
|
export default {
name: 'vehiclesection',
components: {
titlesection,
lineChart
},
data() {
return {
|
adf82b69
liuqimichale
调取接口
|
24
|
lineChartData: {},
|
feb955a5
liuqimichale
车流量section
|
25
26
27
28
29
|
dzNum: '23454',
ydpNum: '4454'
}
},
created() {
|
adf82b69
liuqimichale
调取接口
|
30
|
this.getList()
|
feb955a5
liuqimichale
车流量section
|
31
32
33
|
},
methods: {
getList() {
|
adf82b69
liuqimichale
调取接口
|
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
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
|
53
54
55
56
57
58
59
|
},
}
}
</script>
<style lang="scss" scoped>
.inout-wrap{
|
159ba68d
liuqimichale
火狐兼容性
|
60
61
62
63
64
65
|
padding: 10px 10px;
box-sizing: border-box;
background: url(../assets/img/border.svg) no-repeat;
background-size: 100% 100%;
width: 100%;
height: 100%;
|
feb955a5
liuqimichale
车流量section
|
66
67
|
}
</style>
|