|
@@ -12,7 +12,7 @@
|
|
|
|
|
|
<script>
|
|
|
import * as echarts from 'echarts';
|
|
|
- import {getSbfb} from '@/api/bigdata'
|
|
|
+ import {selectDeviceType} from '@/api/bigdata'
|
|
|
|
|
|
export default {
|
|
|
name: 'camera',
|
|
@@ -31,11 +31,18 @@
|
|
|
methods: {
|
|
|
getSbfb() {
|
|
|
let that = this
|
|
|
- getSbfb().then(res => {
|
|
|
- this.source = res.data
|
|
|
+ selectDeviceType().then(res => {
|
|
|
+
|
|
|
+ res.data.forEach(item=> {
|
|
|
+ const param = Object.assign({})
|
|
|
+ param.name = item.deviceName
|
|
|
+ param.数量=item.deviceCount
|
|
|
+ this.source.push(param)
|
|
|
+ })
|
|
|
that.myEcharts2()
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
// 出处 http://192.144.199.210:8080/editor/index.html?chart_id=TMyJh73uiXkeu3_v
|
|
|
myEcharts1() {
|
|
|
var chartDom = document.getElementById('camera1');
|