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({ new Vue({
router, router,
store, store,
render: h => h(App), render: h => h(App)
beforeCreate(){
Vue.prototype.$bus=this
},
}).$mount('#app') }).$mount('#app')

View File

View File

@ -5,7 +5,6 @@
<div> <div>
<div class="return-btn" @click="returnRouter()"></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' : ''" <!-- <div class="router-list" @click="toRouter(item)" :class="routerAct == item.router ? 'active' : ''"
v-for="item, index in routerList" :key="index"> v-for="item, index in routerList" :key="index">
{{ item.name }} {{ item.name }}
@ -15,7 +14,6 @@
</div> </div>
<div class="header-center" v-if="deviceDetail">{{ deviceDetail.deviceTypeName }}</div> <div class="header-center" v-if="deviceDetail">{{ deviceDetail.deviceTypeName }}</div>
<div class="header-right"> <div class="header-right">
<div class="time" v-if="time"> <div class="time" v-if="time">
{{ time.year.year }}-{{ time.year.month }}-{{ time.year.date }}<span>{{ time.time }}</span> {{ time.year.year }}-{{ time.year.month }}-{{ time.year.date }}<span>{{ time.time }}</span>
<div>{{ time.week }}</div> <div>{{ time.week }}</div>
@ -55,10 +53,6 @@ export default {
} }
}, },
methods: { methods: {
refreshData(){
this.getEqbyid()
this.$bus.$emit('refreshData')
},
getEqbyid() { getEqbyid() {
var store=this.$store.state var store=this.$store.state
var userInfo = JSON.parse(localStorage.getItem('userInfo')) var userInfo = JSON.parse(localStorage.getItem('userInfo'))
@ -111,22 +105,7 @@ export default {
background: url(../assets/image/background.jpg) no-repeat; background: url(../assets/image/background.jpg) no-repeat;
background-size: 1920px 1080px; background-size: 1920px 1080px;
background-position: center top; 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 { .header {
display: flex; display: flex;
align-items: center; align-items: center;
@ -145,10 +124,25 @@ export default {
flex-shrink: 0; flex-shrink: 0;
display: flex; display: flex;
align-items: center; align-items: center;
// justify-content: space-between; justify-content: space-between;
width: 500px; 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 { .router-list {

View File

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