Commit f5877023 authored by wxk's avatar wxk

bugfix-点击机器人监控数据不刷新的问题

parent d9bd911f
...@@ -47,6 +47,11 @@ ...@@ -47,6 +47,11 @@
} }
} }
}, },
watch: {
$route() {
this.active = this.$route.params.name || 'account';
},
},
} }
</script> </script>
......
<template> <template>
<div class="header"> <div class="header">
<router-link :to="{path: '/monitor/home'}"> <span class="title" @click="refresh">机器人监控</span>
<span class="title">机器人监控</span>
</router-link>
<div class="contain"> <div class="contain">
<span class="username">{{username}}</span> <span class="username">{{username}}</span>
<span class="loginout" @click="exitLogin">退出</span> <span class="loginout" @click="exitLogin">退出</span>
...@@ -19,6 +17,12 @@ ...@@ -19,6 +17,12 @@
} }
}, },
methods: { methods: {
refresh() {
this.$router.push({
path: '/monitor/home'
});
Bus.$emit('refresh');
},
//退出登录 //退出登录
exitLogin(){ exitLogin(){
this.$router.push({ this.$router.push({
...@@ -49,6 +53,7 @@ ...@@ -49,6 +53,7 @@
box-shadow:0px 2px 10px 6px rgba(237,237,237,0.5); box-shadow:0px 2px 10px 6px rgba(237,237,237,0.5);
color:rgba(255,255,255,1); color:rgba(255,255,255,1);
.title{ .title{
cursor: pointer;
color: #fff; color: #fff;
font-size:24px; font-size:24px;
} }
......
...@@ -735,7 +735,7 @@ ...@@ -735,7 +735,7 @@
} }
.search-box { .search-box {
width: 600px; width: 600px;
margin: -20px 0 20px 0; margin: -10px 0 20px 0;
} }
</style> </style>
<style> <style>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment