顶部导航信息,车辆信息

This commit is contained in:
2023-09-27 09:51:15 +08:00
parent 437dd0ff98
commit 6f803e2dd6
10 changed files with 114 additions and 165 deletions

View File

@@ -86,7 +86,7 @@ export default {
z-index 2018
.text
padding 14px 73px
max-height 60vh
max-height 60%
min-height 44px
overflow-y auto
text-align center

View File

@@ -13,9 +13,6 @@ export const parameterSetting = (num, word) => post('api/developer/parameterSett
password: word
})
export const homeQueryHead = () => post('api/home/queryHead', {
})
// new
// 登录
export const authlogin = (username, password) => post('auth/login', {

BIN
src/images/aio/agv_7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
src/images/aio/agv_8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -37,7 +37,7 @@
<div class="login-items-wraper">
<div class="login-item">
<div class="login-label" @click="toFocus(3)">域名地址</div>
<input type="text" class="login-input" ref="input3" v-model="baseUrl" @focus="show" data-layout="normal">
<input type="text" class="login-input" ref="input3" v-model.trim="baseUrl" @focus="show" data-layout="normal">
</div>
<div class="login-item">
<div class="login-label" @click="toFocus(4)">刷新时间</div>
@@ -191,7 +191,7 @@ export default {
_fj(center)
.login-wraper
_fj()
_wh(70vw, 65vh)
_wh(70%, 65%)
padding 20px
background-color #fff
border-radius 20px
@@ -260,7 +260,7 @@ export default {
letter-spacing 5px
.footer_wraper
position absolute
width 70vw
width 70%
bottom 20px
left 50%
transform translateX(-50%)

View File

@@ -19,7 +19,7 @@
<div class="state_wrap">
<div class="state_tip">显示屏控制</div>
<div class="state_content">
<button class="state_item_switch" :class="{'is-checked': switch1 === '1'}" :disabled="sdisabled1" @click="switchDown1('2', switch1)">
<button class="state_item_switch" :class="{'is-checked': switch1 === '1'}" :disabled="disabled" @click="switchDown('2', switch1)">
<input type="checkbox" class="switch__input">
<span class="switch_core"></span>
</button>
@@ -28,7 +28,16 @@
<div class="state_wrap">
<div class="state_tip">TCS控制</div>
<div class="state_content">
<div class="state_item_switch" :class="{'is-checked': switch2 === '1'}" :disabled="sdisabled2" @click="switchDown2('3', switch1)">
<div class="state_item_switch" :class="{'is-checked': switch2 === '1'}" :disabled="disabled" @click="switchDown('3', switch2)">
<input type="checkbox" class="switch__input">
<span class="switch_core"></span>
</div>
</div>
</div>
<div class="state_wrap">
<div class="state_tip">SCHE控制</div>
<div class="state_content">
<div class="state_item_switch" :class="{'is-checked': switch3 === '1'}" :disabled="disabled" @click="switchDown('4', switch3)">
<input type="checkbox" class="switch__input">
<span class="switch_core"></span>
</div>
@@ -37,7 +46,7 @@
<div class="state_wrap">
<div class="state_tip">RC控制</div>
<div class="state_content">
<div class="state_item_switch" :class="{'is-checked': switch3 === '1'}" :disabled="sdisabled3" @click="switchDown3('4', switch1)">
<div class="state_item_switch" :class="{'is-checked': switch4 === '1'}" :disabled="disabled" @click="switchDown('5', switch4)">
<input type="checkbox" class="switch__input">
<span class="switch_core"></span>
</div>
@@ -46,7 +55,7 @@
<div class="state_wrap">
<div class="state_tip">Joy控制</div>
<div class="state_content">
<div class="state_item_switch" :class="{'is-checked': switch4 === '1'}" :disabled="sdisabled4" @click="switchDown4('5', switch1)">
<div class="state_item_switch" :class="{'is-checked': switch5 === '1'}" :disabled="disabled" @click="switchDown('6', switch5)">
<input type="checkbox" class="switch__input">
<span class="switch_core"></span>
</div>
@@ -55,42 +64,54 @@
<div class="state_wrap">
<div class="state_tip">AGV</div>
<div class="state_content">
<button class="state_item_4 pointer" @click="_skipStartPoint" :disabled="disabled2">
<button class="state_item_4 pointer" @click="switchDown('9', '0')" :disabled="disabled">
<div class="state_item_4_wrap">
<span class="state_item_4_btn state_icon_2"></span>
<span class="state_item_4_txt">跳过起点</span>
</div>
</button>
<button class="state_item_4 pointer" @click="_queryRestPoint" :disabled="disabled6">
<button class="state_item_4 pointer" @click="_queryRestPoint" :disabled="disabled">
<div class="state_item_4_wrap">
<span class="state_item_4_btn state_icon_6"></span>
<span class="state_item_4_txt">初始化坐标</span>
</div>
</button>
<button class="state_item_4 pointer" @click="_fullscreen">
<button class="state_item_4 pointer" @click="switchDown('11', '0')" :disabled="disabled">
<div class="state_item_4_wrap">
<span class="state_item_4_btn state_icon_4"></span>
<span class="state_item_4_txt">全屏</span>
</div>
</button>
<button class="state_item_4 pointer" @click="_exit" :disabled="disabled5">
<button class="state_item_4 pointer" @click="switchDown('7', '0')" :disabled="disabled">
<div class="state_item_4_wrap">
<span class="state_item_4_btn state_icon_3"></span>
<span class="state_item_4_txt">退出</span>
</div>
</button>
<button class="state_item_4 pointer" @click="switchDown('1', '0')" :disabled="disabled3">
<button class="state_item_4 pointer" @click="switchDown('1', '0')" :disabled="disabled">
<div class="state_item_4_wrap">
<span class="state_item_4_btn state_icon_5"></span>
<span class="state_item_4_txt">关机</span>
</div>
</button>
<button class="state_item_4 pointer" @click="_softStart" :disabled="disabled1">
<button class="state_item_4 pointer" @click="switchDown('8', '0')" :disabled="disabled">
<div class="state_item_4_wrap">
<span class="state_item_4_btn state_icon_1"></span>
<span class="state_item_4_txt">软启动</span>
</div>
</button>
<button class="state_item_4 pointer" @click="switchDown('10', '0')" :disabled="disabled">
<div class="state_item_4_wrap">
<span class="state_item_4_btn state_icon_7"></span>
<span class="state_item_4_txt">重启</span>
</div>
</button>
<button class="state_item_4 pointer" @click="switchDown('12', '0')" :disabled="disabled">
<div class="state_item_4_wrap">
<span class="state_item_4_btn state_icon_8"></span>
<span class="state_item_4_txt">跳过检测</span>
</div>
</button>
</div>
</div>
</div>
@@ -104,7 +125,7 @@
</ul>
</div>
<div class="pop_btns_box">
<button class="button button--primary" :class="{'button--info': JSON.stringify(obj) ==='{}'}" :disabled="disabled4" @click="_restCoordinate">确定</button>
<button class="button button--primary" :class="{'button--info': JSON.stringify(obj) ==='{}'}" :disabled="disabled" @click="_restCoordinate">确定</button>
<button class="button button--primary" @click="show=false">退出</button>
</div>
</div>
@@ -115,157 +136,73 @@
</template>
<script>
import {softStart, skipStartPoint, ShutDown, queryRestPoint, restCoordinate, queryAgvStatus, quitNow} from '@config/getData2.js'
import {ShutDown, queryRestPoint, restCoordinate, queryAgvStatus} from '@config/getData2.js'
export default {
data () {
return {
interTime: this.$store.getters.setTime,
timer: null,
disabled1: false,
disabled2: false,
disabled3: false,
disabled4: false,
disabled5: false,
disabled6: false,
show: false,
fullscreen: false,
result: [],
obj: {},
status: {},
switch1: '0',
switch2: '0',
switch3: '0',
switch4: '0',
sdisabled1: false,
sdisabled2: false,
sdisabled3: false,
sdisabled4: false
switch1: '',
switch2: '',
switch3: '',
switch4: '',
switch5: '',
disabled: false
}
},
created () {
this._queryAgvStatus()
this.refresh()
},
beforeDestroy () {
clearInterval(this.timer)
},
destroyed () {
clearInterval(this.timer)
},
methods: {
refresh () {
this._queryAgvStatus()
this.timer = setInterval(() => {
this._queryAgvStatus()
}, this.interTime)
},
async _softStart () {
this.disabled1 = true
try {
let res = await softStart()
if (res.code === '1') {
this.toast(res.desc)
} else {
this.toast(res.desc)
}
this.disabled1 = false
} catch (e) {
this.disabled1 = false
}
},
async _skipStartPoint () {
this.disabled2 = true
try {
let res = await skipStartPoint()
if (res.code === '1') {
this.toast(res.desc)
} else {
this.toast(res.desc)
}
this.disabled2 = false
} catch (e) {
this.disabled2 = false
}
},
switchDown1 (type, bool) {
this.sdisabled1 = false
this._ShutDown(type, bool)
},
switchDown2 (type, bool) {
this.sdisabled2 = false
this._ShutDown(type, bool)
},
switchDown3 (type, bool) {
this.sdisabled3 = false
this._ShutDown(type, bool)
},
switchDown4 (type, bool) {
this.sdisabled4 = false
this._ShutDown(type, bool)
},
switchDown (type, bool) {
this.disabled3 = false
this.disabled = true
if (type === '5' && this.switch4 === '0' && this.switch5 === '1') {
this.toast('RC控制与Joy控制不能同时开启')
this.disabled = false
return
}
if (type === '6' && this.switch4 === '1' && this.switch5 === '0') {
this.toast('RC控制与Joy控制不能同时开启')
this.disabled = false
return
}
clearInterval(this.timer)
bool = bool === '0' ? '1' : '0'
this._ShutDown(type, bool)
},
async _ShutDown (type, bool) {
try {
let res = await ShutDown(type, bool) // type : 1-关机、2-显示屏控制、3-TCS控制、4-RC控制、5-Joy控制 bool : 开关的值开启传1关闭传0
if (res.code === '1') {
this.toast(res.desc)
switch (type) {
case 2:
this.switch1 = this.switch1 === '0' ? '1' : '0'
break
case 3:
this.switch2 = this.switch2 === '0' ? '1' : '0'
break
case 4:
this.switch3 = this.switch3 === '0' ? '1' : '0'
break
case 5:
this.switch4 = this.switch4 === '0' ? '1' : '0'
break
}
} else {
this.toast(res.desc)
}
this.disabled3 = false
this.sdisabled1 = false
this.sdisabled2 = false
this.sdisabled3 = false
this.sdisabled4 = false
} catch (e) {
this.disabled3 = false
this.disabled3 = false
this.sdisabled1 = false
this.sdisabled2 = false
this.sdisabled3 = false
this.sdisabled4 = false
}
},
async _exit () {
this.disabled5 = true
try {
let res = await quitNow()
let res = await ShutDown(type, bool) // type:1-关机、2-显示屏控制、3-TCS控制、4-SCHE控制、5-RC控制、6-Joy控制7-退出8-软启动9-跳过起点10-重启11-全屏12-跳过检测 ; bool:开关或按钮的值,开关开启传1关闭传0按钮点击直接传1
if (res.code === '1') {
this.toast(res.desc)
} else {
this.toast(res.desc)
}
this.disabled5 = false
this.disabled = false
this.refresh()
} catch (e) {
this.disabled5 = false
}
},
_fullscreen () {
if (document.exitFullscreen) {
document.exitFullscreen()
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen()
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen()
} else if (document.msExitFullscreen) {
document.msExitFullscreen()
this.disabled = false
this.refresh()
}
},
async _queryRestPoint () {
this.disabled6 = true
this.disabled = true
try {
let res = await queryRestPoint()
if (res.code === '1') {
@@ -274,19 +211,19 @@ export default {
} else {
this.toast(res.desc)
}
this.disabled6 = false
this.disabled = false
} catch (e) {
this.disabled6 = false
this.disabled = false
}
},
tocheck (e) {
this.obj = e
},
async _restCoordinate () {
this.disabled4 = true
this.disabled = true
if (JSON.stringify(this.obj) === '{}') {
this.toast('请选择坐标')
this.disabled4 = false
this.disabled = false
return
}
try {
@@ -297,15 +234,20 @@ export default {
} else {
this.toast(res.desc)
}
this.disabled4 = false
this.disabled = false
} catch (e) {
this.disabled4 = false
this.disabled = false
}
},
async _queryAgvStatus () {
let res = await queryAgvStatus()
if (res.code === '1') {
this.status = res.result
this.switch1 = res.result.screenStatus
this.switch2 = res.result.tcsStatus
this.switch3 = res.result.scheStatus
this.switch4 = res.result.rcStatus
this.switch5 = res.result.joyStatus
} else {
this.toast(res.desc)
}
@@ -365,6 +307,10 @@ export default {
_bis('../../../images/aio/agv_5.png', 100%)
.state_icon_6
_bis('../../../images/aio/agv_6.png', 100%)
.state_icon_7
_bis('../../../images/aio/agv_7.png', 100%)
.state_icon_8
_bis('../../../images/aio/agv_8.png', 100%)
.pop_wrapper
position fixed
top 0
@@ -392,8 +338,8 @@ export default {
position relative
margin 0 auto 50px
width 65%
height 70vh
margin-top 15vh
height 70%
margin-top 15%
padding 20px
background-color #fff
border-radius 16px

View File

@@ -5,13 +5,13 @@
<div class="state_wrap">
<div class="state_tip">车辆状态</div>
<div class="state_content">
<div class="state_item_1">{{result.vehicle_status}}</div>
<div class="state_item_1" :style="result.working_status === '运行' ? {'border': '1.6px solid #54c0b3', 'color': '#54c0b3'} : {'border': '1.6px solid #8b90a6', 'color': '#696969'}">{{result.vehicle_status}}</div>
</div>
</div>
<div class="state_wrap">
<div class="state_tip">工作状态</div>
<div class="state_content">
<div class="state_item_1">{{result.working_status}}</div>
<div class="state_item_1" :style="result.working_status === '正常' ? {'border': '1.6px solid #54c0b3', 'color': '#54c0b3'} : {'border': '1.6px solid #fa6400', 'color': '#fa6400'}">{{result.working_status}}</div>
</div>
</div>
<div class="state_wrap">
@@ -100,6 +100,9 @@ export default {
beforeDestroy () {
clearInterval(this.timer)
},
destroyed () {
clearInterval(this.timer)
},
methods: {
refresh () {
this.timer = setInterval(() => {

View File

@@ -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">中文&nbsp;<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

View File

@@ -175,7 +175,7 @@
box-shadow: 0 1px 3px rgba(0,0,0,.3);
box-sizing: border-box;
width: 65%;
margin-top: 15vh;
margin-top: 15%;
.dialog_header
padding: 20px 20px 10px;
.dialog_title
@@ -501,12 +501,11 @@
background-color: #fff;
.is-checked
.switch_core
width: 100px;
border-color: rgb(19, 206, 102);
background-color: rgb(19, 206, 102);
&::after
left: 100%;
margin-left: -49px;
margin-left: -98px;
// tree
.el-tree-node__content

View File

@@ -64,10 +64,10 @@ html,body {
-webkit-text-size-adjust: none;
-webkit-tap-highlight-color: #ffffff;
background-color: #ffffff;
width: 100%;
height: 100%;
/* width: 100%;
height: 100%; */
font-size: 16px;
min-width: 1440px;
/* min-width: 1440px; */
width: 2560px;
height: 1440px;
/* max-width: 1920px; */