|
@@ -17,8 +17,10 @@
|
|
|
<p :class="item.switchType==1?'colorOpen':'colorOff'">{{item.switchType == 1?'开启':(item.switchType == 0?'关闭':'')}}</p>
|
|
|
<p :class="item.switchType==1?'':'colorText'" v-for="(minItem,minIndex) in infraredControllerData.functionList"
|
|
|
:key="minItem.value" v-if="minItem.value == item.functionType">{{minItem.label}}</p>
|
|
|
- <p :class="item.switchType==1?'':'colorText'" v-for="(minItem,minIndex) in infraredControllerData.orderList"
|
|
|
- :key="minItem.value" v-if="minItem.value == item.orderType">{{minItem.label}}</p>
|
|
|
+ <p :class="item.switchType==1?'':'colorText'" v-for="(minItem,minIndex) in infraredControllerData.refrigerationList"
|
|
|
+ :key="minItem.value" v-if="item.functionType == 1&&minItem.value == item.orderType">{{minItem.label}}</p>
|
|
|
+ <p :class="item.switchType==1?'':'colorText'" v-for="(minItem,minIndex) in infraredControllerData.heatingList"
|
|
|
+ :key="minItem.value" v-if="item.functionType == 2&&minItem.value == item.orderType">{{minItem.label}}</p>
|
|
|
</div>
|
|
|
<div class="for-hardware-button">
|
|
|
<p @click="dialogOpen(item)">操作</p>
|
|
@@ -75,7 +77,8 @@
|
|
|
</div>
|
|
|
<div class="infraredController-orderType-box" v-if="infraredControllerForm.switchType == 1 && (infraredControllerForm.functionType == 1 || infraredControllerForm.functionType == 2)">
|
|
|
<p class="order-minus" @click="minusTextButton()">-</p>
|
|
|
- <p class="order-text" v-for="(item,index) in infraredControllerData.orderList" :key="index" v-if="infraredControllerForm.orderType == item.value">{{item.label}}</p>
|
|
|
+ <p class="order-text" v-for="(item,index) in infraredControllerData.refrigerationList" :key="index" v-if="infraredControllerForm.functionType==1&&infraredControllerForm.orderType == item.value">{{item.label}}</p>
|
|
|
+ <p class="order-text" v-for="(item,index) in infraredControllerData.heatingList" :key="index" v-if="infraredControllerForm.functionType==2&&infraredControllerForm.orderType == item.value">{{item.label}}</p>
|
|
|
<p class="order-add" @click="addTextButton()">+</p>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -120,7 +123,8 @@
|
|
|
{label:'制热',value:'2'},
|
|
|
{label:'通风',value:'3'},
|
|
|
],
|
|
|
- orderList:[
|
|
|
+ //制冷
|
|
|
+ refrigerationList:[
|
|
|
{label:"18°C",value:18},
|
|
|
{label:"19°C",value:19},
|
|
|
{label:"20°C",value:20},
|
|
@@ -131,6 +135,19 @@
|
|
|
{label:"25°C",value:25},
|
|
|
{label:"26°C",value:26},
|
|
|
{label:"27°C",value:27},
|
|
|
+ {label:"28°C",value:28},
|
|
|
+ ],
|
|
|
+ //制热
|
|
|
+ heatingList:[
|
|
|
+ {label:"22°C",value:22},
|
|
|
+ {label:"23°C",value:23},
|
|
|
+ {label:"24°C",value:24},
|
|
|
+ {label:"25°C",value:25},
|
|
|
+ {label:"26°C",value:26},
|
|
|
+ {label:"27°C",value:27},
|
|
|
+ {label:"28°C",value:28},
|
|
|
+ {label:"29°C",value:29},
|
|
|
+ {label:"30°C",value:30},
|
|
|
],
|
|
|
}
|
|
|
}
|
|
@@ -193,23 +210,60 @@
|
|
|
},
|
|
|
//开关切换
|
|
|
switchTypeButton(){
|
|
|
+ if(!this.infraredControllerForm.switchType){
|
|
|
+ if (this.infraredControllerForm.functionType == 1){
|
|
|
+ if(this.infraredControllerForm.orderType<18 || this.infraredControllerForm.orderType>28){
|
|
|
+ this.$set(this.infraredControllerForm,'orderType',18);
|
|
|
+ }
|
|
|
+ } else if(this.infraredControllerForm.functionType == 2){
|
|
|
+ if(this.infraredControllerForm.orderType<22 || this.infraredControllerForm.orderType>30){
|
|
|
+ this.$set(this.infraredControllerForm,'orderType',22);
|
|
|
+ }
|
|
|
+ }else if(this.infraredControllerForm.functionType == 3){
|
|
|
+ this.$set(this.infraredControllerForm,'orderType',18);
|
|
|
+ }else{
|
|
|
+ this.$set(this.infraredControllerForm,'functionType',1);
|
|
|
+ this.$set(this.infraredControllerForm,'orderType',18);
|
|
|
+ }
|
|
|
+ }
|
|
|
this.$set(this.infraredControllerForm,'switchType',!this.infraredControllerForm.switchType);
|
|
|
},
|
|
|
//状态切换
|
|
|
functionButton(value){
|
|
|
if(this.infraredControllerForm.functionType != value){
|
|
|
+ if (value == 1){
|
|
|
+ if(this.infraredControllerForm.orderType<18 || this.infraredControllerForm.orderType>28){
|
|
|
+ this.$set(this.infraredControllerForm,'orderType',18);
|
|
|
+ }
|
|
|
+ } else if(value == 2){
|
|
|
+ if(this.infraredControllerForm.orderType<22 || this.infraredControllerForm.orderType>30){
|
|
|
+ this.$set(this.infraredControllerForm,'orderType',22);
|
|
|
+ }
|
|
|
+ }
|
|
|
this.$set(this.infraredControllerForm,'functionType',value);
|
|
|
}
|
|
|
},
|
|
|
//指令切换
|
|
|
minusTextButton(){
|
|
|
- if(this.infraredControllerForm.orderType>18){
|
|
|
- this.infraredControllerForm.orderType--
|
|
|
+ if (this.infraredControllerForm.functionType == 1){
|
|
|
+ if(this.infraredControllerForm.orderType>18){
|
|
|
+ this.infraredControllerForm.orderType--
|
|
|
+ }
|
|
|
+ } else if(this.infraredControllerForm.functionType == 2){
|
|
|
+ if(this.infraredControllerForm.orderType>22){
|
|
|
+ this.infraredControllerForm.orderType--
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
addTextButton(){
|
|
|
- if(this.infraredControllerForm.orderType<27){
|
|
|
- this.infraredControllerForm.orderType++
|
|
|
+ if (this.infraredControllerForm.functionType == 1){
|
|
|
+ if(this.infraredControllerForm.orderType<28){
|
|
|
+ this.infraredControllerForm.orderType++
|
|
|
+ }
|
|
|
+ } else if(this.infraredControllerForm.functionType == 2){
|
|
|
+ if(this.infraredControllerForm.orderType<30){
|
|
|
+ this.infraredControllerForm.orderType++
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
//查询硬件数据
|