浏览代码

云广播数量

彭宇 2 年之前
父节点
当前提交
c4b6df0f83
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 1 1
      src/api/monitor.js
  2. 5 5
      src/views/monitor.vue

+ 1 - 1
src/api/monitor.js

@@ -63,7 +63,7 @@ export function getSensorListByDeptId(deptId) {
 //根据部门id查询部门及部门以下的数据,没有则默认查询所有
 export function getDlblistBydeptId(deptId) {
   let url = "";
-  if(deptId!=null){
+  if(deptId!=null&&deptId!=""){
     url= '/center-emergency/VisuEmergencyMonitorCenterController/getDlblistBydeptId?deptId=' + deptId;
   }else{
     url= '/center-emergency/VisuEmergencyMonitorCenterController/getDlblistBydeptId';

+ 5 - 5
src/views/monitor.vue

@@ -408,7 +408,7 @@ export default {
         //that.getSensorListByDeptId()
         that.getMonitorDeviceAndDataList()
       } else if (that.localMark == 'la') {
-        that.getDlblistBydeptId()
+        that.getDlblistBydeptId(that.deptId)
       }
     },
     sheClick() {
@@ -431,7 +431,7 @@ export default {
       this.placeholderMsg = "请输入云广播名称";
       this.deptId = Cookies.get("deptId");
       clearInterval(this.cgqTimer);
-      this.getDlblistBydeptId();
+      this.getDlblistBydeptId(null);
     },
     chuanClick() {
       this.onLa = false
@@ -444,10 +444,10 @@ export default {
       this.$refs.supermap.clearG();
     },
     // 云广播
-    getDlblistBydeptId() {
+    getDlblistBydeptId(deptId) {
       let that = this;
       let markersList = [];
-      getDlblistBydeptId(that.deptId).then(function (res) {
+      getDlblistBydeptId(deptId).then(function (res) {
         that.loudspeakerNum = res.data.length
         that.visuForestCloudCameraBOListSearch = []
         if (res.data != null && res.data.length > 0) {
@@ -533,7 +533,7 @@ export default {
     getDlblistBydeptIds() {
       let that = this;
 
-      getDlblistBydeptId(that.deptId).then(function (res) {
+      getDlblistBydeptId(null).then(function (res) {
         that.loudspeakerNum = res.data.length
       })
         .catch(function (error) {