浏览代码

monitor直连接口

qinhouyu 1 年之前
父节点
当前提交
af0ebffd34
共有 2 个文件被更改,包括 33 次插入16 次删除
  1. 19 0
      src/api/monitor.js
  2. 14 16
      src/views/monitor.vue

+ 19 - 0
src/api/monitor.js

@@ -8,6 +8,13 @@ export function selectDeviceType(deptId) {
     data:{"deptId":deptId}
   })
 }
+export function selectDeviceType_direct(param) {
+  return request({
+    url: '/sooka-middlevisualization/visuMiddleVisualizationController/selectDeviceType',
+    method: 'post',
+    data:param
+  })
+}
 // 根据设备类型查看列表
 export function selectCameraByDeptId(deptId) {
   return request({
@@ -102,6 +109,18 @@ export function getDlblistBydeptId(deptId) {
   })
 }
 
+export function getDlblistBydeptId_direct(deptId) {
+  let url = "";
+  if(deptId!=null){
+    url= '/center-monitor/broadcast/getDlblistBydeptId?deptId=' + deptId+'&type=7';
+  }else{
+    url= '/center-monitor/broadcast/getDlblistBydeptId/getDlblistBydeptId?type=7';
+  }
+  return request({
+    url: url,
+    method: 'get',
+  })
+}
 //根据部门id查询部门及部门以下的数据,没有则默认查询所有
 export function getMonitorDeviceAndDataList(deptId) {
   let url = "";

+ 14 - 16
src/views/monitor.vue

@@ -139,17 +139,17 @@
 </template>
 
 <script>
-  import {
-    selectDeviceType,
-    selectCameraByDeptId,
-    getSensorListByDeptId,
-    getDlblistBydeptId,
-    selectKeyAreaList,
-    getRegionalFlag,
-    notCoverPlaces,
-    getCamerasByDeptId,
-    getMonitorDeviceAndDataList
-  } from '@/api/monitor'
+import {
+  selectDeviceType,
+  selectCameraByDeptId,
+  getSensorListByDeptId,
+  getDlblistBydeptId,
+  selectKeyAreaList,
+  getRegionalFlag,
+  notCoverPlaces,
+  getCamerasByDeptId,
+  getMonitorDeviceAndDataList, getDlblistBydeptId_direct, selectDeviceType_direct
+} from '@/api/monitor'
   import {
     treeselect
   } from '@/api/system/dept'
@@ -497,7 +497,7 @@
       getDlblistBydeptId() {
         let that = this;
         let markersList = [];
-        getDlblistBydeptId(that.deptId).then(function(res) {
+        getDlblistBydeptId_direct(that.deptId).then(function(res) {
             // that.loudspeakerNum = res.data.length
             that.visuForestCloudCameraBOListSearch = []
                that.tempList = []
@@ -589,15 +589,13 @@
       getDlblistBydeptIds() {
         let that = this;
 
-        getDlblistBydeptId(that.deptId).then(function(res) {
+        getDlblistBydeptId_direct(that.deptId).then(function(res) {
             that.loudspeakerNum = res.data.length
           })
           .catch(function(error) {
             console.error(error);
           });
       },
-
-
       getMonitorDeviceAndDataList() {
         let list = []
         let markersList = [];
@@ -938,7 +936,6 @@
       getSensorListByDeptId() {
         let that = this;
         let markersList = [];
-
         getSensorListByDeptId(that.deptId).then(function(res) {
             that.visuForestCloudCameraBOListSearch = []
             // that.sensorNum = res.data.length
@@ -1117,6 +1114,7 @@
         //获取左侧动态感知设备
         let that = this
         selectDeviceType(that.deptId).then(res => {
+        // selectDeviceType_direct({deptId:that.deptId,type:7}).then(res => {
           that.cameraMarkersList = []
           that.tempList = []
           that.visuForestCloudMapDeviceBOList = res.data.visuForestCloudMapDeviceBOList