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] =?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%;