From f1b90810cdc08ba186f32a0d1acf7a69fc84e9a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=99=E8=90=8C?= <525441437@qq.com>
Date: Thu, 7 Dec 2023 10:17:59 +0800
Subject: [PATCH 1/3] 1
---
src/views/wufang/downtake.vue | 4 ++--
src/views/wufang/rollByRoll.vue | 27 ++++++++++++++++-----------
src/views/wufang/uptake.vue | 6 +++---
src/views/wufang/waterPump.vue | 2 +-
4 files changed, 22 insertions(+), 17 deletions(-)
diff --git a/src/views/wufang/downtake.vue b/src/views/wufang/downtake.vue
index 55dce66..dfbca1b 100644
--- a/src/views/wufang/downtake.vue
+++ b/src/views/wufang/downtake.vue
@@ -50,13 +50,13 @@
秒
-
关闭的输出通道
+
关闭的通道
diff --git a/src/views/wufang/rollByRoll.vue b/src/views/wufang/rollByRoll.vue
index 571fbe4..f53a13a 100644
--- a/src/views/wufang/rollByRoll.vue
+++ b/src/views/wufang/rollByRoll.vue
@@ -228,24 +228,29 @@ export default {
getStatus(data) {
this.api.getControlGetState(data).then(res => {
if (res.data.code == 200) {
- this.sunrise = this.convertToTimeMinutes(res.data.data['1021'])
- this.sunset = this.convertToTimeMinutes(res.data.data['1022'])
+ this.sunrise = this.insertColonEveryTwoDigits(this.convertToTimeMinutes(res.data.data['1021']))
+ this.sunset = this.insertColonEveryTwoDigits(this.convertToTimeMinutes(res.data.data['1022']))
}
})
},
//16进制转为时间 16位无符号高字节是时,低字节是分
convertToTimeMinutes(hexValue) {
- // 将 16 进制字符串转换为 16 进制数值
- const intValue = hexValue
+ // 将十进制数转换为16进制字符串
+ let hexString = hexValue.toString(16);
- // 提取高字节(小时)和低字节(分钟)
- const hours = (intValue >> 8) & 0xFF;
- const minutes = intValue & 0xFF;
+// 补零,确保结果是4位16进制数
+while (hexString.length < 4) {
+ hexString = '0' + hexString;
+}
- // 格式化为时:分的字符串
- const formattedTime = `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}`;
-
- return formattedTime;
+return hexString;
+
+ },
+ insertColonEveryTwoDigits(inputString) {
+ // 使用正则表达式将字符串每两位切割
+ const chunks = inputString.match(/.{1,2}/g);
+ return chunks.join(':')
+ // 使用join方法将切割后的数组元素用冒号连接起来
},
dataInit() {
var store = this.$store.state
diff --git a/src/views/wufang/uptake.vue b/src/views/wufang/uptake.vue
index 21a029a..ff3ace9 100644
--- a/src/views/wufang/uptake.vue
+++ b/src/views/wufang/uptake.vue
@@ -56,7 +56,7 @@
-
收拢的输出通道
+
关闭的通道
diff --git a/src/views/wufang/waterPump.vue b/src/views/wufang/waterPump.vue
index ff103ed..e964a2e 100644
--- a/src/views/wufang/waterPump.vue
+++ b/src/views/wufang/waterPump.vue
@@ -44,7 +44,7 @@
室内1#平均温度夜间时段高于
-
℃启动
+
停止
From 434a5c2330599722f4a13fa199424c86166913ab Mon Sep 17 00:00:00 2001
From: pangdundun <664790274@qq.com>
Date: Thu, 7 Dec 2023 10:37:36 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=9C=E5=8C=97code?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/page/largeScreen.vue | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
diff --git a/src/views/page/largeScreen.vue b/src/views/page/largeScreen.vue
index fbfae0e..5c00770 100644
--- a/src/views/page/largeScreen.vue
+++ b/src/views/page/largeScreen.vue
@@ -700,7 +700,7 @@ export default {
},
methods: {
// 根据用户id查询对应的设备大数据信息
- dataInit(userid) {
+ dataInit(userid,limitUserId) {
this.api.Bigdata_getAllControl(userid).then((res) => {
// console.log('根据用户id查询对应的设备大数据信息', res);
this.dataList = res.data.data;
@@ -722,11 +722,22 @@ export default {
// this.get_environmentData(el.deviceId)
// this.get_readControl_getState(el.deviceId)
});
- this.get_weather_echart_data(2023042214250027);
- this.get_thisWeekTemperature_echart_data(2023042214250027);
- this.get_environmentData(2023042214250027);
- this.get_readControl_getState(2023042214250027);
- this.getWeatherData(2023042214250027);
+ if(limitUserId == 1){
+ // 丽水
+ this.get_weather_echart_data(2023042214250027);
+ this.get_thisWeekTemperature_echart_data(2023042214250027);
+ this.get_environmentData(2023042214250027);
+ this.get_readControl_getState(2023042214250027);
+ this.getWeatherData(2023042214250027);
+ }else if(limitUserId == 2){
+ // 东北
+ this.get_weather_echart_data(2023112911050004);
+ this.get_thisWeekTemperature_echart_data(2023112911050004);
+ this.get_environmentData(2023112911050004);
+ this.get_readControl_getState(2023112911050004);
+ this.getWeatherData(2023112911050004);
+ }
+
}
});
},
@@ -949,7 +960,7 @@ export default {
// })
let userInfo = JSON.parse(localStorage.getItem("userInfo"));
- this.dataInit(userInfo.userid);
+ //this.dataInit(userInfo.userid);
this.get_sel_eqbyid(userInfo.userid);
// 获取用户id权限
@@ -973,8 +984,10 @@ export default {
this.limitUserId = res.data.data[0].id;
if(this.limitUserId == 1){
this.drag_boxHandler();
+ this.dataInit(userId,this.limitUserId);
}else if(this.limitUserId == 2){
this.drag_boxHandler1();
+ this.dataInit(userId,this.limitUserId);
}
}
})
@@ -1500,6 +1513,7 @@ export default {
width: 3.98rem;
height: 3.08rem;
overflow: hidden;
+ padding-top: 0.15rem;
.title_child {
width: 100%;
From f3bce25c7313e21dc713f769430869c3b3df4f26 Mon Sep 17 00:00:00 2001
From: pangdundun <664790274@qq.com>
Date: Thu, 7 Dec 2023 16:22:38 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=B3=E4=B8=8B?=
=?UTF-8?q?=E8=A7=92=E6=A8=A1=E5=9D=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/page/largeScreen.vue | 154 ++++++++++++++++++++++++++-------
1 file changed, 124 insertions(+), 30 deletions(-)
diff --git a/src/views/page/largeScreen.vue b/src/views/page/largeScreen.vue
index 5c00770..03020a8 100644
--- a/src/views/page/largeScreen.vue
+++ b/src/views/page/largeScreen.vue
@@ -102,9 +102,13 @@
@@ -138,12 +142,12 @@
-
- {{ item.greenhouseName + "温室" }}
+ {{ item.greenhouseName + (limitUserId == 1 ? "温室" : '') }}
@@ -158,7 +162,9 @@
-
+
+
+
风机
@@ -224,6 +230,30 @@
+
+
+
+
+
+
+
{{ item.title }}
+
+
{{item.controlState == 1 ? "自动控制" : "手机控制"}}
+
+
进度{{ item.progress }}%
+
菜单
+
+
+
+
{{ item.title }}
+
+
无效
+
+
菜单
+
+
+
+
@@ -269,6 +299,7 @@ export default {
content_item_current: -1,
current: 5,
+ current1: 1,
dataList: [
// "一号温室", "二号温室", "三号温室", "四号温室", "五号温室", "六号温室"
@@ -680,12 +711,56 @@ export default {
},
],
- limitUserId:''
+ limitUserId: '',
+
+
+ // 东北
+ fiveControlList: [{
+ title: '加温水泵',
+ controlState: 0,
+ num: '1000',
+ close_btn: false
+ },
+ {
+ title: '地热风机',
+ controlState: 0,
+ num: '1002',
+ close_btn: false
+ },
+ {
+ title: '上风口',
+ controlState: 0,
+ num: '1004',
+ close_btn: true,
+ progress_num: '1006',
+ progress: ''
+ },
+ {
+ title: '下风口',
+ controlState: 0,
+ num: '1007',
+ close_btn: true,
+ progress_num: '1009',
+ progress: ''
+ },
+ {
+ title: '卷被',
+ controlState: 0,
+ num: '1010',
+ close_btn: true
+ },
+ {
+ title: '除雪',
+ controlState: 0,
+ num: '1013',
+ close_btn: false
+ },
+ ]
};
},
mounted() {
-
-
+
+
this.login();
@@ -700,7 +775,7 @@ export default {
},
methods: {
// 根据用户id查询对应的设备大数据信息
- dataInit(userid,limitUserId) {
+ dataInit(userid, limitUserId) {
this.api.Bigdata_getAllControl(userid).then((res) => {
// console.log('根据用户id查询对应的设备大数据信息', res);
this.dataList = res.data.data;
@@ -722,14 +797,14 @@ export default {
// this.get_environmentData(el.deviceId)
// this.get_readControl_getState(el.deviceId)
});
- if(limitUserId == 1){
+ if (limitUserId == 1) {
// 丽水
this.get_weather_echart_data(2023042214250027);
this.get_thisWeekTemperature_echart_data(2023042214250027);
this.get_environmentData(2023042214250027);
this.get_readControl_getState(2023042214250027);
this.getWeatherData(2023042214250027);
- }else if(limitUserId == 2){
+ } else if (limitUserId == 2) {
// 东北
this.get_weather_echart_data(2023112911050004);
this.get_thisWeekTemperature_echart_data(2023112911050004);
@@ -737,7 +812,7 @@ export default {
this.get_readControl_getState(2023112911050004);
this.getWeatherData(2023112911050004);
}
-
+
}
});
},
@@ -869,7 +944,6 @@ export default {
}, 100);
}
});
- // console.log(this.get_sel_eqbyid_list);
});
},
@@ -918,8 +992,16 @@ export default {
this.statusList.push(statusData);
}
// console.log(this.statusList);
+
+ // 五防项目状态
+ this.fiveControlList.forEach(el => {
+ el.controlState = res.data.data[el.num];
+ if(el.progress_num){
+ el.progress = res.data.data[el.progress_num];
+ }
+ })
}
- });
+ });0
},
// 获取天气预报数据
@@ -978,16 +1060,16 @@ export default {
},
// 获取用户id权限
- get_user_getjurisdiction(userId){
- this.api.user_getjurisdiction(userId).then(res=>{
- if(res.data.code == 200){
+ get_user_getjurisdiction(userId) {
+ this.api.user_getjurisdiction(userId).then(res => {
+ if (res.data.code == 200) {
this.limitUserId = res.data.data[0].id;
- if(this.limitUserId == 1){
+ if (this.limitUserId == 1) {
this.drag_boxHandler();
- this.dataInit(userId,this.limitUserId);
- }else if(this.limitUserId == 2){
+ this.dataInit(userId, this.limitUserId);
+ } else if (this.limitUserId == 2) {
this.drag_boxHandler1();
- this.dataInit(userId,this.limitUserId);
+ this.dataInit(userId, this.limitUserId);
}
}
})
@@ -1061,8 +1143,10 @@ export default {
getCurrent(index, item) {
this.current = index;
+ this.current1 = index;
// console.log(item,'00000000000000');
- this.get_readControl_getState(item.deviceId);
+ // this.get_readControl_getState(item.deviceId);
+ this.get_readControl_getState(2023112911050004);
},
drag_boxHandler() {
@@ -1618,7 +1702,7 @@ export default {
transform: translate(-50%, -50%);
overflow: hidden;
- .drag_box1{
+ .drag_box1 {
width: 100%;
height: 100%;
position: absolute;
@@ -1640,7 +1724,7 @@ export default {
transparent 97%);
}
- .axis_init{
+ .axis_init {
width: 0.4rem;
height: 0.5rem;
position: absolute;
@@ -1648,13 +1732,14 @@ export default {
z-index: 99;
}
- .axis_init1{
+ .axis_init1 {
width: 0.4rem;
height: 0.5rem;
position: absolute;
z-index: 99;
}
}
+
.drag_box {
width: 100%;
height: 100%;
@@ -1999,7 +2084,17 @@ export default {
// margin-right: 0.47rem;
// }
- >span:nth-child(6) {
+ .progress{
+ width: 18%;
+ font-size: 0.14rem;
+ font-style: normal;
+ font-family: MicrosoftYaHei;
+ font-weight: 400;
+ color: #7ae1ff;
+ margin-right: 0.47rem;
+ }
+
+ >span:nth-child(6),>span:nth-child(7) {
width: 0.66rem;
height: 0.3rem;
background: linear-gradient(-35deg,
@@ -2133,5 +2228,4 @@ export default {
}
}
}
-}
-
+}