|
@@ -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,19 @@
|
|
|
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)
|
|
|
+ })
|
|
|
+ console.log(this.source)
|
|
|
that.myEcharts2()
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
// 出处 http://192.144.199.210:8080/editor/index.html?chart_id=TMyJh73uiXkeu3_v
|
|
|
myEcharts1() {
|
|
|
var chartDom = document.getElementById('camera1');
|
|
@@ -243,6 +251,7 @@
|
|
|
offset: 1,
|
|
|
color: "rgba(41,244,236,1)"
|
|
|
},
|
|
|
+
|
|
|
]),
|
|
|
borderColor: "#a2f9f7",
|
|
|
shadowBlur: 16,
|