|
@@ -127,7 +127,6 @@ export default {
|
|
|
onLoad(options) {
|
|
|
// 创建websocket
|
|
|
this.$store.commit('$webSocket')
|
|
|
- this.$store.state.vuex_workStatus = 'start'
|
|
|
// 获取用户及订单信息
|
|
|
let orderInfo = this.$store.state.vuex_orderInfo
|
|
|
this.washCarType = orderInfo.itemCode
|
|
@@ -176,6 +175,10 @@ export default {
|
|
|
if(e.data.msgCode=="FW_SUCC"){
|
|
|
this.resetRabtSuccess()
|
|
|
}
|
|
|
+ // 设备离线,设备暂停营业或复位失败
|
|
|
+ if(e.data.msgCode=="PAUSE" || e.data.msgCode == "FW_FAIL"){
|
|
|
+ this.devError()
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -210,6 +213,7 @@ export default {
|
|
|
cmd.operateType = 'start' //操作命令
|
|
|
this.$store.commit("$sendWebsocket",JSON.stringify(cmd))
|
|
|
this.showStart = true
|
|
|
+ this.$store.state.vuex_workStatus = 'start'
|
|
|
setTimeout(()=>{
|
|
|
this.startWashCarSuccess()
|
|
|
},3000)
|
|
@@ -276,8 +280,6 @@ export default {
|
|
|
this.$store.state.vuex_workStatus = 'stop'
|
|
|
this.curWorkStutesText='洗车已结束';
|
|
|
this.resetLoadingStatus();
|
|
|
- // 关闭socket
|
|
|
- this.$store.commit("$closeWebsocket")
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
content: '洗车已结束',
|
|
@@ -288,6 +290,8 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ // 关闭socket
|
|
|
+ this.$store.commit("$closeWebsocket")
|
|
|
},
|
|
|
// 重置到进度条初始状态
|
|
|
resetLoadingStatus(){
|