From 23ee6f7d3e3d93bf657045be7bf122e9fb1e44eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?home=E5=AD=99?= <1162067978@qq.com> Date: Tue, 26 Aug 2025 18:47:35 +0800 Subject: [PATCH] 08/26 --- pages/controller/controller.vue | 98 ++++++++++++++++++--------------- 1 file changed, 55 insertions(+), 43 deletions(-) diff --git a/pages/controller/controller.vue b/pages/controller/controller.vue index e35ff351..fb9aff1a 100644 --- a/pages/controller/controller.vue +++ b/pages/controller/controller.vue @@ -333,12 +333,12 @@ --> - - + - {{item.open == 1 ? '打开' : '关闭'}} + {{item.index == 1 ? '打开' : '关闭'}} @@ -370,12 +370,12 @@ :style="item.index != 1 ? 'color:#FF6C6C' : '#24B383'">{{ item.progress }}% - - + - {{item.open == 1 ? '打开' : '关闭'}} + {{item.index == 1 ? '打开' : '关闭'}} @@ -652,15 +652,15 @@ 控制模式: - 自动运行 - 手动启动 - 手动关闭 @@ -1285,6 +1285,7 @@ export default { data() { return { + nowId:'',//当前弹窗打开的id // 添加设备弹窗 addModel:false, // 头部导航背景 @@ -1780,6 +1781,7 @@ txt_act_list: [{ } }, openModel(item){ + this.nowId=item.id // 根据id打开弹窗 if(item.id==6||item.id==7||item.id==8||item.id==9||item.id==10||item.id==11){ //五防弹窗 @@ -1970,17 +1972,17 @@ txt_act_list: [{ value: this.fiveControlIndex, }, }; - if (this.pop_title == '加温水泵') { + if (this.nowId == 6) { this.changeBtn(21520, dataNum); - } else if (this.pop_title == '地热风机') { + } else if (this.nowId == 7) { this.changeBtn(21526, dataNum); - } else if (this.pop_title == '上风口') { + } else if (this.nowId == 8) { this.changeBtn(21530, dataNum); - } else if (this.pop_title == '下风口') { + } else if (this.nowId == 9) { this.changeBtn(21541, dataNum); - } else if (this.pop_title == '卷被') { + } else if (this.nowId == 10) { this.changeBtn(21548, dataNum); - } else if (this.pop_title == '除雪') { + } else if (this.nowId == 11) { this.changeBtn(21558, dataNum); } }, @@ -1993,7 +1995,7 @@ txt_act_list: [{ value: this.valveControlIndex, }, }; - let num = (this.valvePopTitle.substring(0, 1) - 1) * 50 + 20201; + let num = (this.nowId - 42) * 50 + 20201; this.changeBtn(num, dataNum); }, // *#电磁阀输入框 @@ -2014,7 +2016,16 @@ txt_act_list: [{ let num = (this.valvePopTitle.substring(0, 1) - 1) * 50 + 20202; this.changeBtn(num, dataNum); }, - +// 冷暖风机 + hotFanControl(index) { + this.coldWarmFanIndex = index; + let dataNum = { + target: { + value: this.coldWarmFanIndex, + }, + }; + this.changeBtn(22250, dataNum); + }, // 补光灯 changeLightControl(index) { this.lightControlIndex = index; @@ -2051,9 +2062,9 @@ txt_act_list: [{ value: this.circulationControlIndex, }, }; - if (this.popCirculationFengshanName == 0) { + if (this.nowId == 15) { this.changeBtn(21450, dataNum); - } else if (this.popCirculationFengshanName == 1) { + } else if (this.nowId == 16) { this.changeBtn(21470, dataNum); } }, @@ -2076,9 +2087,9 @@ txt_act_list: [{ value: this.CO2Index, }, }; - if (this.popCO2Name == 0) { + if (this.nowId == 40) { this.changeBtn(22360, dataNum); - } else if (this.popCO2Name == 1) { + } else if (this.nowId == 41) { this.changeBtn(22378, dataNum); } }, @@ -2090,9 +2101,9 @@ txt_act_list: [{ value: this.fanwetcurtainControlIndex, }, }; - if (this.popfanwetcurtainName == 0) { + if (this.nowId == 18) { this.changeBtn(21970, dataNum); - } else if (this.popfanwetcurtainName == 1) { + } else if (this.nowId == 19) { this.changeBtn(21972, dataNum); } }, @@ -2105,9 +2116,9 @@ txt_act_list: [{ value: this.highpressuremistControlIndex, }, }; - if (this.pophighpressuremistName == 0) { + if (this.nowId == 13) { this.changeBtn(21800, dataNum); - } else if (this.pophighpressuremistName == 1) { + } else if (this.nowId == 14) { this.changeBtn(21808, dataNum); } }, @@ -2120,9 +2131,9 @@ txt_act_list: [{ value: this.outFlipWindowControlIndex, }, }; - if (this.popoutFlipWindowName == 0) { + if (this.nowId == 20) { this.changeBtn(21974, dataNum); - } else if (this.popoutFlipWindowName == 1) { + } else if (this.nowId == 21) { this.changeBtn(21979, dataNum); } }, @@ -2135,9 +2146,9 @@ txt_act_list: [{ value: this.innercurtainControlIndex, }, }; - if (this.popinnercurtainName == 0) { + if (this.nowId == 22) { this.changeBtn(21840, dataNum); - } else if (this.popinnercurtainName == 1) { + } else if (this.nowId == 23) { this.changeBtn(21858, dataNum); } }, @@ -2150,9 +2161,9 @@ txt_act_list: [{ value: this.externalsunshadeControlIndex, }, }; - if (this.popexternalsunshadeName == 0) { + if (this.nowId == 24) { this.changeBtn(21900, dataNum); - } else if (this.popexternalsunshadeName == 1) { + } else if (this.nowId == 25) { this.changeBtn(21915, dataNum); } }, @@ -2165,17 +2176,17 @@ txt_act_list: [{ value: this.airWindowControlIndex, }, }; - if (this.popairWindowName == 0) { + if (this.nowId == 26) { this.changeBtn(21250, dataNum); - } else if (this.popairWindowName == 1) { + } else if (this.nowId == 27) { this.changeBtn(21273, dataNum); - } else if (this.popairWindowName == 2) { + } else if (this.nowId == 28) { this.changeBtn(21296, dataNum); - } else if (this.popairWindowName == 3) { + } else if (this.nowId == 29) { this.changeBtn(21319, dataNum); - } else if (this.popairWindowName == 4) { + } else if (this.nowId == 32) { this.changeBtn(21342, dataNum); - } else if (this.popairWindowName == 5) { + } else if (this.nowId == 33) { this.changeBtn(21365, dataNum); } }, @@ -2188,9 +2199,9 @@ txt_act_list: [{ value: this.interiorthermalinsulationIndex, }, }; - if (this.interiorthermalinsulationName == 0) { + if (this.nowId == 30) { this.changeBtn(22000, dataNum); - } else if (this.interiorthermalinsulationName == 1) { + } else if (this.nowId == 31) { this.changeBtn(22012, dataNum); } }, @@ -2203,13 +2214,14 @@ txt_act_list: [{ value: this.upFaceInsulationIndex, }, }; - if (this.upFaceInsulationName == 0) { + console.log(this.nowId); + if (this.nowId == 34) { this.changeBtn(22300, dataNum); - } else if (this.upFaceInsulationName == 1) { + } else if (this.nowId == 35) { this.changeBtn(22313, dataNum); - } else if (this.upFaceInsulationName == 2) { + } else if (this.nowId == 36) { this.changeBtn(22326, dataNum); - } else if (this.upFaceInsulationName == 3) { + } else if (this.nowId == 37) { this.changeBtn(22339, dataNum); } },