This commit is contained in:
sunmeng 2024-12-17 09:44:44 +08:00
parent 5cf5770214
commit 61e56c6e6c
2 changed files with 120 additions and 5 deletions

View File

@ -50,6 +50,7 @@ let api = {
readControl_innercurtain: '/readControl/innercurtain', //内遮阳
readControl_externalsunshade: '/readControl/externalsunshade', //外遮阳
readControl_readskylight: '/readControl/readskylight', //通风窗
readControl_airconditioner: '/readControl/airconditioner', //通风窗
readControl_highpressuremist: '/readControl/highpressuremist', //读取(高压微雾)控制器
camera_gethls: '/camera/gethls', //获取摄像头得地址

View File

@ -262,7 +262,48 @@
</view>
</view>
</view>
<!-- 空调 -->
<view class="content" v-if="purviewList.indexOf('28')!=-1">
<template>
<view class="lishui-item" v-show="airconditioning.airconditioningState != 0">
<view class="lishui-title">
<view class="title-left">
{{ airconditioning.name }}
</view>
<view class="title-right" @click="airconditioningHander(index)">
设置
<image src="../../static/set-arrow.png" mode=""></image>
</view>
</view>
<view class="lishui-content" v-if="airconditioning.airconditioningState != 0">
<view class="lishui-set">
<view class="set-1">
<image v-if="airconditioning.airconditioningState == 1" class="sel" src="../../static/sel.png" mode=""></image>
<view v-else class="sel-no"></view>
<span>自动控制</span>
</view>
<view class="set-2">
<image v-if="airconditioning.airconditioningState != 1" class="sel" src="../../static/sel.png" mode=""></image>
<view v-else class="sel-no"></view>
<span>手机控制</span>
</view>
</view>
<view class="lishui-status">
<view class="btn" :class="airconditioning.open == 1 ? 'btn-on' : 'btn-off'">
<image class="fan-img" v-if="airconditioning.open == 1" src="../../static/fanwetcurtain.png" alt="" style="animation: unset;">
</image>
<image v-else src="../../static/fan-off.png" alt=""></image>
<span>{{airconditioning.open == 1 ? '打开' : '关闭'}}</span>
</view>
</view>
</view>
<view v-else class="status-noTrue">
<image src="../../static/noTrue.png" mode=""></image>
<span>当前设备无效</span>
</view>
</view>
</template>
</view>
<!-- 湿帘泵 -->
<view class="content" v-if="purviewList.indexOf('26')!=-1">
<template v-for="(item,index) in fanwetcurtainList">
@ -1067,7 +1108,42 @@
<image src="../../static/closed.png" mode="" @click="circulationFengshanShow=false"></image>
</view>
</u-popup>
<!-- 空调弹框 -->
<u-popup v-model="airconditioningShow" mode="center" :mask-close-able='true' width="640rpx" height="454rpx"
:closeable='false'>
<view class="contentPop lishui-item">
<view class="contentPop_box">
<view class="title">
{{ airconditioning.name}}
</view>
</view>
<view class="lishui-content">
<view class="model-title">
控制模式:
</view>
<view class="lishui-flex">
<view class="btn btn-140 " @click="changeairconditioningControl(1)"
:class="airconditioningControlIndex==1?'btn-on':'btn-off'">
<span>自动运行</span>
</view>
<view class="btn btn-140 " @click="changeairconditioningControl(2)"
:class="airconditioningControlIndex==2?'btn-on':'btn-off'">
<span>手动打开</span>
</view>
<view class="btn btn-140 " @click="changeairconditioningControl(3)"
:class="airconditioningControlIndex==3?'btn-on':'btn-off'">
<span>手动关闭</span>
</view>
</view>
</view>
<view class="changeMoreBtn" @click="toWebView('wetFan')">
<image src="../../static/changeMore.png" mode=""></image>
<text>修改更多参数</text>
</view>
<image src="../../static/closed.png" mode="" @click="airconditioningShow=false"></image>
</view>
</u-popup>
<!-- 湿帘泵弹框 -->
<u-popup v-model="fanwetcurtainShow" mode="center" :mask-close-able='true' width="640rpx" height="454rpx"
:closeable='false'>
@ -1811,7 +1887,11 @@
{name:'3#立面保温',upFaceInsulationState:0,progress:0,statusProgress:0},
{name:'4#立面保温',upFaceInsulationState:0,progress:0,statusProgress:0},
],
upFaceInsulationName:''
upFaceInsulationName:'',
airconditioningShow:false,//湿
airconditioningControlIndex:0,
airconditioning:{name:'空调',airconditioningState:0,open:0},
};
},
onReady(){
@ -2048,6 +2128,16 @@
this.changeBtn(21470, dataNum);
}
},
//
changeairconditioningControl(index){
this.airconditioningControlIndex = index;
let dataNum = {
target: {
value: this.airconditioningControlIndex,
},
};
this.changeBtn(22040, dataNum);
},
// 湿
changefanwetcurtainControl(index){
@ -2290,6 +2380,9 @@
})
}
})
}else if(el.id=='28'){
//
this.airconditioning.name=el.nickName
}else if(el.id=='21'){
//
this.circulationFengshanList=this.toNewList(this.circulationFengshanList,el.child)
@ -2489,7 +2582,12 @@
el.open = res.data[1081 + index * 2];
})
};
//
if(this.purviewList.indexOf('28') != -1){
this.airconditioning.airconditioningState=res.data['1160']
this.airconditioning.open=res.data['1161']
};
//
if(this.purviewList.indexOf('23') != -1){
this.highpressuremistList.forEach((el,index)=>{
@ -2736,7 +2834,23 @@
}
})
},
//
airconditioningHander(index){
this.airconditioningControlIndex = 0;
this.popfanwetcurtainName = index;
var deviceId = this.deviceId
this.airconditioningShow=true;
this.$http({
url:this.api.readControl_airconditioner + '?deviceId=' + deviceId,
method: 'GET'
}).then(res => {
if (res.code == 200) {
uni.hideLoading();
uni.stopPullDownRefresh();
this.airconditioningControlIndex = res.data[22040];
}
})
},
//
highpressuremistHander(index){
this.highpressuremistControlIndex = 0;