浇花器抽水泵修改命令
This commit is contained in:
parent
f45f0ac107
commit
c571372e42
|
@ -399,7 +399,7 @@
|
|||
|
||||
this.showLoading();
|
||||
this.timeflag = false;
|
||||
let cucun = '11p_set0' + ',' + this.shi + ',' + this.fen + ',' + this.miao + ',' + this.tian + ',' + this.jgtian;
|
||||
let cucun = '11pset' + ',' + this.shi + ',' + this.fen + ',' + this.miao + ',' + this.tian;
|
||||
this.lastOperation = () => {
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: cucun
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
<view class="devicebox">
|
||||
<view class="devicetop">
|
||||
<view class="devicelt">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uVKucPVDjxjaCDCpFKvw" mode=""></image>
|
||||
<image :src="imgpic" mode="aspectFit"></image>
|
||||
<view class="xinghao">
|
||||
<view class="one">型号:{{user.model == undefined ? '--' : user.model}}</view>
|
||||
<view class="">MAC:{{user.mac == undefined ? '--' : user.mac}}</view>
|
||||
|
@ -236,6 +236,22 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- 开关选择 -->
|
||||
|
||||
<view class="dangqian" @click="btnsztime">
|
||||
<image src="https://lxnapi.ccttiot.com/smartmeter/img/static/ufHmxq7KI9PJhv8ey4ds" mode=""></image>
|
||||
<view class="cen">
|
||||
<view class="shen">
|
||||
当前时间
|
||||
</view>
|
||||
<view class="">
|
||||
点击可再次设置当前时间
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
{{devicetime == '' ? '--' : devicetime}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="switchbox">
|
||||
<view class="switch_he" v-if="pre == 'WATER'">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u7NwkNOoQYYsvHVMkDlu" mode=""></image>
|
||||
|
@ -310,7 +326,7 @@
|
|||
<view class="" style="margin-top: 14rpx;">MAC:{{item.mac}}</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uVKucPVDjxjaCDCpFKvw" mode=""></image>
|
||||
<image :src="item.modelPicture" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -341,7 +357,8 @@
|
|||
<view class="manualmask" v-if="sdjsflag"></view>
|
||||
<!-- 选择浇水时间-->
|
||||
<u-picker v-model="showjs" mode="time" :default-time="00" :params="params" @confirm="confirm"></u-picker>
|
||||
|
||||
<!-- 设置当前时间 -->
|
||||
<u-picker v-model="timeflag" mode="time" :params="paramss" @confirm="confirmtime"></u-picker>
|
||||
<tab-bar :indexs='0'></tab-bar>
|
||||
|
||||
</view>
|
||||
|
@ -352,6 +369,7 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
timeflag:false,
|
||||
one: false,
|
||||
ones: true,
|
||||
two: false,
|
||||
|
@ -375,6 +393,14 @@
|
|||
minute: true,
|
||||
second: true
|
||||
},
|
||||
paramss: {
|
||||
year: false,
|
||||
month: false,
|
||||
day: false,
|
||||
hour: true,
|
||||
minute: true,
|
||||
second: false
|
||||
},
|
||||
minute: '--',
|
||||
second: '--',
|
||||
hasShownVersionAlert: false,
|
||||
|
@ -408,6 +434,8 @@
|
|||
pre:'',
|
||||
csbobj:{},
|
||||
disconnectTimer: null,
|
||||
devicetime:'',
|
||||
imgpic:''
|
||||
}
|
||||
},
|
||||
// 分享到好友(会话)
|
||||
|
@ -530,6 +558,7 @@
|
|||
if(res.data.length > 0 || res.data != ''){
|
||||
this.bjflag = false
|
||||
this.devicelist = res.data
|
||||
this.imgpic = res.data[0].modelPicture
|
||||
this.mac = res.data[0].mac
|
||||
this.pre = res.data[0].pre
|
||||
this.deviceId = res.data[0].mac.match(/.{2}/g).reverse().join(':')
|
||||
|
@ -620,6 +649,46 @@
|
|||
}, 1500)
|
||||
}
|
||||
},
|
||||
// 点击显示设置时间
|
||||
btnsztime(){
|
||||
this.handleUserAction()
|
||||
if(this.vardataflag != 3){
|
||||
uni.showToast({
|
||||
title: '设备未连接',
|
||||
icon: 'none',
|
||||
duration:2000
|
||||
})
|
||||
}else{
|
||||
this.timeflag = true
|
||||
}
|
||||
},
|
||||
// 点击设置当前时间
|
||||
confirmtime(e){
|
||||
if(this.pre == 'WATER'){ //单阀
|
||||
uni.showLoading({
|
||||
title: '设置中...'
|
||||
})
|
||||
console.log(e.hour,e.minute);
|
||||
setTimeout(() => {
|
||||
this.devicetime = e.hour + ':' + e.minute
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: '11date' + e.hour + ':' + e.minute + ';'
|
||||
})
|
||||
uni.hideLoading()
|
||||
}, 1500)
|
||||
}else{ //抽水泵
|
||||
uni.showLoading({
|
||||
title: '设置中...'
|
||||
})
|
||||
console.log(e.hour,e.minute);
|
||||
setTimeout(() => {
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: '11hour' + e.hour + '@' + e.minute + '@',
|
||||
})
|
||||
uni.hideLoading()
|
||||
}, 1500)
|
||||
}
|
||||
},
|
||||
// 雨水感应关闭
|
||||
btnyushuis() {
|
||||
this.handleUserAction()
|
||||
|
@ -890,6 +959,7 @@
|
|||
if(res.code == 200){
|
||||
this.mac = res.data.mac
|
||||
this.pre = res.data.pre
|
||||
this.imgpic = res.data.modelPicture
|
||||
this.deviceId = res.data.mac.match(/.{2}/g).reverse().join(':')
|
||||
this.user = res.data
|
||||
}
|
||||
|
@ -1202,6 +1272,12 @@
|
|||
nextTimeDiff: this.xctime,
|
||||
prevTime: this.sctimejs
|
||||
});
|
||||
console.log(this.showobj.showArray,this.showobj.showArray[6],'02020202020');
|
||||
if(this.showobj.showArray[6] && this.showobj.showArray[7]){
|
||||
let yi = this.showobj.showArray[6].length < 10 ? '0' + this.showobj.showArray[6] : this.showobj.showArray[6]
|
||||
let er = this.showobj.showArray[7].length < 10 ? '0' + this.showobj.showArray[7] : this.showobj.showArray[7]
|
||||
this.devicetime = yi + ':' + er
|
||||
}
|
||||
},
|
||||
// 初始化断开蓝牙定时器
|
||||
initDisconnectTimer() {
|
||||
|
@ -1211,7 +1287,7 @@
|
|||
console.log('一分钟无操作,断开蓝牙连接')
|
||||
this.disconnectBluetooth()
|
||||
}
|
||||
}, 60000) // 60秒 = 1分钟
|
||||
}, 600000)
|
||||
},
|
||||
|
||||
// 重置断开蓝牙定时器
|
||||
|
@ -1262,6 +1338,41 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.dangqian{
|
||||
width: 670rpx;
|
||||
height: 160rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 0rpx 38rpx 0rpx rgba(128,128,128,0.3);
|
||||
filter: blur(0px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 26rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 24rpx;
|
||||
border-radius: 20rpx;
|
||||
image{
|
||||
width: 78rpx;
|
||||
height: 78rpx;
|
||||
}
|
||||
.cen{
|
||||
.shen{
|
||||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
color: #3D3D3D;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
view{
|
||||
font-size: 24rpx;
|
||||
color: #808080;
|
||||
}
|
||||
}
|
||||
.rt{
|
||||
font-weight: 600;
|
||||
font-size: 48rpx;
|
||||
color: #50565A;
|
||||
}
|
||||
}
|
||||
.rotated-image {
|
||||
transform: rotate(180deg); /* 旋转 180 度 */
|
||||
transition: transform 1s ease;
|
||||
|
@ -1377,6 +1488,7 @@
|
|||
}
|
||||
.page {
|
||||
padding: 0 40rpx;
|
||||
padding-bottom: 300rpx;
|
||||
box-sizing: border-box;
|
||||
.tabsb {
|
||||
width: 750rpx;
|
||||
|
|
Loading…
Reference in New Issue
Block a user