Administrator 2 years ago
parent
commit
13edc876b5

+ 18 - 0
src/api/bigdata.js

@@ -13,3 +13,21 @@ export function getSjlylxtj(param) {
     method: 'post',
   })
 }
+
+//水鹤分布
+export function getShfbtj() {
+  return request({
+    url: '/center-firecontrol/VisuForestCloudBigDataController/selectBigDataWatercraneDeptCount',
+    method: 'post',
+  })
+}
+//设备类型统计
+export function getShlxtj() {
+  return request({
+    url: '/center-firecontrol/VisuForestCloudBigDataController/getCameaCount',
+    method: 'post',
+  })
+}
+
+
+

+ 27 - 18
src/views/bigdata/chart-equipmentType.vue

@@ -8,37 +8,47 @@
 
 <script>
 	import * as echarts from 'echarts';
+	import {getShlxtj} from '@/api/bigdata'
 	export default {
 		name: 'enterprise',
 		data() {
 			return {
-				count: 0
+				count: 0,
+        data_deviceCount:[],
+        data_deviceType:[]
 			}
 		},
 		mounted() {
-			this.myEcharts()
-
+      this.sblxtj()
 		},
 
 		methods:{
+		  sblxtj(){
+		    let that = this
+        getShlxtj().then(resp =>{
+          console.log("bbbbb",resp);
+          that.data_deviceCount = resp.data.deviceCount
+          that.data_deviceType = resp.data.deviceType
+          that.myEcharts()
+        })
+      },
 			// 出处 http://192.144.199.210:8080/editor/index.html?chart_id=XWNjkKJQ3NBt1FK6
-			
+
 			myEcharts() {
-				
-				
+        let that = this
 				var chartDom = document.getElementById('enterprise');
 				var myChart = echarts.init(chartDom);
 				var color = ['#02CDFF', '#62FBE7', '#7930FF','#E148EB','#ecb935']
 				var option;
-				 var value = [987, 634, 413, 312, 123];
+				 var value = that.data_deviceCount;
 				var temp = 0;
 				option = {
-				  
+
 				    tooltip: {
 				        trigger: 'item',
 				        formatter: '{a} <br/>{b} : {c} ',
 				    },
-				   
+
 				    legend: {
 				        // show: false,
 						textStyle:{
@@ -57,13 +67,12 @@
 				            left: '10%',
 				            width: '70%',
 							height:'68%',
-							
+
 				            label: {
 				                show: true,
 				                color: '#07faa9',
 				                formatter: function () {
 				                    for (var i in value) {
-				                        console.log(value[i]);
 				                        if (i == temp) {
 				                            temp++;
 				                            return value[i] ;
@@ -83,13 +92,13 @@
 				                    // formatter: '{b}Expected: {c}%',
 				                },
 				            },
-				            data: [
-				                { value: 100, name: '双辽市', itemStyle: { color: '#4672F7' } },
-				                { value: 80, name: '梨树县', itemStyle: { color: '#4C9DFF' } },
-				                { value: 60, name: '伊通县', itemStyle: { color: '#36DC88' } },
-				                { value: 40, name: '铁东区', itemStyle: { color: '#FBC71B' } },
-				                { value: 20, name: '铁西区', itemStyle: { color: '#F9A646' } },
-				            ],
+				            // data: [
+				            //     { value: 100, name: '双辽市', itemStyle: { color: '#4672F7' } },
+				            //     { value: 80, name: '梨树县', itemStyle: { color: '#4C9DFF' } },
+				            //     { value: 60, name: '伊通县', itemStyle: { color: '#36DC88' } },
+				            //     { value: 40, name: '铁东区', itemStyle: { color: '#FBC71B' } },
+				            //     { value: 20, name: '铁西区', itemStyle: { color: '#F9A646' } },
+				            // ],
 				        },
 				    ],
 				};

+ 253 - 290
src/views/bigdata/chart-event.vue

@@ -1,322 +1,285 @@
 <!-- **************************************NO.2 事件类型 分类*************************************** -->
 <template>
-	<div class="chart-container">
-		<div id="event" style="width: 50%; height:21vh;">
-		</div>
-		<div id="event2" style="width: 50%; height:21vh;">
-		</div>
-	</div>
+  <div class="chart-container">
+    <div id="event" style="width: 50%; height:21vh;">
+    </div>
+    <div id="event2" style="width: 50%; height:21vh;">
+    </div>
+  </div>
 </template>
 
 <script>
-	import * as echarts from 'echarts';
-	import  {getSjlylxtj} from '@/api/bigdata'
-	export default {
-		name: 'event',
-		data() {
-			return {
-				count: 0
-			}
-		},
-		mounted() {
+  import * as echarts from 'echarts';
+  import {getSjlylxtj} from '@/api/bigdata'
+
+  export default {
+    name: 'event',
+    data() {
+      return {
+        count: 0,
+        data_type:[],
+        data_source:[]
+      }
+    },
+    mounted() {
       this.sjlylxtj()
-		},
+    },
 
-		methods:{
+    methods: {
 
-		  sjlylxtj(){
-		    let that = this
+      sjlylxtj() {
+        let that = this
         getSjlylxtj(null).then(resp => {
-          console.log("====>",resp);
+          that.data_type = resp.data.type
+          that.data_source = resp.data.source
           that.myEcharts()
           that.myEcharts2()
         })
       },
-			// 出处 https://echarts.apache.org/examples/zh/editor.html?c=pie-borderRadius
-			//http://192.144.199.210:8080/editor/index.html?chart_id=K8nTnNyu0caN65uT
-
-			myEcharts() {
-
-
-				var chartDom = document.getElementById('event');
-				var myChart = echarts.init(chartDom);
-				var color = ['#02CDFF', '#62FBE7', '#7930FF','#E148EB','#ecb935']
-				var option;
-
-
-				option = {
-				  color: color,
-				  tooltip: {
-				    trigger: 'item',
-					position: 'top'
-				  },
-				  series: [
-				    {
-				      name: '事件类型',
-				      type: 'pie',
-					  center:['50%','60%'],
-				      radius: ['55%', '70%'],
-				      avoidLabelOverlap: false,
-
-				      label: {
-				        show: false,
-				        position: 'center'
-				      },
-				      emphasis: {
-				        label: {
-				          show: true,
-				          fontSize: '12',
-				          fontWeight: 'bold'
-				        }
-				      },
-				      labelLine: {
-				        show: false
-				      },
-				      data: [
-				        { value: 1048, name: '事件1' },
-				        { value: 735, name: '事件2' },
-				        { value: 580, name: '事件3' },
-				        { value: 484, name: '事件4' },
-				        { value: 300, name: '事件5' }
-				      ]
-				    },
+      // 出处 https://echarts.apache.org/examples/zh/editor.html?c=pie-borderRadius
+      //http://192.144.199.210:8080/editor/index.html?chart_id=K8nTnNyu0caN65uT
+      myEcharts() {
+        let that = this
+        var chartDom = document.getElementById('event');
+        var myChart = echarts.init(chartDom);
+        var color = ['#02CDFF', '#62FBE7', '#7930FF', '#E148EB', '#ecb935']
+        var option;
+        option = {
+          color: color,
+          tooltip: {
+            trigger: 'item',
+            position: 'top'
+          },
+          series: [
+            {
+              name: '事件类型',
+              type: 'pie',
+              center: ['50%', '60%'],
+              radius: ['55%', '70%'],
+              avoidLabelOverlap: false,
 
-				  ]
-				};
+              label: {
+                show: false,
+                position: 'center'
+              },
+              emphasis: {
+                label: {
+                  show: true,
+                  fontSize: '12',
+                  fontWeight: 'bold'
+                }
+              },
+              labelLine: {
+                show: false
+              },
+              data: that.data_type
+            },
 
-				option && myChart.setOption(option);
+          ]
+        };
 
-			},
-			myEcharts2() {
+        option && myChart.setOption(option);
 
+      },
+      myEcharts2() {
+        let that = this
+        var chartDom = document.getElementById('event2');
+        var myChart = echarts.init(chartDom);
+        let dashedPic =
+          'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAM8AAAAOBAMAAAB6G1V9AAAAD1BMVEX////Kysrk5OTj4+TJycoJ0iFPAAAAG0lEQVQ4y2MYBaNgGAMTQQVFOiABhlEwCugOAMqzCykGOeENAAAAAElFTkSuQmCC';
+        let color = ['#FF8700', '#ffc300', '#00e473', '#009DFF', '#0034ff', '#E148EB'];
+        var option;
+        let chartData = that.data_source;
+        let arrName = [];
+        let arrValue = [];
+        let sum = 0;
+        let pieSeries = [],
+          lineYAxis = [];
 
-				var chartDom = document.getElementById('event2');
-				var myChart = echarts.init(chartDom);
-				 let dashedPic =
-				    'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAM8AAAAOBAMAAAB6G1V9AAAAD1BMVEX////Kysrk5OTj4+TJycoJ0iFPAAAAG0lEQVQ4y2MYBaNgGAMTQQVFOiABhlEwCugOAMqzCykGOeENAAAAAElFTkSuQmCC';
-				let color = ['#FF8700', '#ffc300', '#00e473', '#009DFF', '#0034ff','#E148EB'];
-				var option;
-				let chartData = [
-				    {
-				        name: '双辽市',
-				        value: 40083,
-				        unit: '列',
-				    },
-				    {
-				        name: '梨树县',
-				        value: 33974,
-				        unit: '列',
-				    },
-				    {
-				        name: '伊通县',
-				        value: 15400,
-				        unit: '列',
-				    },
-				    {
-				        name: '铁东区',
-				        value: 11021,
-				        unit: '列',
-				    },
-				    {
-				        name: '铁西区',
-				        value: 30696,
-				        unit: '列',
-				    },
-
-				];
-				let arrName = [];
-				let arrValue = [];
-				let sum = 0;
-				let pieSeries = [],
-				    lineYAxis = [];
-
-				// 数据处理
-				chartData.forEach((v, i) => {
-				    arrName.push(v.name);
-				    arrValue.push(v.value);
-				    sum = sum + v.value;
-				});
+        // 数据处理
+        chartData.forEach((v, i) => {
+          arrName.push(v.name);
+          arrValue.push(v.value);
+          sum = sum + v.value;
+        });
 
-				// 图表option整理
-				chartData.forEach((v, i) => {
-				    pieSeries.push({
-				        name: '沪昆线到达晚点情况',
-				        type: 'pie',
-				        clockWise: false,
-				        hoverAnimation: false,
-				        radius: [65 - i * 10 + '%', 66.5 - i * 10 + '%'],
-				        center: ['35%', '60%'],
-				        label: {
-				            show: false,
-				        },
-				        itemStyle: {
-				            borderRadius: 20,
-				        },
-				        data: [
-				            {
-				                value: v.value,
-				                name: v.name,
-				                 itemStyle: {
-				                    normal: {
-				                        borderWidth: 5,
-				                        borderColor:color[i]
-				                    }
-				                }
-				            },
-				            {
-				                value: sum - v.value,
-				                name: '',
-				                itemStyle: {
-				                    color: 'rgba(0,0,0,0)',
-				                },
-				            },
-				        ],
-				    });
-				    pieSeries.push({
-				        name: '',
-				        type: 'pie',
-				        silent: true,
-				        z: 1,
-				        clockWise: false, //顺时加载
-				        hoverAnimation: false, //鼠标移入变大
-				        radius: [65 - i * 10 + '%', 66.5 - i * 10 + '%'],
-				        center: ['35%', '60%'],
-				        label: {
-				            show: false,
-				        },
-				        itemStyle: {
-				            borderCap: 'round',
-				            borderJoin: 'round',
-				        },
-				        data: [
-				            {
-				                value: 7.5,
-				                itemStyle: {
-				                    color: '#E3F0FF',
-				                },
-				            },
-				            {
-				                value: 2.5,
-				                name: '',
-				                itemStyle: {
-				                    color: 'rgba(0,0,0,0)',
-				                },
-				            },
-				        ],
-				    });
-				    v.percent = ((v.value / sum) * 100).toFixed(1) + '%';
-				    lineYAxis.push({
-				        value: i,
-				        textStyle: {
-				            rich: {
-				                circle: {
-				                    color: color[i],
-				                    padding: [0, 0],
-				                },
-				            },
-				        },
-				    });
-				});
+        // 图表option整理
+        chartData.forEach((v, i) => {
+          pieSeries.push({
+            name: '沪昆线到达晚点情况',
+            type: 'pie',
+            clockWise: false,
+            hoverAnimation: false,
+            radius: [65 - i * 10 + '%', 66.5 - i * 10 + '%'],
+            center: ['35%', '60%'],
+            label: {
+              show: false,
+            },
+            itemStyle: {
+              borderRadius: 20,
+            },
+            data: [
+              {
+                value: v.value,
+                name: v.name,
+                itemStyle: {
+                  normal: {
+                    borderWidth: 5,
+                    borderColor: color[i]
+                  }
+                }
+              },
+              {
+                value: sum - v.value,
+                name: '',
+                itemStyle: {
+                  color: 'rgba(0,0,0,0)',
+                },
+              },
+            ],
+          });
+          pieSeries.push({
+            name: '',
+            type: 'pie',
+            silent: true,
+            z: 1,
+            clockWise: false, //顺时加载
+            hoverAnimation: false, //鼠标移入变大
+            radius: [65 - i * 10 + '%', 66.5 - i * 10 + '%'],
+            center: ['35%', '60%'],
+            label: {
+              show: false,
+            },
+            itemStyle: {
+              borderCap: 'round',
+              borderJoin: 'round',
+            },
+            data: [
+              {
+                value: 7.5,
+                itemStyle: {
+                  color: '#E3F0FF',
+                },
+              },
+              {
+                value: 2.5,
+                name: '',
+                itemStyle: {
+                  color: 'rgba(0,0,0,0)',
+                },
+              },
+            ],
+          });
+          v.percent = ((v.value / sum) * 100).toFixed(1) + '%';
+          lineYAxis.push({
+            value: i,
+            textStyle: {
+              rich: {
+                circle: {
+                  color: color[i],
+                  padding: [0, 0],
+                },
+              },
+            },
+          });
+        });
 
-				option = {
-				    color: color,
-				    grid: {
-				        top: '20%',
-				        bottom: '45%',
-				        left: '40%',
-				        containLabel: false,
-				    },
-				    yAxis: [
-				        {
-				            type: 'category',
-				            inverse: true,
-				            axisLine: {
-				                show: false,
-				            },
-				            axisTick: {
-				                show: false,
-				            },
-				            axisLabel: {
-				                formatter: function (params) {
-				                    let item = chartData[params];
-				                    console.log(item);
-				                    return (
-				                        '{circle|●}{name|' +
-				                        item.name +
-				                        '}{bd||}{percent|' +
-				                        item.percent +
-				                        '}'
-				                    );
-				                },
-				                interval: 0,
-				                inside: true,
-				                textStyle: {
-				                    color: '#333',
-				                    fontSize: 10,
-				                    rich: {
-				                        line: {
-				                            width: 170,
-				                            height: 5,
-				                            backgroundColor: { image: dashedPic },
-				                        },
-				                        name: {
-				                            color: '#fff',
-				                            fontSize: 10,
-				                        },
-				                        bd: {
-				                            color: '#72afff',
-				                            padding: [0, 5],
-				                            fontSize: 10,
-				                        },
-				                        percent: {
-				                            color: '#5cdad0',
-				                            fontSize: 10,
-				                        },
-				                        value: {
-				                            color: '#333',
-				                            fontSize: 16,
-				                            fontWeight: 500,
-				                            padding: [0, 0, 0, 10],
-				                        },
-				                        unit: {
-				                            fontSize: 14,
-				                        },
-				                    },
-				                },
-				                show: true,
-				            },
-				            data: lineYAxis,
-				        },
-				    ],
-				    xAxis: [
-				        {
-				            show: false,
-				        },
-				    ],
-				    series: pieSeries,
-				};
+        option = {
+          color: color,
+          grid: {
+            top: '20%',
+            bottom: '45%',
+            left: '40%',
+            containLabel: false,
+          },
+          yAxis: [
+            {
+              type: 'category',
+              inverse: true,
+              axisLine: {
+                show: false,
+              },
+              axisTick: {
+                show: false,
+              },
+              axisLabel: {
+                formatter: function (params) {
+                  let item = chartData[params];
+                  return (
+                    '{circle|●}{name|' +
+                    item.name +
+                    '}{bd||}{percent|' +
+                    item.percent +
+                    '}'
+                  );
+                },
+                interval: 0,
+                inside: true,
+                textStyle: {
+                  color: '#333',
+                  fontSize: 10,
+                  rich: {
+                    line: {
+                      width: 170,
+                      height: 5,
+                      backgroundColor: {image: dashedPic},
+                    },
+                    name: {
+                      color: '#fff',
+                      fontSize: 10,
+                    },
+                    bd: {
+                      color: '#72afff',
+                      padding: [0, 5],
+                      fontSize: 10,
+                    },
+                    percent: {
+                      color: '#5cdad0',
+                      fontSize: 10,
+                    },
+                    value: {
+                      color: '#333',
+                      fontSize: 16,
+                      fontWeight: 500,
+                      padding: [0, 0, 0, 10],
+                    },
+                    unit: {
+                      fontSize: 14,
+                    },
+                  },
+                },
+                show: true,
+              },
+              data: lineYAxis,
+            },
+          ],
+          xAxis: [
+            {
+              show: false,
+            },
+          ],
+          series: pieSeries,
+        };
 
-				option && myChart.setOption(option);
+        option && myChart.setOption(option);
 
-			},
+      },
 
 
-		},
+    },
 
 
-	}
+  }
 </script>
 
 <style rel="stylesheet/scss" lang="scss" scoped>
-	.chart-container {
-		width: 100%;
-		height: auto;
-		position: relative;
-		padding-bottom: 10px;
-		display: flex;
-	}
-
-
+  .chart-container {
+    width: 100%;
+    height: auto;
+    position: relative;
+    padding-bottom: 10px;
+    display: flex;
+  }
 
 
 </style>

+ 0 - 1
src/views/bigdata/chart-fireCause.vue

@@ -113,7 +113,6 @@
 							label: {
 								show: true,
 								formatter: function(params) {
-									console.log(params)
 									return params.value ;
 								},
 								color: '#ffffff',

File diff suppressed because it is too large
+ 197 - 212
src/views/bigdata/chart-waterCrane.vue


+ 0 - 1
src/views/datacenter.vue

@@ -302,7 +302,6 @@ export default {
           that.$set(that.resourcesList[index], 'icon', 'sj' + '-' + 'icon' + '-' + data
             .resourceTable.split('_').slice(-1))
         })
-        console.log(that.resourcesList)
 
       })
     },

+ 2 - 2
src/views/monitor.vue

@@ -678,7 +678,7 @@ export default {
         cbConnectClose: function(bNormalClose) {
           // 异常断开:bNormalClose = false
           // JS_Disconnect正常断开:bNormalClose = true
-          console.log('cbConnectClose')
+
           that.oWebControl = null
         }
       })
@@ -756,7 +756,7 @@ export default {
           keyLength: 1024
         })
       }).then(function(oData) {
-        console.log(oData)
+
         if (oData.responseMsg.data) {
           that.pubKey = oData.responseMsg.data
           callback()