@@ -18,6 +18,13 @@ export function getCameaCount() {
method: 'post',
})
}
+// 设备分布
+export function getSbfb() {
+ return request({
+ url: '/center-fire/VisuForestCloudBigDataController/getSbfb',
+ method: 'post',
+ })
+}
@@ -12,21 +12,29 @@
<script>
import * as echarts from 'echarts';
+ import { getSbfb } from '@/api/bigdata'
export default {
name: 'camera',
data() {
return {
- count: 0
+ source: []
},
mounted() {
// this.myEcharts1();
- this.myEcharts2();
+ // this.myEcharts2();
// this.myEcharts3();
-
+ this.getSbfb()
methods: {
+ getSbfb() {
+ let that = this
+ getSbfb().then(res => {
+ this.source=res.data
+ that.myEcharts2()
+ },
// 出处 http://192.144.199.210:8080/editor/index.html?chart_id=TMyJh73uiXkeu3_v
myEcharts1() {
var chartDom = document.getElementById('camera1');
@@ -153,15 +161,7 @@
const dfColor = ['#92E1FF', '#0097FB', '#30ECA6', '#FFC227', '#FF4848'];
option = {
dataset: {
- source: [
- ["类型1", 1200],
- ["类型2", 1000],
- ["类型3", 746],
- ["类型4", 636],
- ["类型5", 581],
- ["类型6", 426],
- ["类型7", 326]
- ],
+ source: this.source,
tooltip: {
trigger: 'item',