diff --git a/pages/controller/controller.vue b/pages/controller/controller.vue index c97982af..aa741a15 100644 --- a/pages/controller/controller.vue +++ b/pages/controller/controller.vue @@ -386,7 +386,7 @@ - @@ -671,22 +671,22 @@ - 1#风机 - 2#风机 - 3#风机 - 4#风机 @@ -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() } }) },