diff --git a/src/views/page/largeScreen.vue b/src/views/page/largeScreen.vue index fbfae0e..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) { + dataInit(userid, limitUserId) { this.api.Bigdata_getAllControl(userid).then((res) => { // console.log('根据用户id查询对应的设备大数据信息', res); this.dataList = res.data.data; @@ -722,11 +797,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); + } + } }); }, @@ -858,7 +944,6 @@ export default { }, 100); } }); - // console.log(this.get_sel_eqbyid_list); }); }, @@ -907,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 }, // 获取天气预报数据 @@ -949,7 +1042,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权限 @@ -967,14 +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(); - }else if(this.limitUserId == 2){ + this.dataInit(userId, this.limitUserId); + } else if (this.limitUserId == 2) { this.drag_boxHandler1(); + this.dataInit(userId, this.limitUserId); } } }) @@ -1048,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() { @@ -1500,6 +1597,7 @@ export default { width: 3.98rem; height: 3.08rem; overflow: hidden; + padding-top: 0.15rem; .title_child { width: 100%; @@ -1604,7 +1702,7 @@ export default { transform: translate(-50%, -50%); overflow: hidden; - .drag_box1{ + .drag_box1 { width: 100%; height: 100%; position: absolute; @@ -1626,7 +1724,7 @@ export default { transparent 97%); } - .axis_init{ + .axis_init { width: 0.4rem; height: 0.5rem; position: absolute; @@ -1634,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%; @@ -1985,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, @@ -2119,5 +2228,4 @@ export default { } } } -} - +} diff --git a/src/views/page/largeScreen1.vue b/src/views/page/largeScreen1.vue index edd28f3..6b18094 100644 --- a/src/views/page/largeScreen1.vue +++ b/src/views/page/largeScreen1.vue @@ -119,7 +119,7 @@
-
温室{{ item.greenhouseName }}#
+
{{ item.greenhouseName }}
@@ -175,7 +175,7 @@
-
温室{{ item.greenhouseName }}#
+
{{ item.greenhouseName }}
@@ -699,7 +699,7 @@ export default { getTopOrLeft1(id) { for(let i = 0; i < 26;i++){ if(id == (i + 1)){ - return `top:34%;left:${(74 - i * 3) < 15 ? 15 : (74 - i * 3)}%;transform: translate(-50%,-50%);`; + return `top:40%;left:${(74 - i * 3) < 15 ? 15 : (74 - i * 3)}%;transform: translate(-50%,-50%);`; } } // if (id == 1) { @@ -792,11 +792,12 @@ export default { // }) let userInfo = JSON.parse(localStorage.getItem("userInfo")); - this.dataInit(userInfo.userid); // 获取用户id权限 this.get_user_getjurisdiction(userInfo.userid) + this.dataInit(userInfo.userid); + let that = this; this.autoPlay = JSON.parse(localStorage.getItem("autoPlay")); if (this.autoPlay == false) { @@ -1244,8 +1245,8 @@ export default { } .pop_content1 { - width: 2.5rem; - height: 3rem; + width: 3.5rem; + height: 4.55rem; background: url("../../assets/img/pop_bg.png") center no-repeat; background-size: 100% 100%; overflow: hidden; @@ -1264,7 +1265,7 @@ export default { .p_video { width: 90%; - height: 1.2rem; + height: 1.82rem; margin: 0.1rem auto 0; >img { @@ -1275,18 +1276,18 @@ export default { .text { width: 100%; - height: 0.3rem; - font-size: 0.15rem; + height: 0.4rem; + font-size: 0.2rem; font-family: AlimamaShuHeiTi-Bold; font-weight: bold; color: #f3fdff; - line-height: 0.3rem; + line-height: 0.4rem; box-sizing: border-box; - padding-left: 0.15rem; + padding-left: 0.2rem; } .line { - width: 2.2rem; + width: 90%; height: 0.01rem; background: #51d4fa; opacity: 0.5; @@ -1295,31 +1296,31 @@ export default { .detail { width: 100%; - height: 0.3rem; + height: 0.45rem; display: flex; align-items: center; justify-content: space-evenly; padding: 0 0.15rem; .d_item { - height: 0.2rem; + height: 0.3rem; background: rgba(81, 212, 250, 0.15); border: 0.01rem solid rgba(106, 222, 255, 0.4); border-radius: 0.02rem; display: flex; justify-content: center; - align-items: center; + // align-items: center; box-sizing: border-box; - padding: 0 0.05rem; + padding: 0.05rem 0.05rem; >img { - width: 0.1rem; - height: 0.1rem; + width: 0.2rem; + height: 0.2rem; margin-right: 0.05rem; } >span { - font-size: 0.12rem; + font-size: 0.13rem; font-family: MicrosoftYaHei; font-weight: 400; color: #d9effd; @@ -1329,7 +1330,7 @@ export default { .grow { width: 2.5rem; - height: 0.2rem; + height: 0.3rem; background: url("../../assets/img/grow_bg.png") center no-repeat; background-size: 100% 100%; margin: 0 auto; @@ -1338,20 +1339,20 @@ export default { align-items: center; >img { - width: 0.15rem; - height: 0.15rem; + width: 0.18rem; + height: 0.18rem; margin-right: 0.05rem; } >span:nth-child(2) { - font-size: 0.12rem; + font-size: 0.13rem; font-family: MicrosoftYaHei; font-weight: 400; color: #ffffff; } >span:nth-child(3) { - font-size: 0.12rem; + font-size: 0.13rem; font-family: MicrosoftYaHei; font-weight: 400; color: #36ffd2; @@ -1359,8 +1360,8 @@ export default { } .icon_item { - width: 95%; - height: calc(100% - 2.22rem); + width: 100%; + height: calc(100% - 3.22rem); box-sizing: border-box; padding: 0.1rem 0.15rem; display: flex; @@ -1369,14 +1370,14 @@ export default { overflow: auto; .icon_item_child { - width: 50%; - height: 45%; + width: 33.33%; + height: 33.33%; display: flex; margin-bottom: 0.05rem; > img { - width: 0.28rem; - height: 0.28rem; + width: 0.4rem; + height: 0.4rem; margin-right: 0.05rem; } @@ -1385,14 +1386,14 @@ export default { flex-direction: column; > span:nth-child(1) { - font-size: 0.1rem; + font-size: 0.12rem; font-family: MicrosoftYaHei; font-weight: bold; color: #86d9ff; } > span:nth-child(2) { - font-size: 0.11rem; + font-size: 0.15rem; font-family: AlibabaPuHuiTiB; font-weight: bold; color: #ffffff;