Prechádzať zdrojové kódy

传感器默认不传部门ID

彭宇 1 rok pred
rodič
commit
5f92874cf7
1 zmenil súbory, kde vykonal 5 pridanie a 5 odobranie
  1. 5 5
      src/views/monitor.vue

+ 5 - 5
src/views/monitor.vue

@@ -271,8 +271,8 @@ export default {
       this.bottomMenuList(); //获取底部公共组件消息和任务
       this.getTreeselect();
       this.deptId = Cookies.get("deptId");
-      this.getMonitorDeviceAndDataLists();
-      // this.getDlblistBydeptIds();
+      this.getMonitorDeviceAndDataLists(null);
+      // this.getDlblistBydeptIds(null);
       this.selectDeviceType(-1);
     }, 2000)
   },
@@ -529,16 +529,16 @@ export default {
       this.localMark = "chuan";
       this.placeholderMsg = "请输入传感器名称";
       this.deptId = null;
-      this.getMonitorDeviceAndDataList();
+      this.getMonitorDeviceAndDataList(null);
       clearInterval(this.cgqTimer);
       this.cgqTimer = setInterval(() => {
         this.getMonitorDeviceAndDataList();
       }, 20000);
     },
     //传感器2
-    getMonitorDeviceAndDataLists() {
+    getMonitorDeviceAndDataLists(deptId) {
       let that = this;
-      getMonitorDeviceAndDataList().then((res) => {
+      getMonitorDeviceAndDataList(deptId).then((res) => {
         that.sensorNum = res.data.length;
       });
     },