Compare commits

..

No commits in common. "d9d8544aa0014b418550e2e718d7cde9dd3f086f" and "d1301435151080aa563a95557d7ba3ebe9d6cc6f" have entirely different histories.

4 changed files with 28 additions and 39 deletions

View File

@ -19,8 +19,5 @@ import 'videojs-contrib-hls'; // 引入支持HLS的插件
new Vue({
router,
store,
render: h => h(App),
beforeCreate(){
Vue.prototype.$bus=this
},
render: h => h(App)
}).$mount('#app')

View File

View File

@ -5,7 +5,6 @@
<div>
<div class="return-btn" @click="returnRouter()"></div>
<div class="return-btn" @click="refreshData()"></div>
<!-- <div class="router-list" @click="toRouter(item)" :class="routerAct == item.router ? 'active' : ''"
v-for="item, index in routerList" :key="index">
{{ item.name }}
@ -15,7 +14,6 @@
</div>
<div class="header-center" v-if="deviceDetail">{{ deviceDetail.deviceTypeName }}</div>
<div class="header-right">
<div class="time" v-if="time">
{{ time.year.year }}-{{ time.year.month }}-{{ time.year.date }}<span>{{ time.time }}</span>
<div>{{ time.week }}</div>
@ -55,10 +53,6 @@ export default {
}
},
methods: {
refreshData(){
this.getEqbyid()
this.$bus.$emit('refreshData')
},
getEqbyid() {
var store=this.$store.state
var userInfo = JSON.parse(localStorage.getItem('userInfo'))
@ -111,22 +105,7 @@ export default {
background: url(../assets/image/background.jpg) no-repeat;
background-size: 1920px 1080px;
background-position: center top;
.return-btn {
width: 120px;
margin: 0 8px;
padding: 0 20px;
border-radius: 3px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: bold;
color: #FFFFFF;
cursor: pointer;
background: #00BB88;
}
.header {
display: flex;
align-items: center;
@ -145,10 +124,25 @@ export default {
flex-shrink: 0;
display: flex;
align-items: center;
// justify-content: space-between;
justify-content: space-between;
width: 500px;
.return-btn {
width: 120px;
margin: 0 8px;
padding: 0 20px;
border-radius: 3px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: bold;
color: #FFFFFF;
cursor: pointer;
background: #00BB88;
}
}
.router-list {

View File

@ -281,25 +281,23 @@ export default {
//
beforeDestroy(){
const that = this;
this.$bus.$off('refreshData')
// that.pageTimer&&clearInterval(that.pageTimer)
that.pageTimer&&clearInterval(that.pageTimer)
},
mounted() {
const that = this;
if (localStorage.getItem('token')) {
setTimeout(() => {
that.getEqbyid();
// setTimeout(() => {
// that.pageTimer&&clearInterval(that.pageTimer)
// that.pageTimer= setInterval(() => {
// that.getEqbyid();
// }, 5000);
// }, 0);
that.pageTimer&&clearInterval(that.pageTimer)
that.pageTimer= setInterval(() => {
that.getEqbyid();
}, 5000);
}, 0);
} else {
// this.$router.push({ name: 'login' })
}
this.$bus.$on('refreshData',(res)=>{
that.getEqbyid();
})
},
methods: {
//countType