This commit is contained in:
home孙 2025-09-03 10:42:15 +08:00
parent c48d73a6b1
commit c0309dafef

View File

@ -386,7 +386,7 @@
</view>
</view>
</view>
<!-- <view class="add-btn" @click="addModel=true">
<!-- <view class="add-btn" @click="addModel=true">
<image src="../../static/add_act.png" mode=""></image>
</view> -->
<!-- 添加设备弹窗 -->
@ -671,22 +671,22 @@
</view>
<view class="lishui-grid"
style="grid-template-columns: repeat(4, 1fr);grid-row-gap: 20rpx;grid-column-gap: 20rpx;">
<view class="btn" @click="changeLightOpen(0)"
<view class="btn" @click="changeColdWarm(0)"
:class="coldWarmFanList[0]=='1'?'btn-on':'btn-off'"
style="width: 130rpx !important;height: 66rpx;">
<span style="font-size: 24rpx;">1#风机</span>
</view>
<view class="btn" @click="changeLightOpen(1)"
<view class="btn" @click="changeColdWarm(1)"
:class="coldWarmFanList[1]=='1'?'btn-on':'btn-off'"
style="width: 130rpx !important;height: 66rpx;">
<span style="font-size: 24rpx;">2#风机</span>
</view>
<view class="btn" @click="changeLightOpen(2)"
<view class="btn" @click="changeColdWarm(2)"
:class="coldWarmFanList[2]=='1'?'btn-on':'btn-off'"
style="width: 130rpx !important;height: 66rpx;">
<span style="font-size: 24rpx;">3#风机</span>
</view>
<view class="btn" @click="changeLightOpen(3)"
<view class="btn" @click="changeColdWarm(3)"
:class="coldWarmFanList[3]=='1'?'btn-on':'btn-off'"
style="width: 130rpx !important;height: 66rpx;">
<span style="font-size: 24rpx;">4#风机</span>
@ -1800,7 +1800,7 @@ txt_act_list: [{
this.openValveControlShow(item)
}else if(item.id==39){
//
this.standardFanmodelHander(item)
this.coldWarmFanHander(item)
}else if(item.id==12){
//
this.supplementLightHander(item)
@ -2001,13 +2001,14 @@ txt_act_list: [{
// *#
changeValveInput() {
// console.log(this.valve_input_value);
if (this.valve_input_value < 1) {
uni.showToast({
title: '数字不能小于1',
icon: 'error',
duration: 2000
})
}
// if (this.valve_input_value < 1) {
// uni.showToast({
// title: '1',
// icon: 'error',
// duration: 2000
// })
// return
// }
let dataNum = {
target: {
value: this.valve_input_value,
@ -2036,7 +2037,23 @@ txt_act_list: [{
};
this.changeBtn(21400, dataNum);
},
//
changeColdWarm(index){
if (this.coldWarmFanList[index] == '1') {
this.coldWarmFanList[index] = '0'
} else {
this.coldWarmFanList[index] = '1'
}
var revList = this.coldWarmFanList.slice().reverse()
var num = revList.join("");
var dataNum = {
target: {
value: parseInt(num, 2),
},
};
this.changeBtn('22251', dataNum);
},
//
changeLightOpen(index) {
if (this.actListLight[index] == '1') {
@ -2681,8 +2698,9 @@ console.log();
},
//
standardFanmodelHander() {
standardFanmodelHander(item) {
this.standardFanmodelShow = true;
this.standardFanName=item.name
var deviceId = this.deviceId
this.$http({
url: this.api.readControl_fanwetcurtain + '?deviceId=' + deviceId,
@ -2691,15 +2709,13 @@ console.log();
if (res.code == 200) {
this.standardFanInputData2 = res.data;
this.standardFanOpenIndex = this.standardFanInputData2[21950]
this.standardFanActList1 = []
let num = this.standardFanInputData2['21951']
let num1 = this.padString(num.toString(2), 5)
let openListNew = []
openListNew = num1.split("")
openListNew.forEach((el, index) => {
this.standardFanActList1.push(openListNew[openListNew.length - index - 1])
})
this.standardFanActList1=openListNew.reverse()
}
})
},