浇花器页面优化
This commit is contained in:
parent
c571372e42
commit
3a05a5631f
|
@ -66,23 +66,34 @@
|
|||
</view>
|
||||
|
||||
<view class="choushuiben" v-else>
|
||||
<view class="name">
|
||||
<text>抽水泵启动时间/时:</text> <input type="text" v-model="shi"/>
|
||||
<view class="tit">
|
||||
浇水设置
|
||||
</view>
|
||||
<view class="name" @click="showtime = true">
|
||||
<text>启动时间:</text>
|
||||
<view class="">
|
||||
{{shi == '' ? '' : shi + ':' + fen}} <u-icon name="arrow-right" color="#7C7C7C" size="28"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="name">
|
||||
<text>抽水泵启动时间/分:</text><input type="text" v-model="fen"/>
|
||||
<text>工作时长:</text>
|
||||
<view class="">
|
||||
<input type="text" v-model="miao"/>
|
||||
秒
|
||||
</view>
|
||||
</view>
|
||||
<view class="name">
|
||||
<text>抽水泵工作时长/秒:</text><input type="text" v-model="miao"/>
|
||||
</view>
|
||||
<view class="name">
|
||||
<text>抽水泵间隔时间/天:</text><input type="text" v-model="tian"/>
|
||||
</view>
|
||||
<view class="baocun" @click="btnbc">
|
||||
保存
|
||||
<view class="name" style="border: 0;">
|
||||
<text>间隔时间:</text>
|
||||
<view class="">
|
||||
<input type="text" v-model="tian"/>
|
||||
天
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="baocun" @click="btnbc">
|
||||
保存
|
||||
</view>
|
||||
<u-picker v-model="showtime" mode="time" :params="paramstime" :default-time="00" @confirm='confirmtime'></u-picker>
|
||||
<view class="" v-if="pre == 'WATER'" style="width: 100%;padding-top: 80rpx;text-align: center;color: #000;font-size: 36rpx;">
|
||||
没有更多定时浇水啦...
|
||||
</view>
|
||||
|
@ -94,6 +105,15 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
showtime: false,
|
||||
paramstime: {
|
||||
year: false,
|
||||
month: false,
|
||||
day: false,
|
||||
hour: true,
|
||||
minute: true,
|
||||
second: false
|
||||
},
|
||||
bgc: {
|
||||
backgroundColor: "#fff",
|
||||
},
|
||||
|
@ -199,6 +219,12 @@
|
|||
|
||||
},
|
||||
methods: {
|
||||
// 选择启动时间
|
||||
confirmtime(e){
|
||||
console.log(e);
|
||||
this.shi = e.hour
|
||||
this.fen = e.minute
|
||||
},
|
||||
// 点击选择浇水时间
|
||||
btnshowone(){
|
||||
this.defaultTime = (this.hour.length < 10 ? '0' + this.hour : this.hour) + ':' + (this.minutekq.length < 10 ? '0' + this.minutekq : this.minutekq)
|
||||
|
@ -527,30 +553,49 @@
|
|||
/deep/ .uicon-nav-back {
|
||||
margin-bottom: 22rpx;
|
||||
}
|
||||
.baocun{
|
||||
margin: auto;
|
||||
width: 680rpx;
|
||||
height: 94rpx;
|
||||
background: #48893B;
|
||||
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||
margin-top: 50rpx;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
border-radius: 20rpx;
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.choushuiben{
|
||||
.baocun{
|
||||
margin: auto;
|
||||
width: 630rpx;
|
||||
height: 100rpx;
|
||||
margin-top: 50rpx;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
border-radius: 20rpx;
|
||||
background-color: #7FAD76;
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
width: 680rpx;
|
||||
height: 426rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08);
|
||||
border-radius: 20rpx;
|
||||
padding: 36rpx 34rpx;
|
||||
box-sizing: border-box;
|
||||
.tit{
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
.name{
|
||||
display: flex;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 34rpx;
|
||||
border-bottom: 1px solid #D8D8D8;
|
||||
padding-bottom: 34rpx;
|
||||
box-sizing: border-box;
|
||||
view{
|
||||
display: flex;
|
||||
}
|
||||
text{
|
||||
width: 300rpx;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
input{
|
||||
border-bottom: 1px solid #ccc;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
width: 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -229,10 +229,10 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-else>
|
||||
<view class="">抽水泵启动时间:{{csbobj.hour == undefined ? '--' : csbobj.hour + '时'}}{{csbobj.minute == undefined ? '' : csbobj.minute + '分'}}</view>
|
||||
<view class="">抽水泵工作时长/秒:{{csbobj.second == undefined ? '--' : csbobj.second + '秒'}}</view>
|
||||
<view class="">抽水泵间隔时间/天:{{csbobj.day == undefined ? '--' : csbobj.day + '天'}}</view>
|
||||
<view class="" style="display: flex;flex-wrap: wrap;justify-content: space-between;margin-top: 18rpx;" v-else>
|
||||
<view class="" style="display:flex;align-items: center;font-size: 24rpx;color: #50565A;"><image style="width:32rpx;height:32rpx;margin-right: 8rpx;" src="https://api.ccttiot.com/smartmeter/img/static/uhyYG0TLfWi9XUhTQz7D" mode=""></image>抽水泵启动时间:{{csbobj.hour == undefined ? '--' : csbobj.hour + '时'}}{{csbobj.minute == undefined ? '' : csbobj.minute + '分'}}</view>
|
||||
<view class="" style="display:flex;align-items: center;font-size: 24rpx;color: #50565A;"><image style="width:32rpx;height:32rpx;margin-right: 8rpx;" src="https://api.ccttiot.com/smartmeter/img/static/uuQaK98cmdQQnPWus27Z" mode=""></image>抽水泵工作时长/秒:{{csbobj.second == undefined ? '--' : csbobj.second + '秒'}}</view>
|
||||
<view class="" style="display:flex;align-items: center;font-size: 24rpx;color: #50565A;margin-top: 18rpx;"><image style="width:32rpx;height:32rpx;margin-right: 8rpx;" src="https://api.ccttiot.com/smartmeter/img/static/uM6Yz4xVqFwzW6xlTRph" mode=""></image>抽水泵间隔时间/天:{{csbobj.day == undefined ? '--' : csbobj.day + '天'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 开关选择 -->
|
||||
|
@ -1014,7 +1014,7 @@
|
|||
xBlufi.notifySendCustomData({
|
||||
customData: "11get"
|
||||
})
|
||||
}, 1000)
|
||||
}, 3000)
|
||||
}else{
|
||||
this.vardataflag = 1
|
||||
this.clearDisconnectTimer()
|
||||
|
@ -1274,9 +1274,13 @@
|
|||
});
|
||||
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
|
||||
// 显式转为字符串
|
||||
const yiStr = String(this.showobj.showArray[6])
|
||||
const erStr = String(this.showobj.showArray[7])
|
||||
// 判断字符串长度是否为1(而不是<10)
|
||||
let yi = yiStr.length === 1 ? '0' + yiStr : yiStr
|
||||
let er = erStr.length === 1 ? '0' + erStr : erStr
|
||||
this.devicetime = yi + ':' + er
|
||||
}
|
||||
},
|
||||
// 初始化断开蓝牙定时器
|
||||
|
|
Loading…
Reference in New Issue
Block a user