Browse Source

【ID1005684】掉线日志窗口显示优化

chenrui 4 năm trước cách đây
mục cha
commit
59983d1dfd
1 tập tin đã thay đổi với 12 bổ sung10 xóa
  1. 12 10
      src/views/equipmentManage/equipment/logModal.vue

+ 12 - 10
src/views/equipmentManage/equipment/logModal.vue

@@ -141,16 +141,18 @@ export default {
       }
     },
     srcDeviceCode (newValue, oldValue) {
-      this.queryParam.beginDate = getDate.getRecentday().starttime
-      this.queryParam.endDate = getDate.getRecentday().endtime
-      this.time = [
-        moment(getDate.getRecentday().starttime, this.dateFormat),
-        moment(getDate.getRecentday().endtime, this.dateFormat)
-      ]
-      const _this = this
-      setTimeout(() => {
-        _this.$refs.table.refresh(true)
-      }, 100)
+      if (this.isShow && newValue) {
+        this.queryParam.beginDate = getDate.getRecentday().starttime
+        this.queryParam.endDate = getDate.getRecentday().endtime
+        this.time = [
+          moment(getDate.getRecentday().starttime, this.dateFormat),
+          moment(getDate.getRecentday().endtime, this.dateFormat)
+        ]
+        const _this = this
+        setTimeout(() => {
+          _this.$refs.table.refresh(true)
+        }, 100)
+      }
     }
   }
 }