JX.LI před 1 rokem
rodič
revize
dced599e7a

+ 39 - 50
src/api/bigdata.js

@@ -3,13 +3,8 @@ import Cookies from 'js-cookie'
 
 // 事件来源
 export function getSjlylxtj(param) {
-  //暂时传当年,以后再说
-  if (param == null) {
-    let myDate = new Date();
-    param = {day: myDate.getFullYear()}
-  }
   return request({
-    url: '/center-environment/VisuForestCloudBigDataController/getEventSourceAndTypeStatistics',
+    url: '/center-event/eventreport/getEventSourceAndTypeStatistics',
     data: param,
     method: 'post',
   })
@@ -19,7 +14,7 @@ export function getSjlylxtj(param) {
 //污染源分布统计
 export function getWryfbtj() {
   return request({
-    url: '/center-environment/VisuForestCloudBigDataController/selectBigDataSourcepollutionDeptCount',
+    url: '/center-data/environmentBigData/selectBigDataSourcepollutionDeptCount',
     method: 'post',
   })
 }
@@ -33,14 +28,16 @@ export function getSblxtj() {
 }
 
 //综合信息
-export function getZhxx(param) {
-  //暂时传当年,以后再说
-  if (param == null) {
-    let myDate = new Date();
-    param = {day: myDate.getFullYear()}
-  }
+export function getTotal(param) {
+  return request({
+    url: '/center-event/eventreport/getTotal',
+    data: param,
+    method: 'post',
+  })
+}
+export function getEnvironmentTotal(param) {
   return request({
-    url: '/center-environment/VisuForestCloudBigDataController/selectBigDataZhxx',
+    url: '/center-data/environmentBigData/getEnvironmentTotal',
     data: param,
     method: 'post',
   })
@@ -69,22 +66,18 @@ export function getQhyytj(param) {
 }
 
 //重点区域
-export function getZdqy() {
+export function getZdqy(data) {
   return request({
-    url: '/center-environment/VisuForestCloudBigDataController/selectBigDataImportareaDeptCount',
+    url: '/center-data/environmentBigData/selectBigDataImportareaDeptCount',
     method: 'post',
+    data:data
   })
 }
 
 //设备上报事件数量
 export function getSbsbsjsl(param) {
-  //暂时传当年,以后再说
-  if (param == null) {
-    let myDate = new Date();
-    param = {day: myDate.getFullYear()}
-  }
   return request({
-    url: '/center-environment/VisuForestCloudBigDataController/getAIEventNum',
+    url: '/center-event/eventreport/getAIEventNum',
     data: param,
     method: 'post',
   })
@@ -93,20 +86,16 @@ export function getSbsbsjsl(param) {
 //重点企业
 export function getZdqiye() {
   return request({
-    url: '/center-environment/VisuForestCloudBigDataController/selectBigDataKeyenterpriseDeptCount',
+    url: '/center-data/environmentBigData/selectBigDataKeyenterpriseDeptCount',
     method: 'post',
   })
 }
 
 //事件趋势
 export function getSjqs(param) {
-  //暂时传当年,以后再说
-  if (param == null) {
-    let myDate = new Date();
-    param = {day: myDate.getFullYear()}
-  }
+
   return request({
-    url: '/center-environment/VisuForestCloudBigDataController/getEventTrend',
+    url: '/center-event/eventreport/getEventTrend',
     data: param,
     method: 'post',
   })
@@ -132,7 +121,7 @@ export function getTqqs(param) {
     param = {day: myDate.getFullYear() + "-" + month}
   }
   return request({
-    url: '/center-environment/VisuForestCloudBigDataController/selectBigDataByYearMonthFegin',
+    url: '/center-data/environmentBigData/selectBigDataByYearMonthFegin',
     data:param,
     method: 'post',
   })
@@ -153,7 +142,7 @@ export function getRlt(param) {
     param = {day: myDate.getFullYear()}
   }
   return request({
-    url: '/center-environment/VisuForestCloudBigDataController/getHeatMap',
+    url: '/center-event/eventreport/getHeatMap',
     method: 'post',
     data : param
   })
@@ -162,73 +151,73 @@ export function getRlt(param) {
 //车辆信息统计
 export function selectCarCount(data) {
   return request({
-    url: '/center-fire/VisuForestCloudBigDataController/selectCarCount',
-    method: 'get',
-    params:data
+    url: '/center-data/forestbigdataView/selectCarCount',
+    method: 'post',
+    data:data
   })
 }
 
 //大数据查询 大气环境数据的走势以月、年进行统计分析
 export function findAtmosphereByYear() {
   return request({
-    url: '/center-environment/VisuForestCloudBigDataController/findAtmosphereByYear',
-    method: 'post'
+    url: '/center-data/environmentBigData/findDataByYear',
+    method: 'get'
   })
 }
 
 //大数据查询 大气环境数据的走势以日、月进行统计分析
 export function findAtmosphereByMonth() {
   return request({
-    url: '/center-environment/VisuForestCloudBigDataController/findAtmosphereByMonth',
-    method: 'post'
+    url: '/center-data/environmentBigData/findDataByMonth',
+    method: 'get'
   })
 }
 
 //大数据查询 污染源数据的走势以月、年进行统计分析
 export function findPollutionByYear() {
   return request({
-    url: '/center-environment/VisuForestCloudBigDataController/findPollutionByYear',
-    method: 'post'
+    url: '/center-data/environmentBigData/pollutionFindDataByYear',
+    method: 'get'
   })
 }
 
 //大数据查询 污染源数据的走势以日、月进行统计分析
 export function findPollutionByMonth() {
   return request({
-    url: '/center-environment/VisuForestCloudBigDataController/findPollutionByMonth',
-    method: 'post'
+    url: '/center-data/environmentBigData/pollutionFindDataByMonth',
+    method: 'get'
   })
 }
 
 //大数据查询 土壤数据的走势以月、年进行统计分析
 export function findSoilByYear() {
   return request({
-    url: '/center-environment/VisuForestCloudBigDataController/findSoilByYear',
-    method: 'post'
+    url: '/center-data/environmentBigData/soilFindDataByYear',
+    method: 'get'
   })
 }
 
 //大数据查询 土壤数据的走势以日、月进行统计分析
 export function findSoilByMonth() {
   return request({
-    url: '/center-environment/VisuForestCloudBigDataController/findSoilByMonth',
-    method: 'post'
+    url: '/center-data/environmentBigData/soilFindDataByMonth',
+    method: 'get'
   })
 }
 
 //大数据查询 水质监测数据的走势以月、年进行统计分析
 export function findWaterqualityByYear() {
   return request({
-    url: '/center-environment/VisuForestCloudBigDataController/findWaterqualityByYear',
-    method: 'post'
+    url: '/center-data/environmentBigData/waterQualityFindDataByYear',
+    method: 'get'
   })
 }
 
 //大数据查询 水质监测数据的走势以日、月进行统计分析
 export function findWaterqualityByMonth() {
   return request({
-    url: '/center-environment/VisuForestCloudBigDataController/findWaterqualityByMonth',
-    method: 'post'
+    url: '/center-data/environmentBigData/waterQualityFindDataByMonth',
+    method: 'get'
   })
 }
 

+ 5 - 1
src/views/bigdata/bigdata.vue

@@ -309,7 +309,11 @@ export default {
     },
     rlt() {
       let that = this
-      getRlt().then(resp => {
+      let data = {
+        eventTypeId:['102'],
+        day: new Date().getFullYear()
+      }
+      getRlt(data).then(resp => {
         setTimeout(() => {
           //事件分布
           that.$refs.bigdataSupermap.loadHeatMap(resp.data)

+ 93 - 85
src/views/bigdata/chart-detector.vue

@@ -1,106 +1,114 @@
 <!-- **************************************NO.17 探测器*************************************** -->
 <template>
-	<div class="chart-container">
-		<div id="detector1" style="width: 100%; height:25vh; ">
-		</div>
-	</div>
+  <div class="chart-container">
+    <div id="detector1" style="width: 100%; height:25vh; ">
+    </div>
+  </div>
 </template>
 
 <script>
-	import * as echarts from 'echarts';
-  import {getSjlylxtj} from '@/api/bigdata'
-	export default {
-		name: 'detector',
-		data() {
-			return {
-				count: 0
-			}
-		},
-		mounted() {
-			this.sjlylxtj();
-		},
+  import * as echarts from 'echarts';
+  import {
+    getSjlylxtj
+  } from '@/api/bigdata'
+  import Cookies from 'js-cookie'
+  export default {
+    name: 'detector',
+    data() {
+      return {
+        count: 0
+      }
+    },
+    mounted() {
+      this.sjlylxtj();
+    },
 
-		methods: {
+    methods: {
       sjlylxtj() {
         let that = this
-        getSjlylxtj().then(resp => {
+        let params = {
+          eventTypeId: Cookies.get("eventType").split(","),
+          eventTypeIdDl: Cookies.get("eventTypeDl").split(","),
+          day: new Date().getFullYear()
+        }
+        getSjlylxtj(params).then(resp => {
           that.myEcharts(resp.data.type)
         })
       },
-			// 出处 http://192.144.199.210:8080/editor/index.html?chart_id=gK9VdA5_F06NTrpr
-			myEcharts(seriesData) {
-				var chartDom = document.getElementById('detector1');
-				var myChart = echarts.init(chartDom);
-				var option;
-				 option = {
-				    tooltip: {
-				        trigger: 'item',
-				    },
-				    color: ['#f7c778', '#d77169', '#c14f60', '#4d9564', '#215b85', ],
+      // 出处 http://192.144.199.210:8080/editor/index.html?chart_id=gK9VdA5_F06NTrpr
+      myEcharts(seriesData) {
+        var chartDom = document.getElementById('detector1');
+        var myChart = echarts.init(chartDom);
+        var option;
+        option = {
+          tooltip: {
+            trigger: 'item',
+          },
+          color: ['#f7c778', '#d77169', '#c14f60', '#4d9564', '#215b85', ],
 
-				    series : [
-				        {
-				            name:'',
-				            type:'funnel',
-				            x: '10%',
-				            y: 15,
-				            //x2: 80,
-				            y2: 15,
-				            width: '80%',
-				            // height: {totalHeight} - y - y2,
-				            min: 0,
-				            max: 100,
-				            minSize: '40%',
-				            maxSize: '100%',
-				            sort : 'descending', // 'ascending', 'descending'
-				            gap :0,
-				            data:seriesData.sort(function (a, b) {
-                      return a.value - b.value}),
-				            roseType: true,
-				            label: {
-				                normal: {
-				                    color:'#fff',
-				                    formatter:'{b} {c}',
-				                    position: 'center',
-				                    rich:{
-				                        style:{
-				                            fontSize:'20px',
-											color:'#ffffff',
-				                        },
+          series: [{
+              name: '',
+              type: 'funnel',
+              x: '10%',
+              y: 15,
+              //x2: 80,
+              y2: 15,
+              width: '80%',
+              // height: {totalHeight} - y - y2,
+              min: 0,
+              max: 100,
+              minSize: '40%',
+              maxSize: '100%',
+              sort: 'descending', // 'ascending', 'descending'
+              gap: 0,
+              data: seriesData.sort(function(a, b) {
+                return a.value - b.value
+              }),
+              roseType: true,
+              label: {
+                normal: {
+                  color: '#fff',
+                  formatter: '{b} {c}',
+                  position: 'center',
+                  rich: {
+                    style: {
+                      fontSize: '20px',
+                      color: '#ffffff',
+                    },
 
-				                    }
-				                }
-				            },
-				            itemStyle: {
-				                normal: {
-				                    borderWidth: 0,
-				                    shadowBlur: 30,
-				                    shadowOffsetX: 0,
-				                    shadowOffsetY: 10,
-				                    shadowColor: 'rgba(0, 0, 0, 0.5)'
-				                }
-				            }
+                  }
+                }
+              },
+              itemStyle: {
+                normal: {
+                  borderWidth: 0,
+                  shadowBlur: 30,
+                  shadowOffsetX: 0,
+                  shadowOffsetY: 10,
+                  shadowColor: 'rgba(0, 0, 0, 0.5)'
+                }
+              }
 
-				        }
+            }
 
-				    ]
-				};
-				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;
-		flex-direction: column;
-	}
-</style>
+  .chart-container {
+    width: 100%;
+    height: auto;
+    position: relative;
+    padding-bottom: 10px;
+    display: flex;
+    flex-direction: column;
+  }
+</style>

+ 5 - 1
src/views/bigdata/chart-deviceReportingEvents.vue

@@ -26,7 +26,11 @@
     methods: {
       sbsbsjsl() {
         let that = this
-        getSbsbsjsl().then(resp => {
+        let parm = {
+          eventTypeId: ['102'],
+          day: new Date().getFullYear()
+        }
+        getSbsbsjsl(parm).then(resp => {
           that.data_sbsbsjsl_reportor = resp.data.reportor
           that.data_sbsbsjsl_num = resp.data.num
           that.myEcharts()

+ 7 - 2
src/views/bigdata/chart-event.vue

@@ -11,7 +11,7 @@
 <script>
   import * as echarts from 'echarts';
   import {getSjlylxtj} from '@/api/bigdata'
-
+  import Cookies from 'js-cookie'
   export default {
     name: 'event',
     data() {
@@ -29,7 +29,12 @@
 
       sjlylxtj() {
         let that = this
-        getSjlylxtj().then(resp => {
+        let params = {
+          eventTypeId:Cookies.get("eventType").split(","),
+          eventTypeIdDl:Cookies.get("eventTypeDl").split(","),
+          day: new Date().getFullYear()
+        }
+        getSjlylxtj(params).then(resp => {
           that.data_sjlylxtj_source = resp.data.source
           that.data_sjlylxtj_type = resp.data.type
           that.myEcharts()

+ 93 - 79
src/views/bigdata/chart-eventTrend.vue

@@ -1,116 +1,130 @@
 <!-- **************************************NO.6 矿坑*************************************** -->
 <template>
-	<div class="chart-container">
-		<div id="pit" style="width: 100%; height:24vh;">
-		</div>
-	</div>
+  <div class="chart-container">
+    <div id="pit" style="width: 100%; height:24vh;">
+    </div>
+  </div>
 </template>
 
 <script>
-	import * as echarts from 'echarts';
-  import {getSjqs} from '@/api/bigdata'
-	export default {
-		name: 'pit',
-		data() {
-			return {
-				count: 0,
-        data_sjqs_month:[],
-        data_sjqs_num:[]
-			}
-		},
-		mounted() {
-			this.sjqs()
-		},
+  import * as echarts from 'echarts';
+  import {
+    getSjqs
+  } from '@/api/bigdata'
+  export default {
+    name: 'pit',
+    data() {
+      return {
+        count: 0,
+        data_sjqs_month: [],
+        data_sjqs_num: []
+      }
+    },
+    mounted() {
+      this.sjqs()
+    },
 
-		methods: {
-			// 出处 http://192.144.199.210:8080/editor/index.html?chart_id=udduEFcFiEYEEj4Q
+    methods: {
+      // 出处 http://192.144.199.210:8080/editor/index.html?chart_id=udduEFcFiEYEEj4Q
 
-      sjqs(){
+      sjqs() {
         let that = this
-        getSjqs().then(resp=>{
+        let yearmonth = []
+        let year = new Date().getFullYear()
+        for (var i = 1; i <= 12; i++) {
+          let mo = "";
+          if (i < 10) {
+            mo = year + "-0" + i;
+          } else {
+            mo = year + "-" + i;
+          }
+          yearmonth.push(mo);
+        }
+        let data = {
+          yearMonth:yearmonth,
+          eventTypeId:['102']
+        }
+        getSjqs(data).then(resp => {
           that.data_sjqs_month = resp.data.month
           that.data_sjqs_num = resp.data.num
           that.myEcharts()
         })
       },
 
-			myEcharts() {
+      myEcharts() {
         let that = this
-				var chartDom = document.getElementById('pit');
-				var myChart = echarts.init(chartDom);
-				var color = ['#02CDFF', '#62FBE7', '#7930FF','#ef5f9d','#ecb935'];
-				var option;
+        var chartDom = document.getElementById('pit');
+        var myChart = echarts.init(chartDom);
+        var color = ['#02CDFF', '#62FBE7', '#7930FF', '#ef5f9d', '#ecb935'];
+        var option;
         option = {
           xAxis: {
-            data:that.data_sjqs_month,
-            show:true,					//---是否显示
-            position:'bottom',			//---x轴位置
-            offset:0,					//---x轴相对于默认位置的偏移
-            type:'category',			//---轴类型,默认'category'
-            name:'月份',				//---轴名称
+            data: that.data_sjqs_month,
+            show: true, //---是否显示
+            position: 'bottom', //---x轴位置
+            offset: 0, //---x轴相对于默认位置的偏移
+            type: 'category', //---轴类型,默认'category'
+            name: '月份', //---轴名称
           },
           yAxis: {
             axisLabel: {
               fontSize: 10,
               color: '#999',
               verticalAlign: 'bottom',
-              formatter: function (value, index) {
+              formatter: function(value, index) {
                 return `${value.toFixed(2)}%`;
               },
             },
           },
-          series: [
-            {
-              type: 'line',
-              lineStyle: {
-                color: '#C22F43',
-                width: 1,
-                type: 'solid',
-              },
-              areaStyle: {
-                color: {
-                  type: 'linear',
-                  x: 0,
-                  y: 0,
-                  x2: 0,
-                  y2: 1,
-                  colorStops: [
-                    {
-                      offset: 0,
-                      color: 'rgba(194, 47, 67, 1.0)',
-                    },
-                    {
-                      offset: 1,
-                      color: 'rgba(194, 47, 67, 0.03)',
-                    },
-                  ],
-                  global: false,
-                },
-                origin: 'start',
+          series: [{
+            type: 'line',
+            lineStyle: {
+              color: '#C22F43',
+              width: 1,
+              type: 'solid',
+            },
+            areaStyle: {
+              color: {
+                type: 'linear',
+                x: 0,
+                y: 0,
+                x2: 0,
+                y2: 1,
+                colorStops: [{
+                    offset: 0,
+                    color: 'rgba(194, 47, 67, 1.0)',
+                  },
+                  {
+                    offset: 1,
+                    color: 'rgba(194, 47, 67, 0.03)',
+                  },
+                ],
+                global: false,
               },
-              opacity: 0.2,
-              shadowColor: 'rgba(194, 47, 67)',
-              shadowBlur: 0,
-              shadowOffsetX: 0,
-              data: that.data_sjqs_num
+              origin: 'start',
             },
-          ],
+            opacity: 0.2,
+            shadowColor: 'rgba(194, 47, 67)',
+            shadowBlur: 0,
+            shadowOffsetX: 0,
+            data: that.data_sjqs_num
+          }, ],
         };
-				option && myChart.setOption(option);
-			},
+        option && myChart.setOption(option);
+      },
 
-		},
+    },
 
 
-	}
+  }
 </script>
 
 <style rel="stylesheet/scss" lang="scss" scoped>
-	.chart-container {
-		width: 100%;
-		height: 100%;
-		position: relative;
-		padding-bottom: 10px;
-		display: flex;
-	}
+  .chart-container {
+    width: 100%;
+    height: 100%;
+    position: relative;
+    padding-bottom: 10px;
+    display: flex;
+  }
 </style>

+ 4 - 1
src/views/bigdata/chart-keyArea.vue

@@ -25,7 +25,10 @@
     methods: {
       zdqy() {
         let that = this
-        getZdqy().then(resp => {
+        let data = {
+          areaType:'4'
+        }
+        getZdqy(data).then(resp => {
           that.data_zdqy = resp.data
           that.myEcharts()
         })

+ 8 - 2
src/views/bigdata/chart-keyEnterprises.vue

@@ -28,8 +28,14 @@
 		  zdqiye(){
 		    let that = this
 		    getZdqiye().then(resp =>{
-          that.data_zdqiye_name = resp.data.name
-          that.data_zdqiye_value = resp.data.value
+          let name = []
+          let value = []
+          for (var i = 0; i < resp.data.length; i++) {
+             name.push(resp.data[i].name)
+             value.push(resp.data[i].value)
+          }
+          that.data_zdqiye_name = name
+          that.data_zdqiye_value = value
           that.myEcharts()
         })
       },

+ 27 - 23
src/views/bigdata/tabbar.vue

@@ -12,8 +12,11 @@
 </template>
 
 <script>
-
-  import {getZhxx,selectDeviceType} from '@/api/bigdata'
+  import {
+    getTotal,
+    getEnvironmentTotal,
+    selectDeviceType
+  } from '@/api/bigdata'
 
   export default {
     data() {
@@ -24,8 +27,7 @@
         //tab默认停留项el-tab-pane > name = "?"
         activeName: 'sp',
         //地区分类tabtitle
-        district: [
-          {
+        district: [{
             label: '四平市',
             name: 'sp',
             id: ''
@@ -57,8 +59,7 @@
           },
         ],
         // 本地区内分类项数量
-        regionNum: [
-          {
+        regionNum: [{
             count: 641,
             name: '事件'
           },
@@ -135,24 +136,27 @@
     methods: {
       zhxx() {
         let that = this
-        getZhxx().then(resp => {
+        that.regionNum = [];
+        let parm = {
+          eventTypeId: ['102'],
+          day: new Date().getFullYear(),
+          type: '4'
+        }
+        getTotal(parm).then(resp => {
+          that.regionNum.push(...resp.data)
+
+        })
+        getEnvironmentTotal(parm).then(resp => {
           console.log(resp)
-          // that.data_zhxx_device = resp.data.device
-          // that.data_zhxx_data = resp.data.data
-          // that.data_zhxx_event = resp.data.event
-          that.regionNum = [];
-          that.regionNum.push(...resp.data.event)
-          that.regionNum.push(...resp.data.data)
-            selectDeviceType().then(res => {
-              res.data.forEach(item=>
-              {
-                that.regionNum.push({value: item.deviceCount,name: item.deviceName})
-                })
+          that.regionNum.push(...resp.data)
+        })
+        selectDeviceType().then(res => {
+          res.data.forEach(item => {
+            that.regionNum.push({
+              value: item.deviceCount,
+              name: item.deviceName
             })
-          // for(let i in resp.data.device){
-          //   that.regionNum.push({value: resp.data.device[i].deviceCount,name: resp.data.device[i].deviceName})
-          // }
-
+          })
         })
       },
 
@@ -171,7 +175,7 @@
     height: 28.5vh;
     padding: 0 1rem 1rem 1rem !important;
     box-shadow: 0 0 1px rgba($color: #163696, $alpha: .1),
-    -0 -0 20px rgba($color: #163696, $alpha: .6) inset;
+      -0 -0 20px rgba($color: #163696, $alpha: .6) inset;
 
     .el-tabs__item {
       color: #fff;