输入点位
This commit is contained in:
BIN
src/images/new/switch_10.png
Normal file
BIN
src/images/new/switch_10.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="main-container">
|
<div class="relative main-container">
|
||||||
<div class="navs_wraper">
|
<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="nav_item" v-for="(e, i) in nav" :key="i" :class="'nav_item_' + (i + 1)" @click="toPage(e)">
|
||||||
<div class="relative nav_item_i">
|
<div class="relative nav_item_i">
|
||||||
@@ -8,10 +8,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {ShutDown} from '@config/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'MinniHome',
|
name: 'MinniHome',
|
||||||
data () {
|
data () {
|
||||||
@@ -20,12 +25,32 @@ export default {
|
|||||||
{title: '任务', zh_title: '任务', en_title: 'Task', router: '/mini/carrypoint'},
|
{title: '任务', zh_title: '任务', en_title: 'Task', router: '/mini/carrypoint'},
|
||||||
{title: '故障', zh_title: '故障', en_title: 'Fault', router: '/mini/errorinfo'},
|
{title: '故障', zh_title: '故障', en_title: 'Fault', router: '/mini/errorinfo'},
|
||||||
{title: '示教', zh_title: '示教', en_title: 'Teach', router: '/mini/teach'}
|
{title: '示教', zh_title: '示教', en_title: 'Teach', router: '/mini/teach'}
|
||||||
]
|
],
|
||||||
|
disabled: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toPage (e) {
|
toPage (e) {
|
||||||
this.$router.push(e.router)
|
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_item_3
|
||||||
.nav_icon
|
.nav_icon
|
||||||
background #80372D center center / 70% auto url(../../../images/new/RF3.png) no-repeat
|
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>
|
</style>
|
||||||
|
|||||||
@@ -17,18 +17,66 @@
|
|||||||
<button class="mgl20 button_control" :class="{'button_control_gray': !pkId || active}" :disabled="disabled" @click="_confirmPoint('4')"><p>{{ $t('carrypoint.button2') }}</p></button>
|
<button class="mgl20 button_control" :class="{'button_control_gray': !pkId || active}" :disabled="disabled" @click="_confirmPoint('4')"><p>{{ $t('carrypoint.button2') }}</p></button>
|
||||||
<button class="mgl20 button_control button_control_disabled" :class="{'button_control_gray': !pkId || !active}" :disabled="disabled" @click="_deleteSingleTask"><p>{{ $t('tasklists.button3') }}</p></button>
|
<button class="mgl20 button_control button_control_disabled" :class="{'button_control_gray': !pkId || !active}" :disabled="disabled" @click="_deleteSingleTask"><p>{{ $t('tasklists.button3') }}</p></button>
|
||||||
<button class="mgl20 button_control" :class="{'button_control_gray': !pkId || active}" :disabled="disabled" @click="_confirmPoint('1')"><p>{{ $t('carrypoint.button5') }}</p></button>
|
<button class="mgl20 button_control" :class="{'button_control_gray': !pkId || active}" :disabled="disabled" @click="_confirmPoint('1')"><p>{{ $t('carrypoint.button5') }}</p></button>
|
||||||
|
<button class="mgl20 button_control" @click="showDialog('1')"><p>{{ $t('carrypoint.button3') }}</p></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<jxDialog
|
||||||
|
ref="child"
|
||||||
|
:title="$t('carrypoint.dialoginfo')"
|
||||||
|
@toSure="toSureDialog"
|
||||||
|
@toCancle="toCancle"
|
||||||
|
>
|
||||||
|
<div class="form_wraper">
|
||||||
|
<div class="form">
|
||||||
|
<div class="form_item">
|
||||||
|
<div class="form_item__label"><i>*</i>{{ $t('carrypoint.pointcode') }}</div>
|
||||||
|
<div class="form_item__content">
|
||||||
|
<keyboard-input
|
||||||
|
inputClass="form_item__input"
|
||||||
|
keyboardClass="pointcode"
|
||||||
|
:value="pointcode"
|
||||||
|
@inputChange="inputChange1"
|
||||||
|
@inputFocus="inputFocus"
|
||||||
|
></keyboard-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="type === '2'" class="form_wraper">
|
||||||
|
<div class="form">
|
||||||
|
<div class="form_item">
|
||||||
|
<div class="form_item__label">{{ $t('carrypoint.returnsite') }}</div>
|
||||||
|
<div class="form_item__content">
|
||||||
|
<el-select v-model="value" filterable :placeholder="$t('common.pleaseselect')">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.point_code"
|
||||||
|
:label="$i18n.locale === 'en-us' ? item.en_code_name : item.code_name"
|
||||||
|
:value="item.point_code">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</jxDialog>
|
||||||
</div>
|
</div>
|
||||||
|
<vue-touch-keyboard id="keyboard" :options="keyoptions" v-if="visible" :layout="layout" :cancel="hide" :accept="accept" :input="input" :next="next" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import jxDialog from '@components/dialog.vue'
|
||||||
|
import KeyboardInput from '@components/keyboard-input'
|
||||||
// import {queryPoint, querySingleTask} from '@/config/mork.js'
|
// import {queryPoint, querySingleTask} from '@/config/mork.js'
|
||||||
import {queryPoint, querySingleTask, confirmPoint, deleteSingleTask} from '@/config/getData.js'
|
import {queryPoint, querySingleTask, confirmPoint, deleteSingleTask} from '@/config/getData.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'CarryPoint',
|
name: 'CarryPoint',
|
||||||
|
components: {
|
||||||
|
jxDialog,
|
||||||
|
KeyboardInput
|
||||||
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
interTime: this.$store.getters.setTime,
|
interTime: this.$store.getters.setTime,
|
||||||
@@ -38,7 +86,9 @@ export default {
|
|||||||
disabled: false,
|
disabled: false,
|
||||||
pkId: '',
|
pkId: '',
|
||||||
dataList: [],
|
dataList: [],
|
||||||
active: false
|
active: false,
|
||||||
|
pointcode: '',
|
||||||
|
visible: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
@@ -50,6 +100,43 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
inputFocus () {
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
inputChange1 (val) {
|
||||||
|
this.pointcode = val
|
||||||
|
// 限制只能输入数字,后端校验
|
||||||
|
// this.pointcode = val.replace(/[^\d]/g, '')
|
||||||
|
},
|
||||||
|
hide () {
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
showDialog (type) {
|
||||||
|
this.type = type
|
||||||
|
this.$refs.child.active = true
|
||||||
|
this.pointcode = ''
|
||||||
|
},
|
||||||
|
toSureDialog () {
|
||||||
|
this.__confirmPoint(this.pointcode, this.type)
|
||||||
|
this.$refs.child.active = false
|
||||||
|
},
|
||||||
|
async __confirmPoint (code, type) {
|
||||||
|
try {
|
||||||
|
let res = await confirmPoint(code, type)
|
||||||
|
if (this.timer) {
|
||||||
|
clearInterval(this.timer)
|
||||||
|
}
|
||||||
|
this.toast(res.desc)
|
||||||
|
setTimeout(() => {
|
||||||
|
this.refresh()
|
||||||
|
}, 1000)
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toCancle () {
|
||||||
|
this.hide()
|
||||||
|
},
|
||||||
refresh () {
|
refresh () {
|
||||||
this._querySingleTask()
|
this._querySingleTask()
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
<div v-show="dropdown" class="header_dropdown_wraper">
|
<div v-show="dropdown" class="header_dropdown_wraper">
|
||||||
<ul>
|
<ul>
|
||||||
<li @click="showDialog">{{ $t('common.changepassword') }}</li>
|
<li @click="showDialog">{{ $t('common.changepassword') }}</li>
|
||||||
|
<li @click="$router.push('/mini/debug'), dropdown = false">debuger</li>
|
||||||
<li @click="toEixt">{{ $t('common.exit') }}</li>
|
<li @click="toEixt">{{ $t('common.exit') }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="popper__arrow"></div>
|
<div class="popper__arrow"></div>
|
||||||
|
|||||||
@@ -134,6 +134,9 @@ const router = new VueRouter({
|
|||||||
}, {
|
}, {
|
||||||
path: 'teach',
|
path: 'teach',
|
||||||
component: Teach
|
component: Teach
|
||||||
|
}, {
|
||||||
|
path: 'debug',
|
||||||
|
component: Debug
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -439,9 +439,11 @@
|
|||||||
// 用户管理
|
// 用户管理
|
||||||
.buttons_wrapper
|
.buttons_wrapper
|
||||||
margin 31px 55px 36px 55px
|
margin 31px 55px 36px 55px
|
||||||
|
overflow-x auto
|
||||||
.button_control
|
.button_control
|
||||||
_wh(335px, 91px)
|
_wh(335px, 91px)
|
||||||
background center url(../images/new/button.png) no-repeat
|
background center url(../images/new/button.png) no-repeat
|
||||||
|
background-size 100% 100%
|
||||||
p
|
p
|
||||||
_font(48px, 48px, #EFF2FF,,center)
|
_font(48px, 48px, #EFF2FF,,center)
|
||||||
font-family: YouSheBiaoTiHei
|
font-family: YouSheBiaoTiHei
|
||||||
@@ -452,8 +454,10 @@
|
|||||||
_wh(331px, 88px)
|
_wh(331px, 88px)
|
||||||
.button_control_disabled
|
.button_control_disabled
|
||||||
background center url(../images/new/button_disabled.png) no-repeat
|
background center url(../images/new/button_disabled.png) no-repeat
|
||||||
|
background-size 100% 100%
|
||||||
.button_control_gray
|
.button_control_gray
|
||||||
background center url(../images/new/button_gray.png) no-repeat
|
background center url(../images/new/button_gray.png) no-repeat
|
||||||
|
background-size 100% 100%
|
||||||
.grid_wrapper
|
.grid_wrapper
|
||||||
width 100%
|
width 100%
|
||||||
table
|
table
|
||||||
|
|||||||
Reference in New Issue
Block a user