outsection.vue
1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<template>
<div>
<titlesection title="周出场统计"></titlesection>
<div style="padding: 10px 10px;width: 100%;height: calc(100% - 30px)">
<arealineChart :chart-data="lineChartData" class=" inout-wrap" >
</arealineChart>
</div>
</div>
</template>
<script>
import titlesection from '../components/titlesection'
import arealineChart from '../components/arealineChart'
import { weekAddress } from '../api/api'
export default {
name: 'outsection',
components: {
titlesection,
arealineChart
},
data() {
return {
lineChartData: {},
}
},
created() {
this.getList()
},
methods: {
getList() {
weekAddress({
orgIds: this.GLOBAL.paramsvariables
}).then((response)=>{
const data = response.data.data
let xData = [], indata = [], outdata = [], lastInNum;
for (let i=0;i<data.length;i++){
xData.push(data[i].queryDate)
indata.push(data[i].inNum)
outdata.push(data[i].outNum)
lastInNum = data[data.length-1].inNum
}
this.$store.dispatch('transferOrderTotal',lastInNum)
this.lineChartData = {
xData: xData,
yData: {
indata:indata,
outdata:outdata,
},
legendData: ['出场','进场']
}
})
},
}
}
</script>
<style lang="scss" scoped>
.inout-wrap{
padding: 10px 10px;
box-sizing: border-box;
background: url(../assets/img/border.svg) no-repeat;
background-size: 100% 100%;
width: 100%;
height: 100%;
}
</style>