|
@@ -139,7 +139,9 @@ export default {
|
|
|
console.log("--------------------------------------------")
|
|
|
if(e.type == 'xcz'){
|
|
|
// 进度消息
|
|
|
- if(e.data.level == 'C'){
|
|
|
+ if(e.data.level == 'C'&&this.status!="reseting"){
|
|
|
+ // 启动成功
|
|
|
+ this.startWashCarSuccess()
|
|
|
this.curWorkStutesText= e.data.msgCodeInfo
|
|
|
// 洗车完成
|
|
|
if(e.data.msgCode=="XCWC"){
|
|
@@ -147,7 +149,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
// 错误消息
|
|
|
- if(e.data.level == 'F'){
|
|
|
+ if(e.data.level == 'F'&&this.status!="reseting"){
|
|
|
+ // 启动成功
|
|
|
+ this.startWashCarSuccess()
|
|
|
this.curWorkStutesText= e.data.msgCodeInfo
|
|
|
// 显示复位提示弹框
|
|
|
this.showStop = true;
|
|
@@ -216,9 +220,6 @@ export default {
|
|
|
this.$store.commit("$sendWebsocket",JSON.stringify(cmd))
|
|
|
this.showStart = true
|
|
|
this.$store.state.vuex_workStatus = 'start'
|
|
|
- setTimeout(()=>{
|
|
|
- this.startWashCarSuccess()
|
|
|
- },3000)
|
|
|
}
|
|
|
// 急停
|
|
|
if (this.status == 'working') {
|
|
@@ -237,22 +238,25 @@ export default {
|
|
|
},
|
|
|
// 启动成功
|
|
|
startWashCarSuccess(){
|
|
|
- this.status = 'working';
|
|
|
- this.$store.state.vuex_workStatus = 'working'
|
|
|
- this.curWorkStutesText='设备已启动';
|
|
|
- this.showStart = false;
|
|
|
- this.step = 0;
|
|
|
// 进度条,服务时间根据不同的服务类型而不同
|
|
|
- let serverTime = this.washDuration/60
|
|
|
- this.interId = setInterval(()=>{
|
|
|
- // 小于60时说明洗车机正在工作中
|
|
|
- if(this.step<=60){
|
|
|
- this.loading(this.step++)
|
|
|
- }else{
|
|
|
- // 洗车机正常状态下工作结束
|
|
|
- this.washCarSuccess()
|
|
|
- }
|
|
|
- },1000*serverTime)
|
|
|
+ if(!this.interId){
|
|
|
+ this.status = 'working';
|
|
|
+ this.$store.state.vuex_workStatus = 'working'
|
|
|
+ this.curWorkStutesText='设备已启动';
|
|
|
+ this.showStart = false;
|
|
|
+ this.step = 0;
|
|
|
+ let serverTime = 0.5
|
|
|
+ this.interId = setInterval(()=>{
|
|
|
+ // 小于60时说明洗车机正在工作中
|
|
|
+ if(this.step<=60){
|
|
|
+ this.loading(this.step++)
|
|
|
+ }else{
|
|
|
+ // 洗车机正常状态下工作结束
|
|
|
+ // this.washCarSuccess()
|
|
|
+ this.step = 0
|
|
|
+ }
|
|
|
+ },1000*serverTime)
|
|
|
+ }
|
|
|
},
|
|
|
// 设备停止成功
|
|
|
stopWashCarSuccess(){
|
|
@@ -292,6 +296,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ console.log('washCarSuccess')
|
|
|
// 关闭socket
|
|
|
this.$store.commit("$closeWebsocket")
|
|
|
},
|
|
@@ -301,6 +306,7 @@ export default {
|
|
|
this.rdeg= -135;
|
|
|
this.ldeg= -135;
|
|
|
clearInterval(this.interId);
|
|
|
+ this.interId = null;
|
|
|
},
|
|
|
// 洗车机进度条动画
|
|
|
loading(second) {
|