qinhouyu 1 gadu atpakaļ
vecāks
revīzija
56fdc71a46
2 mainītis faili ar 45 papildinājumiem un 36 dzēšanām
  1. 35 1
      src/api/monitor.js
  2. 10 35
      src/views/monitor.vue

+ 35 - 1
src/api/monitor.js

@@ -8,6 +8,14 @@ export function selectDeviceType(deptId) {
     data:{"deptId":deptId}
   })
 }
+export function selectCameraByDeptId_direct(deptId) {
+  return request({
+    url: '/center-monitor/camera/selectCameraByDeptId',
+    method: 'post',
+    data: {"deptId":deptId,"type":4}
+  })
+}
+
 // 根据设备类型查看列表
 export function selectCameraByDeptId(deptId) {
   return request({
@@ -23,6 +31,15 @@ export function selectKeyAreaList() {
     method: 'get',
   })
 }
+export function selectKeyAreaList_direct() {
+  return request({
+    url: '/center-data/importarea/listImportareaFegin',
+    method: 'post',
+    data:{
+      areaType:4
+    }
+  })
+}
 // 获取重点区域
 export function getRegionalFlag(id) {
   return request({
@@ -60,6 +77,12 @@ export function getCamerasByDeptId(deptId) {
     method: 'get',
   })
 }
+export function getCamerasByDeptId_direct(deptId,deptProtype) {
+  return request({
+    url: `/center-monitor/TVWallController/getCamerasByDeptId?deptId=${deptId}&deptProtype=${deptProtype}`,
+    method: 'get',
+  })
+}
 //根据部门id查询部门及部门以下的数据,没有则默认查询所有
 export function getSensorListByDeptId(deptId) {
   return request({
@@ -124,7 +147,18 @@ export function getDlblistBydeptId(deptId) {
     method: 'get',
   })
 }
-
+export function getDlblistBydeptId_direct(deptId) {
+  let url = "";
+  if(deptId!=null){
+    url= '/center-monitor/broadcast/getDlblistBydeptId?deptId=' + deptId+'&type=4';
+  }else{
+    url= '/center-monitor/broadcast/getDlblistBydeptId/getDlblistBydeptId?type=4';
+  }
+  return request({
+    url: url,
+    method: 'get',
+  })
+}
 //根据部门id查询部门及部门以下的数据,没有则默认查询所有
 export function getMonitorDeviceAndDataList(deptId) {
   let url = "";

+ 10 - 35
src/views/monitor.vue

@@ -223,6 +223,10 @@ import {
   getRegionalFlag,
   getCamerasByDeptId,
   getMonitorDeviceAndDataList,
+  getCamerasByDeptId_direct,
+  getDlblistBydeptId_direct,
+  selectKeyAreaList_direct,
+  selectCameraByDeptId_direct,
 } from "@/api/monitor";
 import { treeselect } from "@/api/system/dept";
 import supermap from "@/components/supermap-2.5d"; //超图
@@ -802,36 +806,6 @@ export default {
         this.$refs.supermap.setMarkers(markersList);
       }, 2000);
     },
-
-    // setcgqValue: function() {
-    //   let that = this
-    //   for (let i = 0; i < that.visuForestCloudCameraBOListSearch.length; i++) {
-    //     var color = "green";
-    //     var value = Math.random();
-    //     var up = "▲";
-    //     var down = "▼";
-    //     if (value > 0.5) {
-    //       color = "red";
-    //       value = value + "" + up;
-    //     } else {
-    //       value = value + "" + down;
-    //     }
-    //     that.cgqData.push("<span style='color:" + color + "'>" + value + "</span>")
-    //   }
-    //   setInterval(function() {
-    //     var color = "green";
-    //     var value = Math.random();
-    //     var up = "▲";
-    //     var down = "▼";
-    //     if (value > 0.5) {
-    //       color = "red";
-    //       value = value + "" + up;
-    //     } else {
-    //       value = value + "" + down;
-    //     }
-    //     that.cgqData = "<span style='color:" + color + "'>" + value + "</span>";
-    //   }, 1000)
-    // },
     /* 电视墙替换开始 */
     showTVWall(channelCode, channelName,type) {
       let tvListJson = [
@@ -902,7 +876,8 @@ export default {
       // this.findCameraByDept(data.id)
       if (that.localMark == "she") {
         that.selectCameraByDeptId(data.id);
-        getCamerasByDeptId(data.id).then((res) => {
+        let deptProtype = '2';
+        getCamerasByDeptId_direct(data.id,deptProtype).then((res) => {
           that.$refs.TVWalls.showTVWall(res.data, {
             longitude: data.deptLongitude,
             latitude: data.deptLatitude,
@@ -960,7 +935,7 @@ export default {
     getDlblistBydeptId(deptId) {
       let that = this;
       let markersList = [];
-      getDlblistBydeptId(deptId)
+      getDlblistBydeptId_direct(deptId)
         .then(function (res) {
           that.loudspeakerNum = res.data.length;
           that.visuForestCloudCameraBOListSearch = [];
@@ -1058,7 +1033,7 @@ export default {
     getDlblistBydeptIds(deptId) {
       let that = this;
 
-      getDlblistBydeptId(deptId)
+      getDlblistBydeptId_direct(deptId)
         .then(function (res) {
           that.loudspeakerNum = res.data.length;
         })
@@ -1150,7 +1125,7 @@ export default {
       this.keyAreaList = [];
       //获取重点区域列表
       let that = this;
-      selectKeyAreaList().then((res) => {
+      selectKeyAreaList_direct().then((res) => {
         that.keyAreaList = res.data;
       });
     },
@@ -1447,7 +1422,7 @@ export default {
       let that = this;
       that.cameraMarkersList = [];
       that.visuForestCloudCameraBOList = [];
-      selectCameraByDeptId(depId).then((res) => {
+      selectCameraByDeptId_direct(depId).then((res) => {
         //根据设备类型查看列表
         that.visuForestCloudCameraBOList = res.data;
         that.visuForestCloudCameraBOListSearch = res.data;