wx-program
wb-zhuangyuehuang-vjzzZ 2024-07-18 15:29:36 +08:00
parent 0f987c5047
commit 62f4f13c66
40 changed files with 1406 additions and 1230 deletions

View File

@ -1036,7 +1036,7 @@
<view class="contentPop lishui-item">
<view class="contentPop_box">
<view class="title">
{{ (popCirculationFengshanName + 1)+"#环流风扇" }}
{{ circulationFengshanList[popCirculationFengshanName].name }}
</view>
</view>
<view class="lishui-content">
@ -1072,7 +1072,7 @@
<view class="contentPop lishui-item">
<view class="contentPop_box">
<view class="title">
{{ (popfanwetcurtainName + 1)+"#湿帘泵" }}
{{ fanwetcurtainList[popfanwetcurtainName].name}}
</view>
</view>
<view class="lishui-content">
@ -1108,7 +1108,7 @@
<view class="contentPop lishui-item">
<view class="contentPop_box">
<view class="title">
{{ (pophighpressuremistName + 1)+"#高压微雾" }}
{{ highpressuremistList[pophighpressuremistName].name}}
</view>
</view>
<view class="lishui-content">
@ -1144,7 +1144,7 @@
<view class="contentPop lishui-item">
<view class="contentPop_box">
<view class="title">
{{ (popoutFlipWindowName + 1)+"#湿帘外翻窗" }}
{{ outFlipWindowList[popoutFlipWindowName].name}}
</view>
</view>
<view class="lishui-content">
@ -1184,7 +1184,7 @@
<view class="contentPop lishui-item">
<view class="contentPop_box">
<view class="title">
{{ (popinnercurtainName + 1)+"#内遮阳" }}
{{ innercurtainList[popinnercurtainName].name }}
</view>
</view>
<view class="lishui-content">
@ -1224,7 +1224,7 @@
<view class="contentPop lishui-item">
<view class="contentPop_box">
<view class="title">
{{ (popexternalsunshadeName + 1)+"#外遮阳" }}
{{externalsunshadeList[popexternalsunshadeName].name}}
</view>
</view>
<view class="lishui-content">
@ -1264,7 +1264,7 @@
<view class="contentPop lishui-item">
<view class="contentPop_box">
<view class="title">
{{ (popairWindowName + 1)+"#通风窗" }}
{{airWindowList[popairWindowName].name}}
</view>
</view>
<view class="lishui-content">
@ -1304,7 +1304,7 @@
<view class="contentPop lishui-item">
<view class="contentPop_box">
<view class="title">
{{ (interiorthermalinsulationName + 1)+"#内保温" }}
{{ interiorthermalinsulationList[interiorthermalinsulationName].name}}
</view>
</view>
<view class="lishui-content">
@ -1344,7 +1344,7 @@
<view class="contentPop lishui-item">
<view class="contentPop_box">
<view class="title">
{{ (upFaceInsulationName + 1)+"#立面保温" }}
{{ upFaceInsulationList[upFaceInsulationName].name}}
</view>
</view>
<view class="lishui-content">
@ -2230,8 +2230,15 @@
let arr = this.txt_act_list.filter(el => el.key == i)
return arr[0][Object.keys(arr[0])[0]]
},
//
toNewList(list, list2) {
let newList = list.map((item, index) => {
// nickName name
const match = list2[index];
return match ? { ...item,id:match.childId, name: match.nickName ? match.nickName : item.name } : item;
});
return newList
},
//
dataInit() {
var deviceId = this.deviceId
@ -2244,6 +2251,45 @@
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)
}else if(el.id=='25'){
//
this.externalsunshadeList=this.toNewList(this.externalsunshadeList,el.child)
}else if(el.id=='24'){
//
this.innercurtainList=this.toNewList(this.innercurtainList,el.child)
}else if(el.id=='27'){
//
this.interiorthermalinsulationList=this.toNewList(this.interiorthermalinsulationList,el.child)
}else if(el.id=='29'){
//
this.upFaceInsulationList=this.toNewList(this.upFaceInsulationList,el.child)
}else if(el.id=='26'){
///湿/湿
el.child.forEach((el1,index1)=>{
if(el1.childId=='20'){
//
this.standardFanStatus.name=el1.nickName
}else if(el1.childId=='21'){
this.fanwetcurtainList.forEach((el2,index2)=>{
el2.name=el.nickName+(index2+1)
})
}else if(el1.childId=='22'){
this.outFlipWindowList.forEach((el2,index2)=>{
el2.name=el.nickName+(index2+1)
})
}
})
}else if(el.id=='21'){
//
this.circulationFengshanList=this.toNewList(this.circulationFengshanList,el.child)
}else if(el.id=='23'){
//
this.highpressuremistList=this.toNewList(this.highpressuremistList,el.child)
}
})
@ -2465,12 +2511,12 @@
//
if(this.purviewList.indexOf('19') != -1){
this.airWindowList.forEach((el,index)=>{
if(el.name == '5#通风窗'){
if(el.childId == '8'){
el.airWindowState = res.data[1188]?res.data[1188]:0;
el.progress = res.data[1190];
el.statusProgress = res.data[1189]
el.pid = res.data[1194]
}else if(el.name == '6#通风窗'){
}else if(el.childId == '9'){
el.airWindowState = res.data[1191]?res.data[1191]:0;
el.progress = res.data[1193];
el.statusProgress = res.data[1192]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -2694,6 +2694,18 @@ var _default = {
});
return arr[0][Object.keys(arr[0])[0]];
},
// 合并两个数组
toNewList: function toNewList(list, list2) {
var newList = list.map(function (item, index) {
// 从第二个数组中获取对应的 nickName 并赋值给 name
var match = list2[index];
return match ? _objectSpread(_objectSpread({}, item), {}, {
id: match.childId,
name: match.nickName ? match.nickName : item.name
}) : item;
});
return newList;
},
// 读取所有寄存器的状态值
dataInit: function dataInit() {
var _this5 = this;
@ -2707,6 +2719,44 @@ var _default = {
uni.stopPullDownRefresh();
res.data.forEach(function (el, index) {
_this5.purviewList.push(el.id.toString());
if (el.id == '19') {
//通风窗
_this5.airWindowList = _this5.toNewList(_this5.airWindowList, el.child);
} else if (el.id == '25') {
//外遮阳
_this5.externalsunshadeList = _this5.toNewList(_this5.externalsunshadeList, el.child);
} else if (el.id == '24') {
//内遮阳
_this5.innercurtainList = _this5.toNewList(_this5.innercurtainList, el.child);
} else if (el.id == '27') {
//内保温
_this5.interiorthermalinsulationList = _this5.toNewList(_this5.interiorthermalinsulationList, el.child);
} else if (el.id == '29') {
//立面保温
_this5.upFaceInsulationList = _this5.toNewList(_this5.upFaceInsulationList, el.child);
} else if (el.id == '26') {
//风机/湿帘泵/湿帘外翻窗
el.child.forEach(function (el1, index1) {
if (el1.childId == '20') {
//风机
_this5.standardFanStatus.name = el1.nickName;
} else if (el1.childId == '21') {
_this5.fanwetcurtainList.forEach(function (el2, index2) {
el2.name = el.nickName + (index2 + 1);
});
} else if (el1.childId == '22') {
_this5.outFlipWindowList.forEach(function (el2, index2) {
el2.name = el.nickName + (index2 + 1);
});
}
});
} else if (el.id == '21') {
//环流风扇
_this5.circulationFengshanList = _this5.toNewList(_this5.circulationFengshanList, el.child);
} else if (el.id == '23') {
//高压微雾
_this5.highpressuremistList = _this5.toNewList(_this5.highpressuremistList, el.child);
}
});
// 控制器状态获取
@ -2929,12 +2979,12 @@ var _default = {
//通风窗
if (_this7.purviewList.indexOf('19') != -1) {
_this7.airWindowList.forEach(function (el, index) {
if (el.name == '5#通风窗') {
if (el.childId == '8') {
el.airWindowState = res.data[1188] ? res.data[1188] : 0;
el.progress = res.data[1190];
el.statusProgress = res.data[1189];
el.pid = res.data[1194];
} else if (el.name == '6#通风窗') {
} else if (el.childId == '9') {
el.airWindowState = res.data[1191] ? res.data[1191] : 0;
el.progress = res.data[1193];
el.statusProgress = res.data[1192];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long