瀏覽代碼

传感器默认不传部门ID

彭宇 2 年之前
父節點
當前提交
e5798eecaf
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      src/views/monitor.vue

+ 5 - 5
src/views/monitor.vue

@@ -406,7 +406,7 @@ export default {
         })
       } else if (that.localMark == 'chuan') {
         //that.getSensorListByDeptId()
-        that.getMonitorDeviceAndDataList()
+        that.getMonitorDeviceAndDataList(that.deptId)
       } else if (that.localMark == 'la') {
         that.getDlblistBydeptId(that.deptId)
       }
@@ -440,7 +440,7 @@ export default {
       this.localMark = 'chuan'
       this.placeholderMsg = "请输入传感器名称"
       this.deptId = Cookies.get("deptId")
-      this.getMonitorDeviceAndDataList()
+      this.getMonitorDeviceAndDataList(null)
       this.$refs.supermap.clearG();
     },
     // 云广播
@@ -544,15 +544,15 @@ export default {
       let that = this
       setInterval(function () {
 
-        that.getMonitorDeviceAndDataList()
+        that.getMonitorDeviceAndDataList(null)
 
       }, 20 * 1000)
     },
     //传感器2
-    getMonitorDeviceAndDataList() {
+    getMonitorDeviceAndDataList(deptId) {
       let list = []
       let markersList = [];
-      getMonitorDeviceAndDataList(this.deptId).then((res) => {
+      getMonitorDeviceAndDataList(deptId).then((res) => {
         this.visuForestCloudCameraBOListSearch = []
         list = res.data
         //this.sensorNum = list.length