设备监控页面添加定时器请求接口

This commit is contained in:
wu
2022-08-22 15:37:49 +08:00
parent 64388ae7b5
commit 20cd6e0f3a

View File

@@ -11,10 +11,7 @@
>前置服务 {{ item.server_name }} ({{ item.url }}:{{ item.port }} ) >前置服务 {{ item.server_name }} ({{ item.url }}:{{ item.port }} )
<el-tag <el-tag
:color="serveStatus[item.status].backgroundColor" :color="serveStatus[item.status].backgroundColor"
:style="{ :style="{color:serveStatus[item.status].textColor,borderColor:serveStatus[item.status].borderColor}"
color: serveStatus[item.status].textColor,
borderColor: serveStatus[item.status].borderColor,
}"
> >
{{ serveStatus[item.status].name }} {{ serveStatus[item.status].name }}
</el-tag> </el-tag>
@@ -211,14 +208,15 @@ export default {
type: 'error' type: 'error'
}) })
this.$set(this.serverData[index], 'status', 'offline') this.$set(this.serverData[index], 'status', 'offline')
// this.$delete(this.serverData, index);
}) })
}) })
} }
}, },
mounted () { mounted () {
this.getServe() this.getServe()
setInterval(()=>{
this.getServe()
}, 30000)
} }
} }
</script> </script>