全部修改架构
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
<div class="absolute elec-qty-border"></div>
|
||||
<div class="elec-txt"></div>
|
||||
</div>
|
||||
<i class="el-icon-user-solid icon-user" :style="{'color': $store.getters.userInfo === 'true' ? '#00ff29' : '#737f92'}" @click="loginModalHandle"></i>
|
||||
<i class="el-icon-user-solid icon-user" :style="{'color': $store.getters.userInfo === 'true' ? '#00d0fc' : '#737f92'}" @click="loginModalHandle"></i>
|
||||
<i class="el-icon-s-tools icon-tools" @click="configModalHandle"></i>
|
||||
</el-row>
|
||||
</el-col>
|
||||
@@ -47,6 +47,7 @@ import LoginModal from './login-modal.vue'
|
||||
import ConfigModal from './config-modal.vue'
|
||||
import { sendWebsocket, closeWebsocket } from '@/config/websocket.js'
|
||||
export default {
|
||||
name: 'ShellIndex',
|
||||
components: {
|
||||
LoginModal,
|
||||
ConfigModal
|
||||
@@ -92,6 +93,7 @@ export default {
|
||||
mounted () {
|
||||
this.checkTextOverflow()
|
||||
window.addEventListener('resize', this.checkTextOverflow)
|
||||
// this.$store.dispatch('setAgvObj', this.topInfo)
|
||||
},
|
||||
beforeDestroy () {
|
||||
window.removeEventListener('resize', this.checkTextOverflow)
|
||||
@@ -133,15 +135,14 @@ export default {
|
||||
})
|
||||
},
|
||||
_queryHead () {
|
||||
let url = this.$store.getters.baseUrl
|
||||
url = url.substring(7)
|
||||
let sid = this.$store.getters.userInfo === 'true' ? 1 : 2
|
||||
sendWebsocket(`ws://${url}/webSocket/VehicleInfo/${sid}`, {}, this.wsMessage, this.wsErr)
|
||||
const wsHost = process.env.VUE_APP_API_BASE_URL.replace(/^https?:\/\//, '')
|
||||
const sid = this.$store.getters.userInfo === 'true' ? 1 : 2
|
||||
sendWebsocket(`ws://${wsHost}/webSocket/VehicleInfo/${sid}`, {}, this.wsMessage, this.wsErr)
|
||||
},
|
||||
wsMessage (res) {
|
||||
clearTimeout(this.timer)
|
||||
this.topInfo = res.data
|
||||
this.$store.dispatch('setAgvObj', JSON.stringify(this.topInfo))
|
||||
this.$store.dispatch('setAgvObj', this.topInfo)
|
||||
},
|
||||
wsErr () {
|
||||
this.timer = setTimeout(() => {
|
||||
@@ -153,7 +154,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '~@style/mixin'
|
||||
@import '../../style/mixin'
|
||||
.header-container
|
||||
_wh(100%, .48rem)
|
||||
padding 0 2%
|
||||
|
||||
Reference in New Issue
Block a user