Browse Source

日志接口更改
重点区域接口

彭宇 2 years ago
parent
commit
057eca9845
5 changed files with 54 additions and 22 deletions
  1. 3 2
      src/api/forest.js
  2. 9 2
      src/api/monitor.js
  3. 4 7
      src/components/supermap.vue
  4. 2 2
      src/views/eventdetailsdialog.vue
  5. 36 9
      src/views/monitor.vue

+ 3 - 2
src/api/forest.js

@@ -85,7 +85,7 @@ export function getEventByReportorOrder(param) {
 // 日志文件上传
 export function eventLogUpload(param) {
   return request({
-    url: '/center-event/eventcatalogue/centereventtfirelog',
+    url: '/center-event/centereventtfirelog',
     method: 'post',
     data: param
   })
@@ -93,11 +93,12 @@ export function eventLogUpload(param) {
 // 日志发送
 export function sendEventLog(param) {
   return request({
-    url: '/center-event/eventcatalogue/centereventtfirelog',
+    url: '/center-event/centereventtfirelog',
     method: 'post',
     data: param
   })
 }
+
 // 事件处理流程
 export function updateCentereventTEventcatalogueStatus(param) {
   return request({

+ 9 - 2
src/api/monitor.js

@@ -15,10 +15,17 @@ export function selectCameraByDeptId(deptId) {
     data:{"deptId":deptId}
   })
 }
-// 获取重点区域
+// 获取重点区域列表
 export function selectKeyAreaList() {
   return request({
-    url: '/center-data/importarea/listFegin',
+    url: '/center-firecontrol/VisuForestCloudMapController/importarealistFegin',
+    method: 'get',
+  })
+}
+// 获取重点区域
+export function getRegionalFlag(id) {
+  return request({
+    url: '/center-firecontrol/VisuForestCloudMapController/getRegionalFlag/'+id,
     method: 'get',
   })
 }

+ 4 - 7
src/components/supermap.vue

@@ -1187,13 +1187,10 @@ export default {
       }
     },
     dropLocation: function(lat, lng) { //落点定位
-
-      this.map.flyTo([lat, lng], 12, { duration: 2 })
-
-      // this.controlLevel(12)
-      // setTimeout(() => {
-      //   this.map.panTo([lat, lng])
-      // }, 1000)
+      this.map.flyTo([lat, lng], 13, { duration: 2 })
+    },
+    dropLocation10: function(lat, lng) { //落点定位
+      this.map.flyTo([lat, lng], 10, { duration: 2 })
     },
     controlLevel: function(level) { //控制地图缩放级别
       this.map.setZoom(level)

+ 2 - 2
src/views/eventdetailsdialog.vue

@@ -1827,7 +1827,7 @@ export default {
           that.$refs.supermapDialog.dynamicPlotting() //弹出动态绘制窗口,防止截图位置改变
           that.$refs.supermapDialog.clearM(false)
           that.$refs.supermapDialog.setMarkersRadius([markersMap])
-          that.$refs.supermapDialog.dropLocation(res.data.catalogue.latitude, res.data
+          that.$refs.supermapDialog.dropLocation10(res.data.catalogue.latitude, res.data
             .catalogue.longitude)
         }, 2000)
         if (res.data.centermonitorTCamera != null) {
@@ -1919,7 +1919,7 @@ export default {
           } else {
             that.$refs.supermapDialog.setMarkers([markersMap])
           }
-          that.$refs.supermapDialog.dropLocation(res.data.catalogue.latitude, res.data
+          that.$refs.supermapDialog.dropLocation10(res.data.catalogue.latitude, res.data
             .catalogue.longitude)
         }, 2000)
         if (res.data.centermonitorTCamera != null) {

+ 36 - 9
src/views/monitor.vue

@@ -99,7 +99,7 @@
               <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;"/>
             </div>
             <div class="i-list-con h-25">
-              <div class="d-l-con" v-for="(item,index) in keyAreaList" @click="">
+              <div class="d-l-con" v-for="(item,index) in keyAreaList" :class="{on:listCurrentIndex3 == index}" @click="getRegionalFlag(item.id)">
                 <div class="d-l-l-text">
                   <i class="i-small"></i>
                   <h4>{{ item.areaName }}</h4>
@@ -132,7 +132,8 @@
 import {
   selectDeviceType,
   selectCameraByDeptId,
-  selectKeyAreaList
+  selectKeyAreaList,
+  getRegionalFlag
 } from '@/api/monitor'
 
 import supermap from '@/components/supermap' //超图
@@ -183,6 +184,7 @@ export default {
       iconCurrentIndex1: '-1',
       listCurrentIndex1: '-1',
       listCurrentIndex2: '-1',
+      listCurrentIndex3: '-1',
       /** ----------------------------------摄像头预览开始------------------------------------- */
       //大华
       activePanel: 'key1',
@@ -216,6 +218,38 @@ export default {
     }
   },
   methods: {
+    selectKeyAreaList() {
+      this.keyAreaList=[]
+      //获取重点区域列表
+      let that = this
+      selectKeyAreaList().then(res => {
+        that.keyAreaList = res.data
+      })
+    },
+    getRegionalFlag(id){
+      //获取重点区域
+      this.listCurrentIndex3=id
+      let that = this
+      getRegionalFlag(id).then(res => {
+        that.graphicsList=[]
+        //地图标记
+        if (res.data != null && res.data.length > 0) {
+          for (let i = 0; i < res.data.length; i++) {
+            let latlng = {
+              lat: res.data[i].lat,
+              lng: res.data[i].lng
+            }
+            that.graphicsList.push(latlng)
+          }
+          setTimeout(() => {
+            that.$refs.supermap.clearG()
+            that.$refs.supermap.setGraphicsList(this.graphicsList, 'red')
+          }, 1000)
+        } else {
+          that.$refs.supermap.clearG()
+        }
+      })
+    },
     /** ----------------------------------底部按钮公用组件开始------------------------------------- */
     showDialog(click) {
       if (click == 'eventLocation') {
@@ -374,13 +408,6 @@ export default {
         }]
       })
     },
-    selectKeyAreaList() {
-      //获取重点区域
-      let that = this
-      selectKeyAreaList().then(res => {
-        that.keyAreaList = res
-      })
-    },
     selectDeviceType(index) {
       this.iconCurrentIndex1 = index
       //获取左侧动态感知设备