|
@@ -8,10 +8,10 @@
|
|
<view>{{infraredControllerForm.name}}</view>
|
|
<view>{{infraredControllerForm.name}}</view>
|
|
<view @click="switchFun()" :class="infraredControllerForm.switchType==1?'color-A':'color-B'">{{infraredControllerForm.switchType==1?'开启':'关闭'}}</view>
|
|
<view @click="switchFun()" :class="infraredControllerForm.switchType==1?'color-A':'color-B'">{{infraredControllerForm.switchType==1?'开启':'关闭'}}</view>
|
|
</view>
|
|
</view>
|
|
- <view class="panel-m" >
|
|
|
|
- <view @click="temperatureFun(index)" :class="infraredControllerForm.functionType==item.value?'color-C':''" v-for="(item,index) in infraredControllerData.functionList" :key="index">{{item.label}}</view>
|
|
|
|
|
|
+ <view class="panel-m" v-if="infraredControllerForm.switchType == 1">
|
|
|
|
+ <view @click="temperatureFun(item.value)" :class="infraredControllerForm.functionType==item.value?'color-C':''" v-for="(item,index) in infraredControllerData.functionList" :key="index">{{item.label}}</view>
|
|
</view>
|
|
</view>
|
|
- <view class="panel-b">
|
|
|
|
|
|
+ <view class="panel-b" v-if="infraredControllerForm.switchType == 1 && infraredControllerForm.functionType != 3">
|
|
<view @click="subtract">-</view>
|
|
<view @click="subtract">-</view>
|
|
<view v-for="(item,index) in infraredControllerData.orderList" :key="index" v-if="item.value == infraredControllerForm.orderType">{{item.value}}</view>
|
|
<view v-for="(item,index) in infraredControllerData.orderList" :key="index" v-if="item.value == infraredControllerForm.orderType">{{item.value}}</view>
|
|
<view @click="add">+</view>
|
|
<view @click="add">+</view>
|
|
@@ -68,13 +68,32 @@
|
|
|
|
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- this.$set(this,'infraredControllerForm',{
|
|
|
|
- name:this.airConditioningData.hardwareName,
|
|
|
|
- switchType:parseInt(this.airConditioningData.switchType),
|
|
|
|
- functionType:this.airConditioningData.switchType == 0 ? 1 : parseInt(this.airConditioningData.functionType),
|
|
|
|
- orderType:this.airConditioningData.switchType == 1 && this.airConditioningData.functionType !=3 ? parseInt(this.airConditioningData.orderType):18,
|
|
|
|
- hardwareNo:this.airConditioningData.hardwareNo,
|
|
|
|
- });
|
|
|
|
|
|
+ if(this.airConditioningData.reservedThree == 0){
|
|
|
|
+ this.$set(this,'infraredControllerForm',{
|
|
|
|
+ name:this.airConditioningData.hardwareName,
|
|
|
|
+ switchType:0,
|
|
|
|
+ functionType:1,
|
|
|
|
+ orderType:18,
|
|
|
|
+ hardwareNo:this.airConditioningData.hardwareNo,
|
|
|
|
+ });
|
|
|
|
+ }else if(this.airConditioningData.reservedThree == 2){
|
|
|
|
+ this.$set(this,'infraredControllerForm',{
|
|
|
|
+ name:this.airConditioningData.hardwareName,
|
|
|
|
+ switchType:1,
|
|
|
|
+ functionType:3,
|
|
|
|
+ orderType:18,
|
|
|
|
+ hardwareNo:this.airConditioningData.hardwareNo,
|
|
|
|
+ });
|
|
|
|
+ }else if(this.airConditioningData.reservedThree.indexOf('-') != -1){
|
|
|
|
+ let list = this.airConditioningData.reservedThree.split('-');
|
|
|
|
+ this.$set(this,'infraredControllerForm',{
|
|
|
|
+ name:this.airConditioningData.hardwareName,
|
|
|
|
+ switchType:1,
|
|
|
|
+ functionType:list[0]==3?1:(list[0]==4?2:''),
|
|
|
|
+ orderType:list[1]?list[1]:'',
|
|
|
|
+ hardwareNo:this.airConditioningData.hardwareNo,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// 返回按钮
|
|
// 返回按钮
|
|
@@ -82,14 +101,14 @@
|
|
this.$parent.buttonClick('conditioningClose','');
|
|
this.$parent.buttonClick('conditioningClose','');
|
|
},
|
|
},
|
|
switchFun(){
|
|
switchFun(){
|
|
- if(this.switchStatus==0){
|
|
|
|
- this.$set(this, 'switchStatus',1);
|
|
|
|
|
|
+ if(this.infraredControllerForm.switchType==0){
|
|
|
|
+ this.$set(this.infraredControllerForm, 'switchType',1);
|
|
}else{
|
|
}else{
|
|
- this.$set(this, 'switchStatus',0);
|
|
|
|
|
|
+ this.$set(this.infraredControllerForm, 'switchType',0);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- temperatureFun(index){
|
|
|
|
- this.$set(this, 'keystrokeIndex',index);
|
|
|
|
|
|
+ temperatureFun(value){
|
|
|
|
+ this.$set(this.infraredControllerForm, 'functionType',value);
|
|
},
|
|
},
|
|
add() {
|
|
add() {
|
|
if(this.infraredControllerForm.orderType<27){
|
|
if(this.infraredControllerForm.orderType<27){
|
|
@@ -106,10 +125,12 @@
|
|
async mangerControl() {
|
|
async mangerControl() {
|
|
let text = '';
|
|
let text = '';
|
|
if(this.infraredControllerForm.switchType == 1){
|
|
if(this.infraredControllerForm.switchType == 1){
|
|
- if(this.infraredControllerForm.functionType != 3){
|
|
|
|
- text = '1-' + this.infraredControllerForm.functionType + '-' + this.infraredControllerForm.orderType;
|
|
|
|
- }else {
|
|
|
|
- text = '1-3';
|
|
|
|
|
|
+ if(this.infraredControllerForm.functionType == 1){
|
|
|
|
+ text = '3-' + this.infraredControllerForm.orderType;
|
|
|
|
+ }else if(this.infraredControllerForm.functionType == 2){
|
|
|
|
+ text = '4-' + this.infraredControllerForm.orderType;
|
|
|
|
+ }else if(this.infraredControllerForm.functionType == 3){
|
|
|
|
+ text = '2';
|
|
}
|
|
}
|
|
}else if(this.infraredControllerForm.switchType == 0){
|
|
}else if(this.infraredControllerForm.switchType == 0){
|
|
text = '0';
|
|
text = '0';
|
|
@@ -128,6 +149,7 @@
|
|
mask: true,
|
|
mask: true,
|
|
duration: 2000
|
|
duration: 2000
|
|
});
|
|
});
|
|
|
|
+ this.$parent.getIotControlData();
|
|
this.backPage();
|
|
this.backPage();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -152,10 +174,9 @@
|
|
/* 空调面板 */
|
|
/* 空调面板 */
|
|
.panel{
|
|
.panel{
|
|
width: 710rpx;
|
|
width: 710rpx;
|
|
- height: 530rpx;
|
|
|
|
background: #FFFFFF;
|
|
background: #FFFFFF;
|
|
border-radius: 20rpx;
|
|
border-radius: 20rpx;
|
|
- padding:34rpx 30rpx 0rpx;
|
|
|
|
|
|
+ padding:34rpx 30rpx 34rpx;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
position: absolute;
|
|
position: absolute;
|
|
top: 320rpx;
|
|
top: 320rpx;
|