空调弹窗添加选择
This commit is contained in:
parent
956395985d
commit
340153a534
@ -59,6 +59,7 @@
|
||||
},
|
||||
"usingComponents" : true
|
||||
},
|
||||
"sassImplementationName": "node-sass",
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
|
@ -1423,9 +1423,9 @@
|
||||
</u-popup>
|
||||
|
||||
<!-- 空调弹框 -->
|
||||
<u-popup v-model="airconditioningShow" mode="center" :mask-close-able='true' width="640rpx" height="954rpx"
|
||||
<u-popup v-model="airconditioningShow" mode="center" :mask-close-able='true' width="640rpx" height="1404rpx"
|
||||
:closeable='false'>
|
||||
<view class="contentPop lishui-item">
|
||||
<view class="contentPop lishui-item airconditioning">
|
||||
<view class="contentPop_box">
|
||||
<view class="title">
|
||||
{{ airconditioning.name}}
|
||||
@ -1450,6 +1450,29 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="model-title border-top" style="padding:30rpx 0 0 30rpx;">
|
||||
手动设置:
|
||||
</view>
|
||||
<view class="input_value border-top-none">
|
||||
手动开启空调的温度<input v-model="airconditioningInputData[22043]" type="number" placeholder="0"
|
||||
@blur="blurChangeCount(22043, $event)" />℃
|
||||
</view>
|
||||
<view class="model-title" style="padding:30rpx 0 0 30rpx;">
|
||||
手自动设置:
|
||||
</view>
|
||||
<view class="input_value input-sel border-top-none">
|
||||
<view class="">
|
||||
空调的风速 <view class="select-label" @click="type1show=true">
|
||||
{{airconditioningInputDataNew[22041]}}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="">
|
||||
空调的模式<view class="select-label" @click="type2show=true">
|
||||
{{airconditioningInputDataNew[22042]}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="model-title" style="padding:30rpx 0 0 30rpx;">
|
||||
手自动开启几区空调:
|
||||
</view>
|
||||
@ -1511,6 +1534,9 @@
|
||||
<image src="../../static/closed.png" mode="" @click="airconditioningShow=false"></image>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 空调选择器弹窗 -->
|
||||
<u-picker mode="selector" v-model="type1show" :range="typeList1" range-key="label" @confirm="handleCommand1"></u-picker>
|
||||
<u-picker mode="selector" v-model="type2show" :range="typeList2" range-key="label" @confirm="handleCommand2"></u-picker>
|
||||
<!-- CO2补气弹框 -->
|
||||
<u-popup v-model="CO2Show" mode="center" :mask-close-able='true' width="640rpx" height="454rpx"
|
||||
:closeable='false'>
|
||||
@ -2466,6 +2492,27 @@
|
||||
},
|
||||
actList2:[],
|
||||
airconditioningInputData:{},
|
||||
airconditioningInputDataNew:{},
|
||||
type1show:false,
|
||||
typeList1: [
|
||||
{ label: "自动调整风速", value: 0 },
|
||||
{ label: "1级风速", value: 1 },
|
||||
{ label: "2级风速", value: 2 },
|
||||
{ label: "3级风速", value: 3 },
|
||||
{ label: "4级风速", value: 4 },
|
||||
{ label: "5级风速", value: 5 },
|
||||
{ label: "6级风速", value: 6 },
|
||||
],
|
||||
|
||||
type2show:false,
|
||||
typeList2: [
|
||||
{ label: "自动模式", value: 0 },
|
||||
{ label: "制冷模式", value: 1 },
|
||||
{ label: "制热模式", value: 2 },
|
||||
{ label: "除湿模式", value: 3 },
|
||||
{ label: "送风模式", value: 4 },
|
||||
{ label: "冷暖模式", value: 5 },
|
||||
],
|
||||
};
|
||||
},
|
||||
onReady() {
|
||||
@ -3520,6 +3567,80 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
countData(data) {
|
||||
if (data) {
|
||||
return (data - 400) / 10;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
//失去焦点
|
||||
blurChangeCount(code, el) {
|
||||
var data = {
|
||||
equipmentId: this.deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value * 10 + 400,
|
||||
}; //避免开启多个计时器
|
||||
this.changeData(data);
|
||||
|
||||
},
|
||||
// 空调选择弹窗反选1
|
||||
getData1(data) {
|
||||
var name = "";
|
||||
this.typeList1.forEach((el, index) => {
|
||||
if (el.value == data) {
|
||||
name = el.label;
|
||||
}
|
||||
});
|
||||
return name;
|
||||
},
|
||||
// 空调选择弹窗反选2
|
||||
getData2(data) {
|
||||
var name = "";
|
||||
this.typeList2.forEach((el, index) => {
|
||||
if (el.value == data) {
|
||||
name = el.label;
|
||||
}
|
||||
});
|
||||
return name;
|
||||
},
|
||||
//类型选择
|
||||
handleCommand1(selData) {
|
||||
var code=22041
|
||||
var command=selData[0]
|
||||
// command, code
|
||||
this.typeList1.forEach((el, index) => {
|
||||
if (el.value == command) {
|
||||
this.airconditioningInputDataNew[code] = el.label;
|
||||
}
|
||||
});
|
||||
this.airconditioningInputData[code] = command;
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: command,
|
||||
},
|
||||
};
|
||||
this.changeBtn(code, dataNum);
|
||||
},
|
||||
//制冷制热类型选择
|
||||
handleCommand2(selData) {
|
||||
|
||||
var code=22042
|
||||
var command=selData[0]
|
||||
this.typeList2.forEach((el, index) => {
|
||||
if (el.value == command) {
|
||||
this.airconditioningInputDataNew[code] = el.label;
|
||||
}
|
||||
});
|
||||
this.airconditioningInputData[code] = command;
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: command,
|
||||
},
|
||||
};
|
||||
this.changeBtn(code, dataNum);
|
||||
},
|
||||
// 空调弹框
|
||||
airconditioningHander(index) {
|
||||
this.airconditioningControlIndex = 0;
|
||||
@ -3534,7 +3655,11 @@
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh();
|
||||
this.airconditioningInputData=res.data
|
||||
this.airconditioningInputData[22043] = this.countData(this.airconditioningInputData[22043]);
|
||||
this.getAct22063()
|
||||
this.airconditioningInputDataNew[22041] = this.getData1(this.airconditioningInputData[22041]);
|
||||
this.airconditioningInputDataNew[22042] = this.getData2(this.airconditioningInputData[22042]);
|
||||
|
||||
this.airconditioningControlIndex = res.data[22040];
|
||||
}
|
||||
})
|
||||
@ -3796,6 +3921,15 @@
|
||||
};
|
||||
this.change(type, dataNum);
|
||||
},
|
||||
changeCountData(code, el) {
|
||||
var data = el.target.value * 10 + 400;
|
||||
var sendData = {
|
||||
target: {
|
||||
value: data,
|
||||
},
|
||||
};
|
||||
this.change(code, sendData);
|
||||
},
|
||||
change(code, el) {
|
||||
var data = {
|
||||
equipmentId: this.deviceId,
|
||||
@ -3804,7 +3938,7 @@
|
||||
};
|
||||
this.delayTimer(0, data);
|
||||
},
|
||||
|
||||
|
||||
delayTimer(i, data) {
|
||||
const that = this;
|
||||
//整体接口
|
||||
@ -3881,7 +4015,83 @@
|
||||
.border-none {
|
||||
border: none !important;
|
||||
}
|
||||
.border-top-none{
|
||||
border-top: none!important;
|
||||
}
|
||||
.border-top{
|
||||
border-top: 1rpx solid #DDDDDD;
|
||||
}
|
||||
|
||||
.airconditioning{
|
||||
.input_value{
|
||||
margin-top: 0;
|
||||
justify-content: flex-start;
|
||||
padding: 0 0 0 30rpx;
|
||||
height: 100rpx;
|
||||
&.input-sel{
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
height: auto;
|
||||
>view{
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
.select-label{
|
||||
width: 200rpx;
|
||||
height: 66rpx;
|
||||
background: #F5F6FA;
|
||||
border: 2px solid #E1E2E6;
|
||||
border-radius: 10rpx;
|
||||
margin: 0 20rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.input_value {
|
||||
width: 100%;
|
||||
height: 126rpx;
|
||||
border-top: 1rpx solid #DDDDDD;
|
||||
border-bottom: 1rpx solid #DDDDDD;
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 30rpx;
|
||||
|
||||
input {
|
||||
width: 120rpx;
|
||||
height: 66rpx;
|
||||
background: #F5F6FA;
|
||||
border: 2px solid #E1E2E6;
|
||||
border-radius: 10rpx;
|
||||
margin: 0 20rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
&.input-sel{
|
||||
flex-direction: column;
|
||||
>view{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
.controller {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
@ -4080,9 +4290,9 @@
|
||||
.airconditioning-grid{
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
grid-row-gap: 30rpx; //纵向间隔
|
||||
grid-row-gap: 20rpx; //纵向间隔
|
||||
grid-column-gap: 24rpx; //横向间隔
|
||||
padding: 30rpx 10px 35rpx 10px;
|
||||
padding: 30rpx 10px 15rpx 10px;
|
||||
.btn {
|
||||
width: 130rpx;
|
||||
height: 66rpx;
|
||||
@ -4356,34 +4566,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.input_value {
|
||||
width: 100%;
|
||||
height: 126rpx;
|
||||
border-top: 1rpx solid #DDDDDD;
|
||||
border-bottom: 1rpx solid #DDDDDD;
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 30rpx;
|
||||
|
||||
input {
|
||||
width: 120rpx;
|
||||
height: 66rpx;
|
||||
background: #F5F6FA;
|
||||
border: 2px solid #E1E2E6;
|
||||
border-radius: 10rpx;
|
||||
margin: 0 20rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.model-title {
|
||||
font-size: 28rpx;
|
||||
|
@ -119,6 +119,19 @@
|
||||
</view>
|
||||
<view class="line" v-if="item1.childList_mubiao.length > 0"></view>
|
||||
|
||||
|
||||
<view class="item" v-for="(item2,index2) in item1.childList_1" :key="index2"
|
||||
@click="toTarget_water_fertilizer_PH(item2.equipmentId,item2.environmentData,item2.environmentDataId,item2.equipmentNumber,item2.targetValue,getTypeList(item2.formula),item2.equipmentName)">
|
||||
<image :src="`../../static/icon_new/icon${ item2.formula }.png`" mode=""></image>
|
||||
<view class="info">
|
||||
<view class="">
|
||||
{{ getStatus(item2.equipmentNumber,item2.targetValue) + item2.environmentDataId }}
|
||||
</view>
|
||||
<view class="" :style="item2.equipmentStart == 0 ? 'color:red':''">{{ item2.equipmentStart == 0 ? '故障' : item2.environmentData + getTypeList(item2.formula) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="line" v-if="item1.childList_1.length > 0"></view>
|
||||
|
||||
<view class="item" v-for="(item2,index2) in item1.childList_one" :key="index2"
|
||||
@click="toTarget_water_fertilizer_PH(item2.equipmentId,item2.environmentData,item2.environmentDataId,item2.equipmentNumber,item2.targetValue,getTypeList(item2.formula),item2.equipmentName)">
|
||||
<image :src="`../../static/icon_new/icon${ item2.formula }.png`" mode=""></image>
|
||||
@ -131,6 +144,18 @@
|
||||
</view>
|
||||
<view class="line" v-if="item1.childList_one.length > 0"></view>
|
||||
|
||||
<view class="item" v-for="(item2,index2) in item1.childList_2" :key="index2"
|
||||
@click="toTarget_water_fertilizer_PH(item2.equipmentId,item2.environmentData,item2.environmentDataId,item2.equipmentNumber,item2.targetValue,getTypeList(item2.formula),item2.equipmentName)">
|
||||
<image :src="`../../static/icon_new/icon${ item2.formula }.png`" mode=""></image>
|
||||
<view class="info">
|
||||
<view class="">
|
||||
{{ getStatus(item2.equipmentNumber,item2.targetValue) + item2.environmentDataId }}
|
||||
</view>
|
||||
<view class="" :style="item2.equipmentStart == 0 ? 'color:red':''">{{ item2.equipmentStart == 0 ? '故障' : item2.environmentData + getTypeList(item2.formula) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="line" v-if="item1.childList_2.length > 0"></view>
|
||||
|
||||
<view class="item" v-for="(item2,index2) in item1.childList_two" :key="index2"
|
||||
@click="toTarget_water_fertilizer_PH(item2.equipmentId,item2.environmentData,item2.environmentDataId,item2.equipmentNumber,item2.targetValue,getTypeList(item2.formula),item2.equipmentName)">
|
||||
<image :src="`../../static/icon_new/icon${ item2.formula }.png`" mode=""></image>
|
||||
@ -575,9 +600,9 @@
|
||||
i.childList_2 = res.data.filter(el => (this.getStatus(el.equipmentNumber, el.targetValue)) == '2#平均');
|
||||
|
||||
i.childList_one = res.data.filter(el => (this.getStatus(el.equipmentNumber, el.targetValue)) == (el.equipmentNumber + '#') && el.equipmentNumber == 1);
|
||||
i.childList_one = [...i.childList_1,...i.childList_one];
|
||||
// i.childList_one = [...i.childList_1,...i.childList_one];
|
||||
i.childList_two = res.data.filter(el => (this.getStatus(el.equipmentNumber, el.targetValue)) == (el.equipmentNumber + '#') && el.equipmentNumber == 2);
|
||||
i.childList_two = [...i.childList_2,...i.childList_two]
|
||||
// i.childList_two = [...i.childList_2,...i.childList_two]
|
||||
i.childList_three = res.data.filter(el => (this.getStatus(el.equipmentNumber, el.targetValue)) == (el.equipmentNumber + '#') && el.equipmentNumber == 3);
|
||||
i.childList_four = res.data.filter(el => (this.getStatus(el.equipmentNumber, el.targetValue)) == (el.equipmentNumber + '#') && el.equipmentNumber == 4);
|
||||
i.childList_five = res.data.filter(el => (this.getStatus(el.equipmentNumber, el.targetValue)) == (el.equipmentNumber + '#') && el.equipmentNumber == 5);
|
||||
|
Loading…
x
Reference in New Issue
Block a user