From 340153a53424c3a15b43fbe4e148281c992a88aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?home=E5=AD=99?= <1162067978@qq.com>
Date: Wed, 23 Apr 2025 10:30:16 +0800
Subject: [PATCH] =?UTF-8?q?=E7=A9=BA=E8=B0=83=E5=BC=B9=E7=AA=97=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=E9=80=89=E6=8B=A9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
manifest.json | 1 +
pages/controller/controller.vue | 249 +++++++++++++++++++---
pages/timeEnvironment/timeEnvironment.vue | 29 ++-
3 files changed, 244 insertions(+), 35 deletions(-)
diff --git a/manifest.json b/manifest.json
index 53055e1..5178563 100644
--- a/manifest.json
+++ b/manifest.json
@@ -59,6 +59,7 @@
},
"usingComponents" : true
},
+ "sassImplementationName": "node-sass",
"mp-alipay" : {
"usingComponents" : true
},
diff --git a/pages/controller/controller.vue b/pages/controller/controller.vue
index bdce446..1c16e82 100644
--- a/pages/controller/controller.vue
+++ b/pages/controller/controller.vue
@@ -1423,9 +1423,9 @@
-
-
+
{{ airconditioning.name}}
@@ -1450,6 +1450,29 @@
+
+ 手动设置:
+
+
+ 手动开启空调的温度℃
+
+
+ 手自动设置:
+
+
+
+ 空调的风速
+ {{airconditioningInputDataNew[22041]}}
+
+
+
+
+ 空调的模式
+ {{airconditioningInputDataNew[22042]}}
+
+
+
手自动开启几区空调:
@@ -1511,6 +1534,9 @@
+
+
+
@@ -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;
diff --git a/pages/timeEnvironment/timeEnvironment.vue b/pages/timeEnvironment/timeEnvironment.vue
index 313b5b1..125d50d 100644
--- a/pages/timeEnvironment/timeEnvironment.vue
+++ b/pages/timeEnvironment/timeEnvironment.vue
@@ -119,6 +119,19 @@
+
+
+
+
+
+ {{ getStatus(item2.equipmentNumber,item2.targetValue) + item2.environmentDataId }}
+
+ {{ item2.equipmentStart == 0 ? '故障' : item2.environmentData + getTypeList(item2.formula) }}
+
+
+
+
@@ -131,6 +144,18 @@
+
+
+
+
+ {{ getStatus(item2.equipmentNumber,item2.targetValue) + item2.environmentDataId }}
+
+ {{ item2.equipmentStart == 0 ? '故障' : item2.environmentData + getTypeList(item2.formula) }}
+
+
+
+
@@ -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);