王通 1 год назад
Родитель
Сommit
9da3d7bd66

+ 30 - 18
src/api/bigdata.js

@@ -7,8 +7,9 @@ export function getSjlylxtj(param) {
     let myDate = new Date();
     param = {day: myDate.getFullYear()}
   }
+  param.eventTypeId=['103']
   return request({
-    url: '/center-firecontrol/VisuForestCloudBigDataController/getEventSourceAndTypeStatistics',
+    url: '/center-event/eventreport/getEventSourceAndTypeStatistics',
     data: param,
     method: 'post',
   })
@@ -17,7 +18,7 @@ export function getSjlylxtj(param) {
 //水鹤分布
 export function getShfbtj() {
   return request({
-    url: '/center-firecontrol/VisuForestCloudBigDataController/selectBigDataWatercraneDeptCount',
+    url: '/center-data/fireControlBigData/selectBigDataWatercraneDeptCount',
     method: 'post',
   })
 }
@@ -59,8 +60,9 @@ export function getQhyy(param) {
     let myDate = new Date();
     param = {day: myDate.getFullYear()}
   }
+  param.eventTypeId=['101']
   return request({
-    url: '/center-firecontrol/VisuForestCloudBigDataController/selectEventByYearGroupByFireSource',
+    url: '/center-event/eventreport/getEventCountGroupByFireSource',
     data: param,
     method: 'post',
   })
@@ -69,8 +71,11 @@ export function getQhyy(param) {
 //重点区域
 export function getZdqy() {
   return request({
-    url: '/center-firecontrol/VisuForestCloudBigDataController/selectBigDataImportareaDeptCount',
+    url: '/center-data/fireControlBigData/selectBigDataImportareaDeptCount',
     method: 'post',
+    data:{
+     areaType:8
+    }
   })
 }
 
@@ -82,8 +87,9 @@ export function getSbsbsjsl(param) {
     let myDate = new Date();
     param = {day: myDate.getFullYear()}
   }
+  param.eventTypeId=['103']
   return request({
-    url: '/center-firecontrol/VisuForestCloudBigDataController/getAIEventNum',
+    url: '/center-event/eventreport/getAIEventNum',
     data: param,
     method: 'post',
   })
@@ -92,8 +98,9 @@ export function getSbsbsjsl(param) {
 //取水口
 export function getQsk() {
   return request({
-    url: '/center-firecontrol/VisuForestCloudBigDataController/selectBigDataWaterintakeDeptCount',
+    url: '/center-data/fireControlBigData/selectBigDataWaterintakeDeptCount',
     method: 'post',
+    data:{}
   })
 }
 
@@ -105,7 +112,7 @@ export function getSjqs(param) {
     param = {day: myDate.getFullYear()}
   }
   return request({
-    url: '/center-firecontrol/VisuForestCloudBigDataController/getEventTrend',
+    url: '/center-event/eventreport/getEventTrend',
     data: param,
     method: 'post',
   })
@@ -114,7 +121,7 @@ export function getSjqs(param) {
 //消防力量分布
 export function getXfllfb() {
   return request({
-    url: '/center-firecontrol/VisuForestCloudBigDataController/selectBigDataFireforceDeptCount',
+    url: '/center-data/fireforce/selectBigDataFireforceDeptCount',
     method: 'post',
   })
 }
@@ -130,7 +137,7 @@ export function getTqqs(param) {
     param = {day: myDate.getFullYear() + "-" + month}
   }
   return request({
-    url: '/center-firecontrol/VisuForestCloudBigDataController/selectBigDataByYearMonthFegin',
+    url: '/center-data/fireControlBigData/selectBigDataByYearMonthFegin',
     data : param,
     method: 'post',
   })
@@ -139,7 +146,7 @@ export function getTqqs(param) {
 //专职站
 export function getZzz() {
   return request({
-    url: '/center-firecontrol/VisuForestCloudBigDataController/selectBigDataFirecontrolFulltimeStationDeptCount',
+    url: '/center-data/fireControlBigData/selectBigDataFirecontrolFulltimeStationDeptCount',
     method: 'post',
   })
 }
@@ -147,7 +154,7 @@ export function getZzz() {
 //消火栓
 export function getXhs() {
   return request({
-    url: '/center-firecontrol/VisuForestCloudBigDataController/selectBigDataFirehydrantDeptCount',
+    url: '/center-data/fireControlBigData/selectBigDataFirehydrantDeptCount',
     method: 'post',
   })
 }
@@ -155,7 +162,7 @@ export function getXhs() {
 //泡沫液
 export function getPmy() {
   return request({
-    url: '/center-firecontrol/VisuForestCloudBigDataController/selectBigDataFirecontrolFoamLiquidDeptCount',
+    url: '/center-data/fireControlBigData/selectBigDataFirecontrolFoamLiquidDeptCount',
     method: 'post',
   })
 }
@@ -163,8 +170,11 @@ export function getPmy() {
 //泡沫液
 export function getSbfb() {
   return request({
-    url: '/center-firecontrol/VisuForestCloudBigDataController/getSbfb',
+    url: '/center-monitor/camera/selectDeviceTypeR',
     method: 'post',
+    data:{
+      type:8
+    }
   })
 }
 
@@ -175,8 +185,9 @@ export function getRlt(param) {
     let myDate = new Date();
     param = {day: myDate.getFullYear()}
   }
+  param.eventTypeId=['103']
   return request({
-    url: '/center-firecontrol/VisuForestCloudBigDataController/getHeatMap',
+    url: '/center-event/eventreport/getHeatMap',
     method: 'post',
     data : param
   })
@@ -185,23 +196,24 @@ export function getRlt(param) {
 // 联动车辆统计
 export function getG1() {
   return request({
-    url: '/center-firecontrol/VisuForestCloudBigDataController/selectWaterGateDeptCount',
+    url: '/center-data/fireControlBigData/getbasiclinkageforeList',
     method: 'post',
   })
 }
 
 // 消防事件统计
-export function getG2() {
+export function getG2(param) {
   return request({
-    url: '/center-firecontrol/VisuForestCloudBigDataController/selectWaterProjectDeptCount',
+    url: '/center-event/eventreport/getEventStatusStatistics',
     method: 'post',
+    data:param
   })
 }
 
 // 其他力量统计
 export function getG3() {
   return request({
-    url: '/center-firecontrol/VisuForestCloudBigDataController/selectReachWaterDeptCount',
+    url: '/center-data/fireControlBigData/getOtherlinkageforceList',
     method: 'post',
   })
 }

+ 1 - 1
src/api/event.js

@@ -1,5 +1,5 @@
 import request from '@/utils/request'
-
+import Cookies from 'js-cookie'
 
 //根据类型获取事件
 export function getNearEvent(longitude, latitude, day, loading, eventTypeIdDl, eventTypeId) {

+ 1 - 1
src/api/leader.js

@@ -15,7 +15,7 @@ export function getForestLeader(linJob,linType) {
     url: '/center-data/personnelpatrol/getResourcesLeader',
     method: 'post',
     data:{
-      linJob:linjob,
+      linJob:linJob,
       linType:linType
     }
   })

+ 20 - 15
src/api/monitor.js

@@ -13,16 +13,21 @@ export function selectDeviceType(param) {
 // 根据设备类型查看列表
 export function selectCameraByDeptId(deptId) {
   return request({
-    url: '/center-firecontrol/VisuForestMonitorCenterController/selectCameraByDeptId',
+    url: '/center-monitor/camera/selectCameraByDeptId',
     method: 'post',
-    data:{"deptId":deptId}
+    data:{deptId:deptId,
+    type:8
+    }
   })
 }
 // 获取重点区域列表
 export function selectKeyAreaList() {
   return request({
-    url: '/center-firecontrol/VisuForestCloudMapController/importarealistFegin',
-    method: 'get',
+    url: '/center-monitor/importarea/listImportareaFegin',
+    method: 'post',
+    data:{
+      areaType:4
+    }
   })
 }
 // 获取重点区域
@@ -37,26 +42,26 @@ export function rotation(lng,lat,list) {
   // lng = '124.41986560821533';
   // lat = '43.08817137032747';
   return request({
-    url: '/center-firecontrol/VisuForestMonitorCenterController/rotation',
-    method: 'post',
-    data:{
-      lng:lng,
-      lat:lat,
-      list:list
-    }
+    url: '/center-monitor/DahuaController/rotation?lng='+lng+'&lat='+lng+'&list='+lng,
+    method: 'get',
+    // data:{
+    //   lng:lng,
+    //   lat:lat,
+    //   list:list
+    // }
   })
 }
 //根据部门ID获取具有查看权限的摄像头
 export function getCamerasByDeptId(deptId) {
   return request({
-    url: '/center-firecontrol/VisuForestMonitorCenterController/getCamerasByDeptId?deptId=' + deptId,
+    url: '/center-monitor/TVWallController/getCamerasByDeptId?deptId=' + deptId+'&deptProtype=2',
     method: 'get',
   })
 }
 //根据部门id查询部门及部门以下的数据,没有则默认查询所有
 export function getSensorListByDeptId(deptId) {
   return request({
-    url: '/center-firecontrol/VisuForestMonitorCenterController/getSensorListByDeptId?deptId=' + deptId,
+    url: '/center-monitor/device/getSensorListByDeptId?deptId=' + +'&type=null',
     method: 'get',
   })
 }
@@ -64,9 +69,9 @@ export function getSensorListByDeptId(deptId) {
 export function getDlblistBydeptId(deptId) {
   let url = "";
   if(deptId!=null){
-    url= '/center-firecontrol/VisuForestMonitorCenterController/getDlblistBydeptId?deptId=' + deptId+"&type=8";
+    url= '/center-monitor/broadcast/getDlblistBydeptId?deptId=' + deptId+"&type=8";
   }else{
-    url= '/center-firecontrol/VisuForestMonitorCenterController/getDlblistBydeptId?type=8';
+    url= '/center-monitor/broadcast/getDlblistBydeptId?type=8';
   }
   return request({
     url: url,

+ 21 - 1
src/views/bigdata/chart-eventTrend.vue

@@ -28,13 +28,33 @@
 
       sjqs() {
         let that = this
-        getSjqs().then(resp => {
+        let yearMonth = []
+        var date = new Date();
+        let day = new Date(date.getFullYear(), date.getMonth(), 0).getDate();
+        for (let i = 1; i <= day; i++) {
+          let days = "";
+          if (i < 10) {
+            days = "0" + i;
+          } else {
+            days = i;
+          }
+          let aDate = date.getFullYear() + "-" + this.formatNum(date.getMonth()+1) + "-" + days;
+          yearMonth.push(aDate);
+        }
+        let param={}
+        param.yearMonth=yearMonth
+        param.eventTypeId=['103']
+        getSjqs(param).then(resp => {
           // that.data_sjqs_month = resp.data.mouth
             that.data_sjqs_month=resp.data.month
           that.data_sjqs_num = resp.data.num
           that.myEcharts()
         })
       },
+      formatNum(num) {
+        let res = Number(num);
+        return res < 10 ? "0" + res : res;
+      },
       myEcharts() {
         let that = this
         var chartDom = document.getElementById('pit');

+ 19 - 1
src/views/bigdata/chart-firecontrol.vue

@@ -9,6 +9,7 @@
 <script>
 	import * as echarts from 'echarts';
   import {getG2} from '@/api/bigdata'
+  import { parseBigInt } from 'jsencrypt/lib/lib/jsbn/jsbn'
 	export default {
 		name: 'chartPitG2',
 		data() {
@@ -25,7 +26,24 @@
 		methods: {
       getG2() {
         let that = this
-        getG2().then(res => {
+         let param={}
+        param.eventStatus=['forest_event_status_1','forest_event_status_7','forest_event_status_3','forest_event_status_4']
+        let value=[]
+        getG2(param).then(res => {
+          let type=[0,3,1]
+
+          if(null!=res.data)
+          {
+            type.forEach(item=>
+            {
+              let value1=0
+              value1=parseBigInt(res.data[item].get('value')+'')
+              value.push(value1)
+            })
+
+          }
+          res.data.name=["待确认", "确认", "无异常"]
+          res.data.value=value
           this.source = res.data
           console.log("消防事件统计", res.data)
           that.myEcharts1()

+ 9 - 2
src/views/bigdata/chart-foamLiquid.vue

@@ -29,8 +29,15 @@
       pmy() {
         let that = this
         getPmy().then(resp => {
-          that.data_pmy_name = resp.data.name
-          that.data_pmy_value = resp.data.value
+          let name=[]
+          let value=[]
+          resp.data.forEach(item=>
+          {
+            name.push(item.name)
+            value.push(item.value)
+          })
+          that.data_pmy_name = name
+          that.data_pmy_value = value
           that.myEcharts()
         })
       },

+ 9 - 0
src/views/bigdata/chart-hydrant.vue

@@ -27,6 +27,15 @@
       getG3() {
         let that = this
         getG3().then(res => {
+          let name=[]
+          let value=[]
+          res.data.forEach(item=>
+          {
+            name.push(item.name)
+            value.push(item.value)
+          })
+          res.data.name=name
+          res.data.value=value
           this.source = res.data
           console.log("其他力量统计", res.data)
           that.myEcharts()

+ 9 - 0
src/views/bigdata/chart-pit.vue

@@ -27,6 +27,15 @@
       getG1() {
         let that = this
         getG1().then(res => {
+          let name=[]
+          let value=[]
+          res.data.forEach(item=>
+          {
+            name.push(item.name)
+            value.push(item.value)
+          })
+          res.data.name=name
+          res.data.value=value
           this.source = res.data
           console.log("联动车辆统计", res.data)
           that.myEcharts()

+ 10 - 2
src/views/bigdata/chart-waterIntake.vue

@@ -29,9 +29,17 @@
 
       qsk() {
         let that = this
+
         getQsk().then(resp => {
-          that.data_qsk_name = resp.data.name
-          that.data_qsk_value = resp.data.value
+          let name=[]
+          let value=[]
+          resp.data.forEach(item=>
+          {
+            name.push(item.name)
+            value.push(item.value)
+          })
+          that.data_qsk_name = name
+          that.data_qsk_value = value
           that.myEcharts()
         })
       },