eb6d1150
liuqimichale
title 总计 简单封装
|
1
|
<template>
|
cb40959e
liuqimichale
添加mock 数据
|
2
|
<div>
|
667dd190
liuqimichale
地磁
|
3
|
<titlesection title="PDA"></titlesection>
|
841f35d2
liuqimichale
filter
|
4
|
<totalsection :totalNum="totalVal"></totalsection>
|
9092f766
liuqimichale
pda
|
5
|
<bar-chart :chart-data="barChartData" class="flexfm"/>
|
cb40959e
liuqimichale
添加mock 数据
|
6
|
</div>
|
eb6d1150
liuqimichale
title 总计 简单封装
|
7
8
9
10
11
|
</template>
<script>
import titlesection from '../components/titlesection'
import totalsection from '../components/total'
|
813cafa3
liuqimichale
bar echarts
|
12
|
import barChart from '../components/barChart'
|
adf82b69
liuqimichale
调取接口
|
13
|
import { deviceAddress } from '../api/api'
|
813cafa3
liuqimichale
bar echarts
|
14
|
|
eb6d1150
liuqimichale
title 总计 简单封装
|
15
|
export default {
|
cb40959e
liuqimichale
添加mock 数据
|
16
|
name: 'pdasection',
|
eb6d1150
liuqimichale
title 总计 简单封装
|
17
18
|
components: {
titlesection,
|
813cafa3
liuqimichale
bar echarts
|
19
20
|
totalsection,
barChart
|
cb40959e
liuqimichale
添加mock 数据
|
21
|
},
|
841f35d2
liuqimichale
filter
|
22
23
|
data() {
return {
|
adf82b69
liuqimichale
调取接口
|
24
25
26
27
28
|
totalVal: '',
barChartData: {
// yData: [100,200,300],
// xData: ['正常', '异常', '故障']
}
|
841f35d2
liuqimichale
filter
|
29
30
|
}
},
|
cb40959e
liuqimichale
添加mock 数据
|
31
32
33
34
35
|
created() {
this.getList()
},
methods: {
getList() {
|
adf82b69
liuqimichale
调取接口
|
36
37
38
39
40
41
42
43
44
45
46
47
|
deviceAddress({
orgIds: this.GLOBAL.paramsvariables
}).then((response)=>{
const data = response.data.data
this.totalVal = data[0].num.toString()
let Xdata = data[0].xData.split(',')
let Ydata = data[0].yData.split(',')
this.barChartData = {
yData: Ydata,
xData: Xdata
}
})
|
cb40959e
liuqimichale
添加mock 数据
|
48
|
},
|
eb6d1150
liuqimichale
title 总计 简单封装
|
49
50
51
52
53
54
55
|
}
}
</script>
<style scoped>
</style>
|