|
@@ -14,8 +14,8 @@
|
|
|
<view class="cirle-one"></view>
|
|
|
<view class="cirle-two flex-center" v-for="item in 60"><view class="sector" :style="{ transform: `rotate(${item * 6}deg)` }"></view></view>
|
|
|
<view class="cirle-three flex-center"></view>
|
|
|
- <view class="cirle-free w-start"></view>
|
|
|
- <view class="cirle-sex flex-center">点击启动</view>
|
|
|
+ <view class="cirle-free" :class="status == 'working' ? 'w-stop' : 'w-start'"></view>
|
|
|
+ <view class="cirle-sex flex-center">{{ status == 'working' ? '紧急停止' : '点击启动' }}</view>
|
|
|
</view>
|
|
|
<!-- 状态提示 -->
|
|
|
<view class="work-button-tips">设备准备就绪</view>
|
|
@@ -45,6 +45,44 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
+ <!-- 正在启动,归位弹框提示 -->
|
|
|
+ <u-popup v-model="showStart" :mask-close-able="false" border-radius="10" mode="center" width="500rpx" height="400rpx">
|
|
|
+ <view style="padding: 30rpx;display: flex;justify-content: center;text-align: center;">
|
|
|
+ <!-- 启动中 -->
|
|
|
+ <view v-if="status == 'start'">
|
|
|
+ <u-image width="216px" height="120px" src="/static/img/start.png"></u-image>
|
|
|
+ <view style="padding: 15rpx;">洗车机正在启动...</view>
|
|
|
+ </view>
|
|
|
+ <!-- 归位中 -->
|
|
|
+ <view v-if="status == 'reseting'">
|
|
|
+ <u-image width="216px" height="120px" src="/static/img/reset.png"></u-image>
|
|
|
+ <view style="padding: 15rpx;">洗车机正在归位中...</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
+ <!-- 急停提示弹框 -->
|
|
|
+ <u-popup v-model="showStop" :mask-close-able="false" border-radius="10" mode="center" width="80%">
|
|
|
+ <view style="padding: 30rpx;text-align: center;">
|
|
|
+ <view>
|
|
|
+ <view style="font-weight: bold;">设备提示</view>
|
|
|
+ <view style="display: flex;justify-content: center;padding: 10rpx 0;">
|
|
|
+ <u-image width="165px" height="138px" src="/static/img/sbts.png"></u-image>
|
|
|
+ </view>
|
|
|
+ <u-divider>可能原因</u-divider>
|
|
|
+ <view style="padding: 15rpx;text-align: left;">
|
|
|
+ <view>1、洗车机紧急停止,本次服务结束</view>
|
|
|
+ <view>2、因设备故障无法继续为您服务,所支付金额将退至您的支付账户</view>
|
|
|
+ <view>3、如需再次服务,请退出车辆重新进入,再扫码支付洗车</view>
|
|
|
+ <view>4、如需帮助请联系客服</view>
|
|
|
+ </view>
|
|
|
+ <view style="display: flex;padding: 20rpx 0;">
|
|
|
+ <u-button @click="callPhone" style="width: 45%;border-radius: 0;">联系客服</u-button>
|
|
|
+ <u-button @click="resetRabt" style="width: 45%;" type="error">洗车机归位</u-button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -56,31 +94,60 @@ export default {
|
|
|
rdeg: -135,
|
|
|
ldeg: -135,
|
|
|
step: 0,
|
|
|
- interId:null
|
|
|
+ interId: null,
|
|
|
+ status: 'start', // 状态,start 开始启动,working 正在工作,reseting 归位中
|
|
|
+ showStart: false ,// 启动弹框提示
|
|
|
+ showStop: false, // 急停提示
|
|
|
};
|
|
|
},
|
|
|
- onLoad() {
|
|
|
-
|
|
|
- },
|
|
|
+ onLoad() {},
|
|
|
methods: {
|
|
|
+ // 电话客服
|
|
|
+ callPhone () {
|
|
|
+ uni.makePhoneCall({
|
|
|
+ phoneNumber: '114'
|
|
|
+ })
|
|
|
+ },
|
|
|
// 倒计时监听,0 时自动结束订单
|
|
|
changeDtime(time) {
|
|
|
console.log(time);
|
|
|
},
|
|
|
- // 启动按钮
|
|
|
+ // 归位机器
|
|
|
+ resetRabt(){
|
|
|
+ this.status = 'reseting';
|
|
|
+ this.showStart = true;
|
|
|
+ this.showStop = false;
|
|
|
+ // 归位结束后
|
|
|
+ },
|
|
|
+ // 启动,急停按钮
|
|
|
startWork() {
|
|
|
- this.interId = setInterval(()=>{
|
|
|
- this.loading(this.step++)
|
|
|
- },1000)
|
|
|
+ // this.interId = setInterval(()=>{
|
|
|
+ // this.loading(this.step++)
|
|
|
+ // },1000)
|
|
|
+
|
|
|
+ // 启动
|
|
|
+ if (this.status == 'start') {
|
|
|
+ this.showStart = true;
|
|
|
+ // 启动成功
|
|
|
+ setTimeout(() => {
|
|
|
+ this.status = 'working';
|
|
|
+ this.showStart = false;
|
|
|
+ }, 3000);
|
|
|
+ }
|
|
|
+ // 急停
|
|
|
+ if (this.status == 'working') {
|
|
|
+ // 显示急停提示弹框
|
|
|
+ this.showStop = true;
|
|
|
+ }
|
|
|
},
|
|
|
// 进度条动画
|
|
|
loading(second) {
|
|
|
if (second <= 30) {
|
|
|
- this.rdeg = -135 + 6 * second
|
|
|
- this.ldeg = -135
|
|
|
+ this.rdeg = -135 + 6 * second;
|
|
|
+ this.ldeg = -135;
|
|
|
} else {
|
|
|
- this.rdeg = 45
|
|
|
- this.ldeg = -135 + 6 * (second - 30)
|
|
|
+ this.rdeg = 45;
|
|
|
+ this.ldeg = -135 + 6 * (second - 30);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -202,7 +269,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.cirle-sex {
|
|
|
- background-image: linear-gradient(-180deg, #888, #333 80%);
|
|
|
+ background-image: linear-gradient(180deg, #888, #333 50%);
|
|
|
width: 210rpx;
|
|
|
height: 210rpx;
|
|
|
border-radius: 100%;
|