Pārlūkot izejas kodu

监控中心修改

王通 1 gadu atpakaļ
vecāks
revīzija
4d1f8f8047

+ 1 - 2
src/api/components/supermap.js

@@ -14,8 +14,7 @@ export const iconList = {
   'camera-not': require('@/assets/images/cameraType/camera-not.png'),
   'not-online': require('@/assets/images/cameraType/not-online.png'),
   'sensor': require('@/assets/images/cameraType/sensor.png'),
-
-
+  'big-horn-emergency': require('@/assets/images/cameraType/big-horn-emergency.png'),
   //首页事件上报状态
   'sj-icon-map-xinshangbao': require('@/assets/icons/sj-icon-map/sj-icon-map-xinshangbao.png'),//新上报
   'sj-icon-map-cuiban': require('@/assets/icons/sj-icon-map/sj-icon-map-cuiban.png'),//催办

+ 2 - 2
src/api/monitor.js

@@ -62,9 +62,9 @@ export function getSensorListByDeptId(deptId) {
 export function getDlblistBydeptId(deptId) {
   let url = "";
   if(deptId!=null){
-    url= '/center-firecontrol/VisuForestMonitorCenterController/getDlblistBydeptId?deptId=' + deptId;
+    url= '/center-firecontrol/VisuForestMonitorCenterController/getDlblistBydeptId?deptId=' + deptId+"&type=8";
   }else{
-    url= '/center-firecontrol/VisuForestMonitorCenterController/getDlblistBydeptId';
+    url= '/center-firecontrol/VisuForestMonitorCenterController/getDlblistBydeptId?type=8';
   }
   return request({
     url: url,

BIN
src/assets/images/cameraType/big-horn-emergency.png


+ 112 - 107
src/views/monitor.vue

@@ -50,6 +50,7 @@
                 <div
                   class="icon-con w-33 m-btm-no"
                   :class="{ on: onLa }"
+                @click="laClick"
                 >
                   <!--@click="laClick"-->
                 <!--&gt;-->
@@ -176,7 +177,7 @@
                 class="d-l-con"
                 v-for="(item, index) in keyAreaList"
                 :class="{ on: listCurrentIndex3 == index }"
-                @click="getRegionalFlag(item.id)"
+                @click="getRegionalFlag(item.id,index)"
               >
                 <div class="d-l-l-text">
                   <i class="i-small"></i>
@@ -272,7 +273,7 @@ export default {
       this.getTreeselect();
       this.deptId = Cookies.get("deptId");
       this.getMonitorDeviceAndDataLists(null);
-      // this.getDlblistBydeptIds(null);
+       this.getDlblistBydeptIds(null);
       this.selectDeviceType(-1);
     }, 2000)
   },
@@ -500,7 +501,7 @@ export default {
       } else if (that.localMark == "chuan") {
         that.getMonitorDeviceAndDataList();
       } else if (that.localMark == "la") {
-        // that.getDlblistBydeptId();
+         that.getDlblistBydeptId();
       }
     },
     sheClick() {
@@ -542,108 +543,112 @@ export default {
         that.sensorNum = res.data.length;
       });
     },
-    // 云广播
-    // getDlblistBydeptId() {
-    //   let that = this;
-    //   let markersList = [];
-    //   getDlblistBydeptId(that.deptId)
-    //     .then(function (res) {
-    //       that.loudspeakerNum = res.data.length;
-    //       that.visuForestCloudCameraBOListSearch = [];
-    //       if (res.data != null && res.data.length > 0) {
-    //         for (let j = 0; j < res.data.length; j++) {
-    //           let dat = {
-    //             cameraName: res.data[j].name,
-    //             longitude: res.data[j].longitude,
-    //             latitude: res.data[j].latitude,
-    //           };
-    //           that.visuForestCloudCameraBOListSearch.push(dat);
-    //         }
-    //         for (let i = 0; i < res.data.length; i++) {
-    //           let markersMap = {
-    //             lng: 124.59,
-    //             lat: 43.02,
-    //             icon: "marker",
-    //             bindPopupHtml:
-    //               '<div class="map-tip">' +
-    //               "<span>" +
-    //               '                  <div class="d-l-con">' +
-    //               '                  <div class="d-l-l-text">' +
-    //               "                  <h4>名称:" +
-    //               (res.data[i].name ? res.data[i].name : "") +
-    //               "</h4>" +
-    //               "                </div>" +
-    //               "                </div>" +
-    //               "                </span>" +
-    //               "<span>" +
-    //               '                  <div class="d-l-con">' +
-    //               '                  <div class="d-l-l-text">' +
-    //               "                  <h4>位置:" +
-    //               (res.data[i].position ? res.data[i].position : "") +
-    //               "</h4>" +
-    //               "                </div>" +
-    //               "                </div>" +
-    //               "                </span>" +
-    //               "<span>" +
-    //               '                  <div class="d-l-con">' +
-    //               '                  <div class="d-l-l-text">' +
-    //               "                  <h4>备注:" +
-    //               (res.data[i].remark ? res.data[i].remark : "") +
-    //               "</h4>" +
-    //               "                </div>" +
-    //               "                </div>" +
-    //               "                </span>" +
-    //               "<span>" +
-    //               '                  <div class="d-l-con">' +
-    //               '                  <div class="d-l-l-text">' +
-    //               "                  <h4>经纬度:" +
-    //               res.data[i].longitude +
-    //               "," +
-    //               res.data[i].latitude +
-    //               "</h4>" +
-    //               "                </div>" +
-    //               "                </div>" +
-    //               "                </span>" +
-    //               "</div>",
-    //             click: "jump",
-    //             parameter: "",
-    //             name: "",
-    //             keepBindPopup: false,
-    //             isAggregation: false,
-    //           };
-    //           markersMap.icon = "big-horn";
-    //
-    //           markersMap.lng = res.data[i].longitude;
-    //           markersMap.lat = res.data[i].latitude;
-    //           markersList.push(markersMap);
-    //         }
-    //         setTimeout(() => {
-    //           that.$refs.supermap.clearM();
-    //           that.$refs.supermap.clearMRadius();
-    //           that.$refs.supermap.setMarkers(markersList);
-    //         }, 2000);
-    //       } else {
-    //         setTimeout(() => {
-    //           that.$refs.supermap.clearM();
-    //           that.$refs.supermap.clearMRadius();
-    //         }, 2000);
-    //       }
-    //     })
-    //     .catch(function (error) {
-    //       console.error(error);
-    //     });
-    // },
-    // getDlblistBydeptIds() {
-    //   let that = this;
-    //
-    //   getDlblistBydeptId()
-    //     .then(function (res) {
-    //       that.loudspeakerNum = res.data.length;
-    //     })
-    //     .catch(function (error) {
-    //       console.error(error);
-    //     });
-    // },
+    //云广播
+    getDlblistBydeptId() {
+      let that = this;
+      let markersList = [];
+      getDlblistBydeptId(that.deptId)
+        .then(function (res) {
+          that.loudspeakerNum = res.data.length;
+          that.visuForestCloudCameraBOListSearch = [];
+          if (res.data != null && res.data.length > 0) {
+            for (let j = 0; j < res.data.length; j++) {
+              let dat = {
+                cameraName: res.data[j].name,
+                longitude: res.data[j].longitude,
+                latitude: res.data[j].latitude,
+              };
+              that.visuForestCloudCameraBOListSearch.push(dat);
+            }
+            for (let i = 0; i < res.data.length; i++) {
+              let markersMap = {
+                lng: 124.59,
+                lat: 43.02,
+                icon: "big-horn",
+                bindPopupHtml:
+                  '<div class="map-tip">' +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>名称:" +
+                  (res.data[i].name ? res.data[i].name : "") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>位置:" +
+                  (res.data[i].position ? res.data[i].position : "") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>备注:" +
+                  (res.data[i].remark ? res.data[i].remark : "") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>经纬度:" +
+                  res.data[i].longitude +
+                  "," +
+                  res.data[i].latitude +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "</div>",
+                click: "jump",
+                parameter: "",
+                name: "",
+                keepBindPopup: false,
+                isAggregation: false,
+              };
+              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;
+              markersList.push(markersMap);
+            }
+            setTimeout(() => {
+              that.$refs.supermap.clearM();
+              that.$refs.supermap.clearMRadius();
+              that.$refs.supermap.setMarkers(markersList);
+            }, 2000);
+          } else {
+            setTimeout(() => {
+              that.$refs.supermap.clearM();
+              that.$refs.supermap.clearMRadius();
+            }, 2000);
+          }
+        })
+        .catch(function (error) {
+          console.error(error);
+        });
+    },
+    getDlblistBydeptIds() {
+      let that = this;
+
+      getDlblistBydeptId()
+        .then(function (res) {
+          that.loudspeakerNum = res.data.length;
+        })
+        .catch(function (error) {
+          console.error(error);
+        });
+    },
 
     getMonitorDeviceAndDataList(deptId) {
       let list = [];
@@ -1065,9 +1070,9 @@ export default {
         that.keyAreaList = res.data;
       });
     },
-    getRegionalFlag(id) {
+    getRegionalFlag(id,index) {
       //获取重点区域
-      this.listCurrentIndex3 = id;
+      this.listCurrentIndex3 = index;
       let that = this;
       getRegionalFlag(id).then((res) => {
         that.graphicsList = [];