diff --git a/src/views/realTimeMonitor/components/setschedule.vue b/src/views/realTimeMonitor/components/setschedule.vue index 0d8d905..d56b8d3 100644 --- a/src/views/realTimeMonitor/components/setschedule.vue +++ b/src/views/realTimeMonitor/components/setschedule.vue @@ -21,9 +21,19 @@ + > + {{ + item.alias !== null && item.alias !== "" + ? item.alias + : item.channelname + }} + @@ -305,10 +299,9 @@ export default { this.getLineTreeList(); this.getDateTime(); console.log(this.dateValue); - // this.treetimer = window.setInterval(() => { - // setTimeout(this.getLineTreeStatus(), 0); - // }, 3000); - //this.getLineTreeStatus(); + this.treetimer = window.setInterval(() => { + setTimeout(this.getLineTreeStatus(), 0); + }, 300000); }, methods: { //获取当前时间 @@ -326,20 +319,19 @@ export default { ); }, //获取状态 - // getLineTreeStatus() { - // this.statusTimer = window.setInterval(() => { - // getdyTreeListJoggle() - // .then((res) => { - // console.log(res); - // this.treeStatus = res.data.list; - // this.lineTreeData = this.treeStatus; - // // console.log(this.treeStatus); - // }) - // .catch((err) => { - // console.log(err); //代码错误、请求失败捕获 - // }); - // }, 10000); - // }, + getLineTreeStatus() { + getdyTreeListJoggle() + .then((res) => { + console.log(res); + this.lineTreeData = res.data.list; + this.$nextTick(() => { + this.$refs.tree.setCurrentKey(this.newTermId); //一定要加这个选中了否则样式没有出来 + }); + }) + .catch((err) => { + console.log(err); //代码错误、请求失败捕获 + }); + }, //获取左侧树结构 getLineTreeList() { this.loadingBg = true;