From d49eb6836a4b6a9f6dfa2c8687317cb224a02bfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E8=90=8C?= <525441437@qq.com> Date: Sun, 8 Oct 2023 18:25:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E4=BA=86=E5=9C=A8=E7=BA=BF?= =?UTF-8?q?=E7=A6=BB=E7=BA=BF=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/index.vue | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/views/index.vue b/src/views/index.vue index 17259a4..4f07be9 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -32,9 +32,9 @@
  • {{ item1.deviceTypeName }}
    {{ - item1.status == 0 ? '离线' : '在线' }}
    + class="status" :class="item1.deviceState == 0 ? 'outline' : 'online'" + v-if="item1.deviceState >= 0">{{ + item1.deviceState == 0 ? '离线' : '在线' }}
  • @@ -79,6 +79,7 @@ export default { equipmentList: [], userInfo: null, loading: true,//页面加载 + IDTimer:null, } }, watch: { @@ -87,6 +88,7 @@ export default { }, }, mounted() { + const that = this this.getTime() var router = this.$route.query if (router.token && router.userid) { @@ -108,8 +110,14 @@ export default { this.gerRouter(); this.getEqbyid() } + // this.IDTimer&&clearInterval( this.IDTimer) + // this.IDTimer= setInterval(() => { + // that.getEqbyid() + // }, 3000); - + }, + beforeDestroy(){ + this.IDTimer&&clearInterval( this.IDTimer) }, methods: { //获取设备名称/配方名称