1
This commit is contained in:
parent
c310bec8ef
commit
7966a91d8e
@ -43,6 +43,7 @@ let api = {
|
||||
readControl_solenoidValve7: '/readControl/solenoidValve7', //7#电磁阀
|
||||
readControl_solenoidValve8: '/readControl/solenoidValve8', //8#电磁阀
|
||||
|
||||
readControl_heatfan: '/readControl/heatfan', //读取(补光灯)控制器
|
||||
readControl_readfilllight: '/readControl/readfilllight', //读取(补光灯)控制器
|
||||
readControl_readcirculationfan: '/readControl/readcirculationfan', //读取(环流风扇)控制器
|
||||
readControl_fanwetcurtain: '/readControl/fanwetcurtain', //读取(风机湿帘)控制器
|
||||
|
@ -676,7 +676,77 @@
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
<!-- 冷暖风机 -->
|
||||
<view class="content" v-if="purviewList.indexOf('31')!=-1">
|
||||
<view class="lishui-item" v-if="coldWarmFanStatus.open != 0">
|
||||
<view class="lishui-title">
|
||||
<view class="title-left">
|
||||
{{coldWarmFanStatus.name}}
|
||||
</view>
|
||||
<view class="title-right" @click="coldWarmFanHander">
|
||||
设置
|
||||
<image src="../../static/set-arrow.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="lishui-content" v-if="coldWarmFanStatus.open != 0">
|
||||
<view class="lishui-set">
|
||||
<view class="set-1">
|
||||
<image v-if="coldWarmFanStatus.open == 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="coldWarmFanStatus.open != 1" class="sel" src="../../static/sel.png" mode=""></image>
|
||||
<view v-else class="sel-no"></view>
|
||||
<span>手机控制</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="lishui-set">
|
||||
<view class="set-1" v-if="coldWarmFanStatus.open1 == 1">
|
||||
<image v-if="coldWarmFanStatus.open1 == 1" class="sel" src="../../static/sel.png" mode=""></image>
|
||||
<view v-else class="sel-no"></view>
|
||||
<span>加热模式</span>
|
||||
</view>
|
||||
<view class="set-2" v-else>
|
||||
<image v-if="coldWarmFanStatus.open1 != 1" class="sel" src="../../static/sel.png" mode=""></image>
|
||||
<view v-else class="sel-no"></view>
|
||||
<span>制冷模式</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="lishui-grid" style="grid-template-columns: repeat(4, 1fr);grid-row-gap: 20rpx;grid-column-gap: 20rpx;">
|
||||
<view class="btn " :class="coldWarmFanStatus.status[0] == 1 ? 'btn-on' : 'btn-off'" style="width: 140rpx;height: 66rpx;">
|
||||
<image class="fan-img" v-if="coldWarmFanStatus.status[0] == 1" src="../../static/supplementLight.png" alt="" style="width: 26rpx;height: 24rpx;animation: unset;">
|
||||
</image>
|
||||
<image v-else src="../../static/fan-off.png" alt="" style="width: 20rpx;height: 20rpx;"></image>
|
||||
<span style="font-size: 22rpx;margin-left: 5rpx;">1#通道</span>
|
||||
</view>
|
||||
<view class="btn" :class="coldWarmFanStatus.status[1] == 1 ? 'btn-on' : 'btn-off'" style="width: 140rpx;height: 66rpx;">
|
||||
<image class="fan-img" v-if="coldWarmFanStatus.status[1] == 1" src="../../static/supplementLight.png" alt="" style="width: 26rpx;height: 24rpx;animation: unset;">
|
||||
</image>
|
||||
<image v-else src="../../static/fan-off.png" alt="" style="width: 20rpx;height: 20rpx;"></image>
|
||||
<span style="font-size: 22rpx;margin-left: 5rpx;">2#通道</span>
|
||||
</view>
|
||||
<view class="btn" :class="coldWarmFanStatus.status[2] == 1 ? 'btn-on' : 'btn-off'" style="width: 140rpx;height: 66rpx;">
|
||||
<image class="fan-img" v-if="coldWarmFanStatus.status[2] == 1" src="../../static/supplementLight.png" alt="" style="width: 26rpx;height: 24rpx;animation: unset;">
|
||||
</image>
|
||||
<image v-else src="../../static/fan-off.png" alt="" style="width: 20rpx;height: 20rpx;"></image>
|
||||
<span style="font-size: 22rpx;margin-left: 5rpx;">3#通道</span>
|
||||
</view>
|
||||
<view class="btn" :class="coldWarmFanStatus.status[3] == 1 ? 'btn-on' : 'btn-off'" style="width: 140rpx;height: 66rpx;">
|
||||
<image class="fan-img" v-if="coldWarmFanStatus.status[3] == 1" src="../../static/supplementLight.png" alt="" style="width: 26rpx;height: 24rpx;animation: unset;">
|
||||
</image>
|
||||
<image v-else src="../../static/fan-off.png" alt="" style="width: 20rpx;height: 20rpx;"></image>
|
||||
<span style="font-size: 22rpx;margin-left: 5rpx;">4#通道</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-else class="status-noTrue">
|
||||
<image src="../../static/noTrue.png" mode=""></image>
|
||||
<span>当前设备无效</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 补光灯 -->
|
||||
<view class="content" v-if="purviewList.indexOf('20')!=-1">
|
||||
<view class="lishui-item" v-if="supplementLightStatus.open != 0">
|
||||
@ -1046,7 +1116,60 @@
|
||||
<image src="../../static/closed.png" mode="" @click="valveControlShow=false"></image>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<!-- 冷暖风机弹框 -->
|
||||
<u-popup v-model="coldWarmFanShow" mode="center" :mask-close-able='true' width="640rpx" height="620rpx"
|
||||
:closeable='false'>
|
||||
<view class="contentPop lishui-item">
|
||||
<view class="contentPop_box padding-none">
|
||||
<view class="title">
|
||||
冷暖风机
|
||||
</view>
|
||||
</view>
|
||||
<view class="lishui-content padding-none">
|
||||
<view class="model-title" style="margin: 30rpx 0 30rpx 30rpx;">
|
||||
控制模式:
|
||||
</view>
|
||||
<view class="lishui-flex" style="box-sizing: border-box;padding: 0 30rpx;">
|
||||
<view class="btn btn-140 " @click="changeLightControl(1)"
|
||||
:class="coldWarmFanIndex==1?'btn-on':'btn-off'">
|
||||
<span>自动运行</span>
|
||||
</view>
|
||||
<view class="btn btn-140 " @click="changeLightControl(2)"
|
||||
:class="coldWarmFanIndex==2?'btn-on':'btn-off'">
|
||||
<span>手动启动</span>
|
||||
</view>
|
||||
<view class="btn btn-140 " @click="changeLightControl(3)"
|
||||
:class="coldWarmFanIndex==3?'btn-on':'btn-off'">
|
||||
<span>手动关闭</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="width: 100%;height: 1rpx;background: #DDDDDD;margin-top: 30rpx;"></view>
|
||||
<view class="model-title" style="padding:30rpx 0 0 30rpx;">
|
||||
手动打开时冷暖风机启动
|
||||
</view>
|
||||
<view class="lishui-grid" style="grid-template-columns: repeat(4, 1fr);grid-row-gap: 20rpx;grid-column-gap: 20rpx;">
|
||||
<view class="btn" @click="changeLightOpen(0)" :class="coldWarmFanList[0]=='1'?'btn-on':'btn-off'" style="width: 130rpx !important;height: 66rpx;">
|
||||
<span style="font-size: 24rpx;">1#通道</span>
|
||||
</view>
|
||||
<view class="btn" @click="changeLightOpen(1)" :class="coldWarmFanList[1]=='1'?'btn-on':'btn-off'" style="width: 130rpx !important;height: 66rpx;">
|
||||
<span style="font-size: 24rpx;">2#通道</span>
|
||||
</view>
|
||||
<view class="btn" @click="changeLightOpen(2)" :class="coldWarmFanList[2]=='1'?'btn-on':'btn-off'" style="width: 130rpx !important;height: 66rpx;">
|
||||
<span style="font-size: 24rpx;">3#通道</span>
|
||||
</view>
|
||||
<view class="btn" @click="changeLightOpen(3)" :class="coldWarmFanList[3]=='1'?'btn-on':'btn-off'" style="width: 130rpx !important;height: 66rpx;">
|
||||
<span style="font-size: 24rpx;">4#通道</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="width: 100%;height: 1rpx;background: #DDDDDD;margin-top: 30rpx;"></view>
|
||||
<view class="changeMoreBtn" @click="toWebView('heatFan')">
|
||||
<image src="../../static/changeMore.png" mode=""></image>
|
||||
<text>修改更多参数</text>
|
||||
</view>
|
||||
</view>
|
||||
<image src="../../static/closed.png" mode="" @click="coldWarmFanShow=false"></image>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 补光灯弹框 -->
|
||||
<u-popup v-model="supplementLightShow" mode="center" :mask-close-able='true' width="640rpx" height="770rpx"
|
||||
:closeable='false'>
|
||||
@ -1886,6 +2009,16 @@
|
||||
},
|
||||
actListLight:[],
|
||||
|
||||
coldWarmFanShow:false,//冷暖风机
|
||||
coldWarmFanIndex:0,
|
||||
coldWarmFanStatus: {
|
||||
name: '冷暖风机',
|
||||
open: 0,
|
||||
open1: 0,
|
||||
status: []
|
||||
},
|
||||
coldWarmFanList:[],
|
||||
|
||||
|
||||
circulationFengshanShow:false,//环流风扇
|
||||
circulationControlIndex:0,
|
||||
@ -2465,6 +2598,10 @@
|
||||
//补光灯
|
||||
this.supplementLightStatus.name=el.nickName
|
||||
|
||||
}else if(el.id=='31'){
|
||||
//冷暖风机
|
||||
this.coldWarmFanStatus.name=el.nickName
|
||||
|
||||
}else if(el.id=='26'){
|
||||
//风机/湿帘泵/湿帘外翻窗
|
||||
el.child.forEach((el1,index1)=>{
|
||||
@ -2645,7 +2782,17 @@
|
||||
});
|
||||
console.log(this.fiveControlList,'this.fiveControlList');
|
||||
}
|
||||
|
||||
// 冷暖风机状态值获取
|
||||
if(this.purviewList.indexOf('31') != -1){
|
||||
this.coldWarmFanStatus.open = res.data[1175];
|
||||
this.coldWarmFanStatus.open1 = res.data[1176];
|
||||
this.coldWarmFanStatus.status = [];
|
||||
let numLight = res.data[1177];
|
||||
let numLight1 = this.padString(numLight.toString(2),4);
|
||||
let openListNew = [];
|
||||
openListNew = numLight1.split('')
|
||||
this.coldWarmFanStatus.status = openListNew.reverse()
|
||||
};
|
||||
// 补光灯状态值获取
|
||||
if(this.purviewList.indexOf('20') != -1){
|
||||
this.supplementLightStatus.open = res.data[1068];
|
||||
@ -2882,7 +3029,28 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 冷暖风机
|
||||
coldWarmFanHander(){
|
||||
var deviceId = this.deviceId;
|
||||
this.coldWarmFanShow = true;
|
||||
this.$http({
|
||||
url:this.api.readControl_heatfan + '?deviceId=' + deviceId,
|
||||
method: 'GET'
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
// console.log(res,'补光灯');
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh();
|
||||
this.coldWarmFanIndex = res.data[22250];
|
||||
this.coldWarmFanList = []
|
||||
let numLight = res.data[22251];
|
||||
let numLight1 = this.padString(numLight.toString(2),4);
|
||||
let openListNew = [];
|
||||
openListNew = numLight1.split('')
|
||||
this.coldWarmFanList = openListNew.reverse()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 补光灯
|
||||
supplementLightHander(){
|
||||
var deviceId = this.deviceId;
|
||||
@ -3292,6 +3460,9 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.border-none{
|
||||
border: none!important;
|
||||
}
|
||||
.controller {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
|
Loading…
x
Reference in New Issue
Block a user