Просмотр исходного кода

环保 事件详情新增大喇叭广播

付宇航 1 год назад
Родитель
Сommit
84f6cede6f
3 измененных файлов с 119 добавлено и 4 удалено
  1. 7 0
      src/api/forest.js
  2. 56 2
      src/views/eventdetailsdialog.vue
  3. 56 2
      src/views/firespread.vue

+ 7 - 0
src/api/forest.js

@@ -190,6 +190,13 @@ export function listResourceByWz(param) {
     data:param
   })
 }
+// 云广播搜索物资
+export function getSelectNearHorn(params) {
+  return request({
+    url: `/center-monitor/broadcast/selectNearHorn/${params.longitude}/${params.latitude}/${params.distance}/${params.type}`,
+    method: 'get',
+  })
+}
 // 事件审核
 export function eventExamine(param) {
   return request({

+ 56 - 2
src/views/eventdetailsdialog.vue

@@ -2086,6 +2086,7 @@ import {
   eventExamine,
   eventHandling,
   initByCameras,
+  getSelectNearHorn
 } from "@/api/forest";
 import { joinConferences } from "@/api/meeting";
 import { treeselectAll as deptTreeselect } from "@/api/system/dept";
@@ -2412,6 +2413,13 @@ export default {
           icon: "sj-icon-jkzx",
           bg: "#f5ad1b",
         });
+        _this.resourcesList1.push({
+          resourceName: "云广播",
+          type: "ygb",
+          count: "1",
+          icon: "sj-icon-labaguangbo",
+          bg: "#0f0773",
+        });
       });
     },
     /************************************责任制-开始****************************************/
@@ -2734,7 +2742,7 @@ export default {
           type: type,
           radius: this.radius,
         };
-        if (type != "sxt") {
+        if (type != "sxt" && type != 'ygb') {
           fireControlViewPoint(param).then((res) => {
             if (res.data != null && res.data.pointList.length > 0) {
               this.resourcesListCheck.push(type);
@@ -2831,11 +2839,57 @@ export default {
               this.$message.warning("当前点位附近无资源数据");
             }
           });
-        } else {
+        } else if (type == 'sxt') {
           this.listResourceByWz(type);
+        } else if (type == 'ygb'){
+          this.getSelectNearHorn('ygb')
         }
       }
     },
+    // 地图功能 云广播类型资源
+    async getSelectNearHorn(type){
+      let params = {
+          longitude: this.longitude,
+          latitude: this.latitude,
+          type:1,
+          distance: this.radius
+        }
+      let res = await getSelectNearHorn(params)
+      var markersList = []
+      for (let i = 0; i < res.data.length; i++) {
+          let markersMap = {
+            lng: 124.59,
+            lat: 43.02,
+            icon: 'marker',
+            bindPopupHtml: '',
+            click: '',
+            parameter: '',
+            keepBindPopup: false,
+            isAggregation: true
+          }
+          if(res.data[i].broadcastUse == '1'){
+            markersMap.icon = 'big-horn-emergency'
+          }else if (res.data[i].broadcastUse == '2') {
+            markersMap.icon = 'big-horn'
+          }
+          markersMap.lng = res.data[i].longitude
+          markersMap.lat = res.data[i].latitude
+          markersMap.bindPopupHtml = '<div class="map-tip">' +
+            '<span>' +
+            '                  <div class="d-l-con">' +
+            '                  <div class="d-l-l-text">' +
+            '                  <h4>资源名称:' + res.data[i].cameraName + '</h4>' +
+            '                </div>' +
+            '                </div>' +
+            '                </span>' +
+            '</div>'
+          markersList.push(markersMap)
+        }
+      setTimeout(() => {
+        this.$refs.supermapDialog1.setMarkersByType(markersList, type)
+      }, 1000)
+      console.log('云广播资源',res)
+    },
     listResourceByWz(type) {
       if (this.resourcesListCheck.indexOf(type) > -1) {
         this.resourcesListCheck.splice(

+ 56 - 2
src/views/firespread.vue

@@ -1115,6 +1115,7 @@ import {
   fireControlViewList,
   fireControlViewPoint,
   sendMessage,
+  getSelectNearHorn
 } from '@/api/forest'
 import {
   treeselectAll as deptTreeselect
@@ -1583,8 +1584,59 @@ export default {
           icon: "sj-icon-jkzx",
           bg: "#f5ad1b",
         });
+        _this.resourcesList1.push({
+          resourceName: "云广播",
+          type: "ygb",
+          count: "1",
+          icon: "sj-icon-labaguangbo",
+          bg: "#0f0773",
+        });
       });
     },
+    // 地图功能 云广播类型资源
+    async getSelectNearHorn(type){
+      let params = {
+          longitude: this.longitude,
+          latitude: this.latitude,
+          type:1,
+          distance: this.radius
+        }
+      let res = await getSelectNearHorn(params)
+      var markersList = []
+      for (let i = 0; i < res.data.length; i++) {
+          let markersMap = {
+            lng: 124.59,
+            lat: 43.02,
+            icon: 'marker',
+            bindPopupHtml: '',
+            click: '',
+            parameter: '',
+            keepBindPopup: false,
+            isAggregation: true
+          }
+          if(res.data[i].broadcastUse == '1'){
+            markersMap.icon = 'big-horn-emergency'
+          }else if (res.data[i].broadcastUse == '2') {
+            markersMap.icon = 'big-horn'
+          }
+          markersMap.lng = res.data[i].longitude
+          markersMap.lat = res.data[i].latitude
+          markersMap.bindPopupHtml = '<div class="map-tip">' +
+            '<span>' +
+            '                  <div class="d-l-con">' +
+            '                  <div class="d-l-l-text">' +
+            '                  <h4>资源名称:' + res.data[i].cameraName + '</h4>' +
+            '                </div>' +
+            '                </div>' +
+            '                </span>' +
+            '</div>'
+          markersList.push(markersMap)
+        }
+      setTimeout(() => {
+        this.$refs.supermapDialog1.setMarkersByType(markersList, type)
+      }, 1000)
+      console.log('云广播资源',res)
+    },
     fireControlViewPoint(type) {
       let that = this;
       if (that.resourcesListCheck.indexOf(type) > -1) {
@@ -1600,7 +1652,7 @@ export default {
           type: type,
           radius: that.radius
         }
-        if (type != 'sxt') {
+        if (type != 'sxt' && type != 'ygb') {
           fireControlViewPoint(param).then(res => {
             if (res.data != null && res.data.pointList.length > 0) {
               that.resourcesListCheck.push(type)
@@ -1695,8 +1747,10 @@ export default {
               }, 1000)
             }
           })
-        } else {
+        } else if(type == 'sxt') {
           that.listResourceByWz(type);
+        } else if (type == 'ygb'){
+          that.getSelectNearHorn('ygb')
         }
       }
     },