|
@@ -137,6 +137,7 @@ export default {
|
|
// 紧急停止成功
|
|
// 紧急停止成功
|
|
this.stopWashCarSuccess()
|
|
this.stopWashCarSuccess()
|
|
// 复位成功
|
|
// 复位成功
|
|
|
|
+ this.resetRabtSuccess()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -155,6 +156,8 @@ export default {
|
|
if (this.status == 'start') {
|
|
if (this.status == 'start') {
|
|
cmd.operateType = 'start' //操作命令
|
|
cmd.operateType = 'start' //操作命令
|
|
this.$store.commit("$sendWebsocket",JSON.stringify(cmd))
|
|
this.$store.commit("$sendWebsocket",JSON.stringify(cmd))
|
|
|
|
+ this.step= 0;
|
|
|
|
+ this.showStart = true;
|
|
}
|
|
}
|
|
// 急停
|
|
// 急停
|
|
if (this.status == 'working') {
|
|
if (this.status == 'working') {
|
|
@@ -165,6 +168,8 @@ export default {
|
|
if (res.confirm) {
|
|
if (res.confirm) {
|
|
cmd.operateType = 'stop' //操作命令
|
|
cmd.operateType = 'stop' //操作命令
|
|
_this.$store.commit("$sendWebsocket",JSON.stringify(cmd))
|
|
_this.$store.commit("$sendWebsocket",JSON.stringify(cmd))
|
|
|
|
+ _this.showStop = true;
|
|
|
|
+ _this.status = 'stop';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -172,30 +177,24 @@ export default {
|
|
},
|
|
},
|
|
// 启动成功
|
|
// 启动成功
|
|
startWashCarSuccess(){
|
|
startWashCarSuccess(){
|
|
- this.step= 0;
|
|
|
|
- this.showStart = true;
|
|
|
|
- setTimeout(() => {
|
|
|
|
- this.status = 'working';
|
|
|
|
- this.curWorkStutesText='设备已启动';
|
|
|
|
- this.showStart = false;
|
|
|
|
- // 进度条,服务时间根据不同的服务类型而不同
|
|
|
|
- let serverTime = this.washDuration/60
|
|
|
|
- this.interId = setInterval(()=>{
|
|
|
|
- // 小于60时说明洗车机正在工作中
|
|
|
|
- if(this.step<=60){
|
|
|
|
- this.loading(this.step++)
|
|
|
|
- }else{
|
|
|
|
- // 洗车机正常状态下工作结束
|
|
|
|
- this.washCarSuccess()
|
|
|
|
- }
|
|
|
|
- },1000*serverTime)
|
|
|
|
- }, 3000);
|
|
|
|
|
|
+ this.status = 'working';
|
|
|
|
+ this.curWorkStutesText='设备已启动';
|
|
|
|
+ this.showStart = false;
|
|
|
|
+ // 进度条,服务时间根据不同的服务类型而不同
|
|
|
|
+ let serverTime = this.washDuration/60
|
|
|
|
+ this.interId = setInterval(()=>{
|
|
|
|
+ // 小于60时说明洗车机正在工作中
|
|
|
|
+ if(this.step<=60){
|
|
|
|
+ this.loading(this.step++)
|
|
|
|
+ }else{
|
|
|
|
+ // 洗车机正常状态下工作结束
|
|
|
|
+ this.washCarSuccess()
|
|
|
|
+ }
|
|
|
|
+ },1000*serverTime)
|
|
},
|
|
},
|
|
// 紧急停止成功
|
|
// 紧急停止成功
|
|
stopWashCarSuccess(){
|
|
stopWashCarSuccess(){
|
|
// 显示急停提示弹框
|
|
// 显示急停提示弹框
|
|
- this.showStop = true;
|
|
|
|
- this.status = 'stop';
|
|
|
|
this.curWorkStutesText='设备已紧急停止';
|
|
this.curWorkStutesText='设备已紧急停止';
|
|
this.resetLoadingStatus();
|
|
this.resetLoadingStatus();
|
|
},
|
|
},
|
|
@@ -252,18 +251,18 @@ export default {
|
|
}
|
|
}
|
|
this.$store.commit("$sendWebsocket",JSON.stringify(cmd))
|
|
this.$store.commit("$sendWebsocket",JSON.stringify(cmd))
|
|
this.status = 'reseting';
|
|
this.status = 'reseting';
|
|
- this.curWorkStutesText='设备正在归位';
|
|
|
|
this.showStart = true;
|
|
this.showStart = true;
|
|
this.showStop = false;
|
|
this.showStop = false;
|
|
- // 归位结束后
|
|
|
|
- setTimeout(()=>{
|
|
|
|
- // 关闭socket
|
|
|
|
- this.$store.commit("$closeWebsocket")
|
|
|
|
- uni.redirectTo({
|
|
|
|
- url:"/pages/work/success/success"
|
|
|
|
- })
|
|
|
|
- },3000)
|
|
|
|
},
|
|
},
|
|
|
|
+ // 归位结束后
|
|
|
|
+ resetRabtSuccess(){
|
|
|
|
+ this.curWorkStutesText='设备已归位';
|
|
|
|
+ // 关闭socket
|
|
|
|
+ this.$store.commit("$closeWebsocket");
|
|
|
|
+ uni.redirectTo({
|
|
|
|
+ url:"/pages/work/success/success"
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|