From 0be514d695bf428b37b5c2467d36573c51b76415 Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Fri, 19 Apr 2024 17:05:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E6=97=B6=E7=9B=91=E6=B5=8B=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/operEnvironment/operEnvironment.css | 60 +++++++++++++++++---- js/consQuality/consQuality.js | 9 +++- js/operEnvironment/operEnvironment.js | 55 +++++++++++++------ js/pages/towerAssInspect/towerAssInspect.js | 3 +- pages/operEnvironment/operEnvironment.html | 36 ++----------- 5 files changed, 98 insertions(+), 65 deletions(-) diff --git a/css/operEnvironment/operEnvironment.css b/css/operEnvironment/operEnvironment.css index 189e1d5..318c3a3 100644 --- a/css/operEnvironment/operEnvironment.css +++ b/css/operEnvironment/operEnvironment.css @@ -47,7 +47,7 @@ body { /* 表格头部背景色 */ th { - background-color: #278178; /* MediumSeaGreen */ + background-color: #184B49; /* MediumSeaGreen */ color: #fff; font-weight: bold } @@ -58,39 +58,39 @@ th { } .layui-laypage .layui-laypage-curr .layui-laypage-em { - background-color: #278178; + background-color: #184B49; } .layui-laypage a:hover { - color: #278178; + color: #184B49; } .layui-laypage .layui-laypage-skip { - color: #3ACAB8; + color: #16534c; } .layui-laypage-count{ - color:#278178; + color:#184B49; } .layui-laypage button, .layui-laypage input { background-color: transparent; - border: #278178 1px solid; - color: #278178; + border: #184B49 1px solid; + color: #184B49; } .layui-table-view select[lay-ignore] { background-color: transparent; - border: #278178 1px solid; - color: #278178; + border: #184B49 1px solid; + color: #184B49; } .layui-table-page .layui-laypage span { - color: #278178; + color: #184B49; } .layui-table-page .layui-laypage a, .layui-table-page .layui-laypage span.layui-laypage-curr { - color: #278178; + color: #184B49; } /**公共类**/ @@ -306,6 +306,43 @@ th { color: #e24e3b; } +#flex-Box{ + width: 100%; + height: 75%; + display: flex; + flex-wrap: wrap; + overflow-y: auto; +} + +.monitor-item{ + width: 30%; + height: 105px; + margin-bottom: 10px; + display: flex; + flex-direction: column; + justify-content: space-around; + align-items:center; +} +.monitor-item p:nth-child(1) span:nth-child(1) { + font-size: 24px; + color: #79FFFFFF; + font-weight: bold; +} + +.monitor-item p:nth-child(1) span:nth-child(2) { + margin-left: 5px; + color: #79FFFFFF; +} +.item-icon{ + width: 100%; + height: 60%; + background: url("../../img/index/pm10.png") no-repeat 0 0 / 100% 100%; + background-position: center center !important; + background-size: initial; +} +.redColor{ + color: red !important; +} .monitor-data { width: 28%; height: 83%; @@ -314,6 +351,7 @@ th { justify-content: space-around; } + .monitor-data p:nth-child(1) span:nth-child(1) { font-size: 24px; color: #79FFFFFF; diff --git a/js/consQuality/consQuality.js b/js/consQuality/consQuality.js index 7c1f810..355d3a5 100644 --- a/js/consQuality/consQuality.js +++ b/js/consQuality/consQuality.js @@ -295,6 +295,12 @@ function ConstructionQualityList(deviceId){ //渲染历史记录table function initHistory(){ const url = commonUrl + "screen/largeScreen/constructionQuality/getHistoryList"; + let times = '' + if($('#ID-laydate-start-date-1').val()!=''){ + times = $('#ID-laydate-start-date-1').val()+' - '+ $('#ID-laydate-end-date-1').val() + }else{ + times = '' + } historyTableIns = table.render({ elem: '#tableDialog', url: url, @@ -310,8 +316,7 @@ function initHistory(){ userId: userId, bidCode: bidCode, deviceName:$('#deviceName').val(), - times: $('#ID-laydate-start-date-1').val()+' - '+ $('#ID-laydate-end-date-1').val(), - + times: times, }, cols: [[ {type: 'numbers', title: '序号'}, // 添加序号列 diff --git a/js/operEnvironment/operEnvironment.js b/js/operEnvironment/operEnvironment.js index ba8b79a..bc7527f 100644 --- a/js/operEnvironment/operEnvironment.js +++ b/js/operEnvironment/operEnvironment.js @@ -25,10 +25,15 @@ layui.use(['layer', 'element', 'table'], function () { //实时监测 function realTimeMonitoring(){ - const paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId; - let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData); - const url = commonUrl + 'screen/largeScreen/xcIndex/getProJcData?params=' + montageParam; - ajaxRequestGet(url, "GET", true, function () { + const url = commonUrl + "screen/largeScreen/operatingEnvironment/RealTimeMonitoring"; + const params = { + "bidCode": bidCode, + "roleCode": roleCode, + "orgId": orgId, + "userId": userId + } + let encryptStr = encryptCBC(JSON.stringify(params)); + ajaxRequest(url, "POST", encryptStr, true, function () { }, function (result) { if (result.code === 200) { setData(result.data); @@ -41,25 +46,41 @@ function realTimeMonitoring(){ }, function (xhr, status, error) { error(xhr, status, error) setData(null); - }, aqEnnable); + }, "application/json", aqEnnable); /* 实时检测赋值 */ function setData(data) { if (data && data.length > 0) { $.each(data, function (index, item) { - if (item.modelName === '温度') { - $('#wd').html(item.val ? item.val : 0); - } else if (item.modelName === '湿度') { - $('#sd').html(item.val ? item.val : 0); - } else if (item.modelName === '噪声') { - $('#zs').html(item.val ? item.val : 0); - } else if (item.modelName === '光照') { - $('#gz').html(item.val ? item.val : 0); - } else if (item.modelName === 'pm2') { - $('#pm2').html(item.val ? item.val : 0); - } else if (item.modelName === 'pm10') { - $('#pm10').html(item.val ? item.val : 0); + var itemHtml = '' + if(item.isWarn=='0'){ + itemHtml = `
+

${item.val}${item.unit}

+

${item.dataType}

+
+
` + }else if(item.isWarn=='1'){ + itemHtml = `
+

${item.val}${item.unit}

+

${item.dataType}

+
+
` } + + $("#flex-Box").append(itemHtml) + // if (item.modelName === '温度') { + // $('#wd').html(item.val ? item.val : 0); + // } else if (item.modelName === '湿度') { + // $('#sd').html(item.val ? item.val : 0); + // } else if (item.modelName === '噪声') { + // $('#zs').html(item.val ? item.val : 0); + // } else if (item.modelName === '光照') { + // $('#gz').html(item.val ? item.val : 0); + // } else if (item.modelName === 'pm2') { + // $('#pm2').html(item.val ? item.val : 0); + // } else if (item.modelName === 'pm10') { + // $('#pm10').html(item.val ? item.val : 0); + // } }) } } diff --git a/js/pages/towerAssInspect/towerAssInspect.js b/js/pages/towerAssInspect/towerAssInspect.js index 5ce3235..bb3e191 100644 --- a/js/pages/towerAssInspect/towerAssInspect.js +++ b/js/pages/towerAssInspect/towerAssInspect.js @@ -93,8 +93,7 @@ function getInfo(deviceId){ function getRealTimeDetection(deviceId){ let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '&deviceId=' + deviceId; let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData); - // const url = commonUrl + "screen/largeScreen/towerAssInspect/getRealTimeDetection?params="+montageParam; // url - const url = commonUrl + "screen/largeScreen/operatingEnvironment/RealTimeMonitoring?params="+montageParam; // url + const url = commonUrl + "screen/largeScreen/towerAssInspect/getRealTimeDetection?params="+montageParam; // url ajaxRequestGet(url, "get", true, function () { }, function (result) { let html = ''; diff --git a/pages/operEnvironment/operEnvironment.html b/pages/operEnvironment/operEnvironment.html index e80f6e7..01c91f7 100644 --- a/pages/operEnvironment/operEnvironment.html +++ b/pages/operEnvironment/operEnvironment.html @@ -75,40 +75,10 @@
正常
异常
-
-
-

0

-

温度

-
-
-
-

0%

-

湿度

-
-
-
-

0分贝

-

噪声

-
-
-
-
-
-

0kwh

-

光照

-
-
-
-

0μg/m³

-

PM2.5

-
-
-
-

0μg/m³

-

PM10

-
-
+
+
+