ソースを参照

回滚,监控中心添加部门

王通 1 年間 前
コミット
a69a193efe
3 ファイル変更15 行追加7 行削除
  1. 1 1
      src/api/components/supermap.js
  2. 2 1
      src/api/monitor.js
  3. 12 5
      src/views/monitor.vue

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

@@ -43,7 +43,7 @@ export const iconList = {
   'sj-icon-map-centerdata_t_forest_firehydrant@2': require('@/assets/icons/sj-icon-map/centerdata/sj-icon-map-centerdata_t_forest_firehydrant@2.png'),//地下消防栓
   'sj-icon-map-centerdata_t_forest_firehydrant@3': require('@/assets/icons/sj-icon-map/centerdata/sj-icon-map-centerdata_t_forest_firehydrant@3.png'),//室内消防栓
   'sj-icon-map-centerdata-t-forest-fireteam': require('@/assets/icons/sj-icon-map/centerdata/sj-icon-map-centerdata-t-forest-fireteam.png'),//森林防火队
-
+  'sj-icon-map-centerdata-slmonitor-traffic': require('@/assets/icons/sj-icon-map/centerdata/sj-icon-map-centerdata-slmonitor-traffic.png'),//交通精细化摄像头
 
   // 数据中心传感器
   'sj-icon-map-centerdata_water_quality_sensor': require('@/assets/icons/sj-icon-map/centerdata/sj-icon-map-centerdata_water_quality_sensor.png'),//水质传感器

+ 2 - 1
src/api/monitor.js

@@ -1,10 +1,11 @@
 import request from '@/utils/request'
 
 // 获取左侧动态感知设备
-export function selectDeviceType() {
+export function selectDeviceType(deptId) {
   return request({
     url: '/center-firecontrol/VisuForestMonitorCenterController/selectDeviceType',
     method: 'post',
+    data:{"deptId":deptId}
   })
 }
 

+ 12 - 5
src/views/monitor.vue

@@ -272,8 +272,8 @@ export default {
       this.bottomMenuList(); //获取底部公共组件消息和任务
       this.getTreeselect();
       this.deptId = Cookies.get("deptId");
-      this.getMonitorDeviceAndDataLists(null);
-       this.getDlblistBydeptIds(null);
+      this.getMonitorDeviceAndDataLists(this.deptId);
+       this.getDlblistBydeptIds();
       this.selectDeviceType(-1);
     }, 2000)
   },
@@ -530,10 +530,10 @@ export default {
       this.localMark = "chuan";
       this.placeholderMsg = "请输入传感器名称";
       this.deptId = null;
-      this.getMonitorDeviceAndDataList(null);
+      this.getMonitorDeviceAndDataList(this.deptId);
       clearInterval(this.cgqTimer);
       this.cgqTimer = setInterval(() => {
-        this.getMonitorDeviceAndDataList();
+        this.getMonitorDeviceAndDataList(this.deptId);
       }, 20000);
     },
     //传感器2
@@ -1159,7 +1159,7 @@ export default {
     selectDeviceType() {
       //获取左侧动态感知设备
       let that = this;
-      selectDeviceType().then((res) => {
+      selectDeviceType(this.deptId).then((res) => {
         that.cameraMarkersList = [];
         that.visuForestCloudMapDeviceBOList =
           res.data.visuForestCloudMapDeviceBOList;
@@ -1220,6 +1220,13 @@ export default {
             markersMap.lat = res.data.visuForestCloudCameraBOList[i].latitude;
             markersMap.radius =
               res.data.visuForestCloudCameraBOList[i].cameraRadius;
+            if (res.data.visuForestCloudCameraBOList[i].cameraUse == 1) {
+              markersMap.icon = "sj-icon-map-centerdata-slmonitor";
+            } else if (res.data.visuForestCloudCameraBOList[i].cameraUse == 2) {
+              markersMap.icon = "camera";
+            }else if (res.data.visuForestCloudCameraBOList[i].cameraUse == 3) {
+              markersMap.icon = "sj-icon-map-centerdata-slmonitor-traffic";
+            }
             markersMap.bindPopupHtml =
               '<div class="map-tip">' +
               "<span>" +