顶部导航信息,车辆信息
This commit is contained in:
@@ -12,9 +12,9 @@
|
||||
<div class="header-wraper__right">
|
||||
<div class="header_user_wraper">
|
||||
<div class="header_user_wraper_inn">
|
||||
<div class="state-item">{{ agvInfo.agvrun_status_name }}</div>
|
||||
<div class="state-item">{{ topInfo.agvrun_status_name }}</div>
|
||||
<div class="state-line"></div>
|
||||
<div class="state-item">{{ agvInfo.automatic_status_name }}</div>
|
||||
<div class="state-item">{{ topInfo.automatic_status_name }}</div>
|
||||
<!-- <div class="state-line"></div> -->
|
||||
<!-- <div class="state-item">中文 <i class="icon_dropdown"></i></div> -->
|
||||
</div>
|
||||
@@ -22,10 +22,10 @@
|
||||
<div class="header_user_wraper">
|
||||
<div class="header_user_wraper_inn">
|
||||
<div class="elec-qty-wrap">
|
||||
<div class="elec-qty" :style="{height: Number(dataInfo.electric) + '%', backgroundColor: Number(dataInfo.electric) <= 40 ? 'fa6400' : '#54c0b3'}"></div>
|
||||
<div class="elec-qty" :style="{height: Number(topInfo.electric) + '%', backgroundColor: Number(topInfo.electric) <= 40 ? 'fa6400' : '#54c0b3'}"></div>
|
||||
<div class="elec-qty-top"></div>
|
||||
</div>
|
||||
<div class="elec-txt">{{ dataInfo.electric }}%</div>
|
||||
<div class="elec-txt">{{ topInfo.electric }}%</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header_user_wraper">
|
||||
@@ -96,7 +96,7 @@
|
||||
import jxTime from '@components/time.vue'
|
||||
import jxDialog from '@components/dialog.vue'
|
||||
import { queryHomePage } from '@/config/getData.js'
|
||||
import { updatePass, sysMenuBuild, authLogout, homeQueryHead } from '@config/getData2.js'
|
||||
import { updatePass, sysMenuBuild, authLogout } from '@config/getData2.js'
|
||||
import {encrypt} from '../../../main.js'
|
||||
export default {
|
||||
components: {
|
||||
@@ -105,6 +105,8 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
itime: this.$store.getters.setTime,
|
||||
timer: null,
|
||||
username: this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).user.username : '',
|
||||
menus: [] || JSON.parse(this.$store.getters.menus),
|
||||
// menus: [{
|
||||
@@ -197,8 +199,7 @@ export default {
|
||||
useKbEvents: false,
|
||||
preventClickEvent: false
|
||||
},
|
||||
dataInfo: {},
|
||||
agvInfo: {}
|
||||
topInfo: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -240,6 +241,10 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this._sysMenuBuild()
|
||||
this._queryHomePage()
|
||||
this.timer = setInterval(() => {
|
||||
this._queryHomePage()
|
||||
}, this.itime)
|
||||
if (this.menus.length) {
|
||||
this.menus.map(el => {
|
||||
if (el.router === this.$route.path) {
|
||||
@@ -248,6 +253,12 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
clearInterval(this.timer)
|
||||
},
|
||||
destroyed () {
|
||||
clearInterval(this.timer)
|
||||
},
|
||||
methods: {
|
||||
handleSelect (key) {
|
||||
this.dropdown = false
|
||||
@@ -334,15 +345,7 @@ export default {
|
||||
async _queryHomePage () {
|
||||
let res = await queryHomePage()
|
||||
if (res.code === '1') {
|
||||
this.dataInfo = res.result
|
||||
} else {
|
||||
this.toast(res.desc)
|
||||
}
|
||||
},
|
||||
async _homeQueryHead () {
|
||||
let res = await homeQueryHead()
|
||||
if (res.code === '1') {
|
||||
this.agvInfo = res.result
|
||||
this.topInfo = res.result
|
||||
} else {
|
||||
this.toast(res.desc)
|
||||
}
|
||||
@@ -388,9 +391,10 @@ export default {
|
||||
<style lang="stylus" scoped>
|
||||
@import '~@style/mixin'
|
||||
.index-container
|
||||
position relative
|
||||
_wh(100%, 100%)
|
||||
.header-container
|
||||
position fixed
|
||||
position absolute
|
||||
left 0
|
||||
top 0
|
||||
z-index 150
|
||||
|
||||
Reference in New Issue
Block a user