|
@@ -12,7 +12,7 @@
|
|
|
|
|
|
<script>
|
|
|
import * as echarts from 'echarts';
|
|
|
- import {getSbfb,selectDeviceType} from '@/api/bigdata'
|
|
|
+ import {selectDeviceType} from '@/api/bigdata'
|
|
|
|
|
|
export default {
|
|
|
name: 'camera',
|
|
@@ -23,26 +23,26 @@
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.sbfb()
|
|
|
+ this.selectDeviceType1()
|
|
|
// this.myEcharts1();
|
|
|
- this.myEcharts2();
|
|
|
+ //this.myEcharts2();
|
|
|
// this.myEcharts3();
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
- sbfb() {
|
|
|
- let that = this
|
|
|
- selectDeviceType().then(res => {
|
|
|
- res.data.forEach(item=> {
|
|
|
- const param = Object.assign({})
|
|
|
- param.name = item.deviceName
|
|
|
- param.数量=item.deviceCount
|
|
|
- this.source.push(param)
|
|
|
- })
|
|
|
- that.myEcharts2()
|
|
|
+ selectDeviceType1() {
|
|
|
+ let that = this
|
|
|
+ selectDeviceType().then(res => {
|
|
|
+ res.data.forEach(item => {
|
|
|
+ const param = Object.assign({})
|
|
|
+ param.name = item.deviceName
|
|
|
+ param.数量 = item.deviceCount
|
|
|
+ that.data_sbfb.push(param)
|
|
|
})
|
|
|
- },
|
|
|
+ that.myEcharts2()
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
// 出处 http://192.144.199.210:8080/editor/index.html?chart_id=TMyJh73uiXkeu3_v
|
|
|
myEcharts1() {
|
|
@@ -77,7 +77,7 @@
|
|
|
},
|
|
|
tooltip: {
|
|
|
trigger: 'item',
|
|
|
- position: function (point, params, dom, rect, size) {
|
|
|
+ position: function(point, params, dom, rect, size) {
|
|
|
const x = point[0];
|
|
|
const y = point[1];
|
|
|
const viewWidth = size.viewSize[0];
|
|
@@ -376,17 +376,13 @@
|
|
|
value: [4300, 10000, 28000, 35000, 50000, 19000, 21000],
|
|
|
name: '型号统计',
|
|
|
|
|
|
-
|
|
|
}]
|
|
|
}]
|
|
|
};
|
|
|
option && myChart.setOption(option);
|
|
|
},
|
|
|
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|