加入了在线离线的判断
parent
522f6573d8
commit
d49eb6836a
|
@ -32,9 +32,9 @@
|
||||||
<li class="table-li" @click="toRouter1(item1)"
|
<li class="table-li" @click="toRouter1(item1)"
|
||||||
:class="item.routerList.indexOf(routerNow) != -1 && routerIndex == item1.index ? 'active' : ''"
|
:class="item.routerList.indexOf(routerNow) != -1 && routerIndex == item1.index ? 'active' : ''"
|
||||||
v-for="item1, index1 in item.list" :key="index1">{{ item1.deviceTypeName }} <div
|
v-for="item1, index1 in item.list" :key="index1">{{ item1.deviceTypeName }} <div
|
||||||
class="status" :class="item1.status == 0 ? 'outline' : 'online'"
|
class="status" :class="item1.deviceState == 0 ? 'outline' : 'online'"
|
||||||
v-if="item1.status >= 0">{{
|
v-if="item1.deviceState >= 0">{{
|
||||||
item1.status == 0 ? '离线' : '在线' }}</div>
|
item1.deviceState == 0 ? '离线' : '在线' }}</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
|
@ -79,6 +79,7 @@ export default {
|
||||||
equipmentList: [],
|
equipmentList: [],
|
||||||
userInfo: null,
|
userInfo: null,
|
||||||
loading: true,//页面加载
|
loading: true,//页面加载
|
||||||
|
IDTimer:null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -87,6 +88,7 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
const that = this
|
||||||
this.getTime()
|
this.getTime()
|
||||||
var router = this.$route.query
|
var router = this.$route.query
|
||||||
if (router.token && router.userid) {
|
if (router.token && router.userid) {
|
||||||
|
@ -108,8 +110,14 @@ export default {
|
||||||
this.gerRouter();
|
this.gerRouter();
|
||||||
this.getEqbyid()
|
this.getEqbyid()
|
||||||
}
|
}
|
||||||
|
// this.IDTimer&&clearInterval( this.IDTimer)
|
||||||
|
// this.IDTimer= setInterval(() => {
|
||||||
|
// that.getEqbyid()
|
||||||
|
// }, 3000);
|
||||||
|
|
||||||
|
},
|
||||||
|
beforeDestroy(){
|
||||||
|
this.IDTimer&&clearInterval( this.IDTimer)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//获取设备名称/配方名称
|
//获取设备名称/配方名称
|
||||||
|
|
Loading…
Reference in New Issue