输入点位

This commit is contained in:
2025-01-14 18:30:58 +08:00
parent 556c1d4541
commit 069165cc00
6 changed files with 149 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div class="main-container">
<div class="relative main-container">
<div class="navs_wraper">
<div class="nav_item" v-for="(e, i) in nav" :key="i" :class="'nav_item_' + (i + 1)" @click="toPage(e)">
<div class="relative nav_item_i">
@@ -8,10 +8,15 @@
</div>
</div>
</div>
<button class="absolute onoff_wraper" @click="switchDown('1', '0')" :disabled="disabled">
<div class="onoff_power"><img src="../../../images/new/switch_10.png" alt=""></div>
<div class="onoff_power_txt">{{ $t('vehiclecontrol.poweroff') }}</div>
</button>
</div>
</template>
<script>
import {ShutDown} from '@config/getData2.js'
export default {
name: 'MinniHome',
data () {
@@ -20,12 +25,32 @@ export default {
{title: '任务', zh_title: '任务', en_title: 'Task', router: '/mini/carrypoint'},
{title: '故障', zh_title: '故障', en_title: 'Fault', router: '/mini/errorinfo'},
{title: '示教', zh_title: '示教', en_title: 'Teach', router: '/mini/teach'}
]
],
disabled: false
}
},
methods: {
toPage (e) {
this.$router.push(e.router)
},
switchDown (type, bool) {
this.disabled = true
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-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.disabled = false
} catch (e) {
this.disabled = false
this.toast(this.$t('common.operationfailed'))
}
}
}
}
@@ -93,4 +118,30 @@ export default {
.nav_item_3
.nav_icon
background #80372D center center / 70% auto url(../../../images/new/RF3.png) no-repeat
.onoff_wraper
display: flex;
flex-direction: column;
align-items: center;
bottom 0
left 50%
transform translateX(-50%)
background-color transparent
.onoff_power
display: flex;
justify-content: center;
align-items: center;
width: 90px;
height: 90px;
border: 1px solid #1a48f7;
border-radius: 50%;
box-shadow: inset 14px 0px 7px 0px rgba(26, 138, 247, 80%), inset -14px 0px 7px 0px rgba(26, 138, 247, 80%);
img
width 50%
height auto
.onoff_power_txt
font-size 30px
color #fff
line-height 60px
font-family 'Source Han Sans CN'
text-align center
</style>