This commit is contained in:
home孙 2025-01-11 17:07:56 +08:00
parent e735cd642f
commit c310bec8ef
2 changed files with 128 additions and 4 deletions

View File

@ -46,6 +46,7 @@ let api = {
readControl_readfilllight: '/readControl/readfilllight', //读取(补光灯)控制器
readControl_readcirculationfan: '/readControl/readcirculationfan', //读取(环流风扇)控制器
readControl_fanwetcurtain: '/readControl/fanwetcurtain', //读取(风机湿帘)控制器
readControl_co2replenishment: '/readControl/co2replenishment', //读取CO2控制器
readControl_innercurtain: '/readControl/innercurtain', //内遮阳
readControl_externalsunshade: '/readControl/externalsunshade', //外遮阳

View File

@ -346,7 +346,48 @@
</view>
</template>
</view>
<!-- CO2补气 -->
<view class="content" v-if="purviewList.indexOf('30')!=-1">
<template v-for="(item,index) in CO2List">
<view class="lishui-item" v-show="item.CO2State != 0" :key="index">
<view class="lishui-title">
<view class="title-left">
{{ item.name }}
</view>
<view class="title-right" @click="CO2Hander(index)">
设置
<image src="../../static/set-arrow.png" mode=""></image>
</view>
</view>
<view class="lishui-content" v-if="item.CO2State != 0">
<view class="lishui-set">
<view class="set-1">
<image v-if="item.CO2State == 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="item.CO2State != 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="item.open == 1 ? 'btn-on' : 'btn-off'">
<image class="fan-img" v-if="item.open == 1" src="../../static/fanwetcurtain.png" alt="" style="animation: unset;">
</image>
<image v-else src="../../static/fan-off.png" alt=""></image>
<span>{{item.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 outFlipWindowList">
@ -1144,6 +1185,41 @@
<image src="../../static/closed.png" mode="" @click="airconditioningShow=false"></image>
</view>
</u-popup>
<!-- CO2补气弹框 -->
<u-popup v-model="CO2Show" mode="center" :mask-close-able='true' width="640rpx" height="454rpx"
:closeable='false'>
<view class="contentPop lishui-item">
<view class="contentPop_box">
<view class="title">
{{ CO2List[popCO2Name].name}}
</view>
</view>
<view class="lishui-content">
<view class="model-title">
控制模式:
</view>
<view class="lishui-flex">
<view class="btn btn-140 " @click="changeCO2Control(1)"
:class="CO2Index==1?'btn-on':'btn-off'">
<span>自动运行</span>
</view>
<view class="btn btn-140 " @click="changeCO2Control(2)"
:class="CO2Index==2?'btn-on':'btn-off'">
<span>手动打开</span>
</view>
<view class="btn btn-140 " @click="changeCO2Control(3)"
:class="CO2Index==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="CO2Show=false"></image>
</view>
</u-popup>
<!-- 湿帘泵弹框 -->
<u-popup v-model="fanwetcurtainShow" mode="center" :mask-close-able='true' width="640rpx" height="454rpx"
:closeable='false'>
@ -1827,6 +1903,15 @@
],
popfanwetcurtainName:'',
CO2Show:false,//CO2
CO2Index:0,
CO2List:[
{name:'CO2补气1',CO2State:0,open:0},
{name:'CO2补气2',CO2State:0,open:0},
],
popCO2Name:'',
highpressuremistShow:false,//
highpressuremistControlIndex:0,
highpressuremistList:[
@ -2139,6 +2224,20 @@
this.changeBtn(22040, dataNum);
},
// CO2
changeCO2Control(index){
this.CO2Index = index;
let dataNum = {
target: {
value: this.CO2Index,
},
};
if(this.popCO2Name == 0){
this.changeBtn(22360, dataNum);
}else if(this.popCO2Name == 1){
this.changeBtn(22378, dataNum);
}
},
// 湿
changefanwetcurtainControl(index){
this.fanwetcurtainControlIndex = index;
@ -2343,7 +2442,6 @@
uni.stopPullDownRefresh();
res.data.forEach((el, index) => {
this.purviewList.push(el.id.toString())
if(el.id=='19'){
//
this.airWindowList=this.toNewList(this.airWindowList,el.child)
@ -2357,6 +2455,9 @@
}else if(el.id=='27'){
//
this.interiorthermalinsulationList=this.toNewList(this.interiorthermalinsulationList,el.child)
}else if(el.id=='30'){
//
this.CO2List=this.toNewList(this.CO2List,el.child)
}else if(el.id=='29'){
//
this.upFaceInsulationList=this.toNewList(this.upFaceInsulationList,el.child)
@ -2574,7 +2675,13 @@
openListNew = standardnum1.split("")
this.standardFanStatus.status = openListNew.reverse()
};
// CO2
if(this.purviewList.indexOf('30') != -1){
this.CO2List.forEach((el,index)=>{
el.CO2State = res.data[1178 + index * 2];
el.open = res.data[1179 + index * 2];
})
};
// 湿
if(this.purviewList.indexOf('26') != -1){
this.fanwetcurtainList.forEach((el,index)=>{
@ -2816,7 +2923,23 @@
}
})
},
// CO2
CO2Hander(index){
this.CO2Index = 0;
this.popCO2Name = index;
var deviceId = this.deviceId
this.CO2Show=true;
this.$http({
url:this.api.readControl_co2replenishment + '?deviceId=' + deviceId,
method: 'GET'
}).then(res => {
if (res.code == 200) {
uni.hideLoading();
uni.stopPullDownRefresh();
this.CO2Index = res.data[21970 + index * 2];
}
})
},
// 湿
fanwetcurtainHander(index){
this.fanwetcurtainControlIndex = 0;