From fce82d7d91930a7b507c12546c0d3066e44f5abe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Thu, 11 May 2023 17:49:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4=E9=80=89?= =?UTF-8?q?=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/js/Iot-ui/sensorTableList.js | 7 +- .../templates/iot-ui/sensorSummary.html | 80 ++-- .../templates/record/recordAlarm/add.html | 14 +- .../record/recordAlarm/recordAlarm.html | 2 +- .../recordSensorData/recordSensorData.html | 389 +++++++++--------- .../recordSensorData/temperatureTrend.html | 2 +- 6 files changed, 251 insertions(+), 243 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/js/Iot-ui/sensorTableList.js b/ruoyi-admin/src/main/resources/static/js/Iot-ui/sensorTableList.js index 575ec60..84ffcda 100644 --- a/ruoyi-admin/src/main/resources/static/js/Iot-ui/sensorTableList.js +++ b/ruoyi-admin/src/main/resources/static/js/Iot-ui/sensorTableList.js @@ -158,11 +158,12 @@ const onSearchByCollectTime = function (obj) { setTimeout(function () { var storeId = document.getElementById('table'); var rowsLength = storeId.rows.length; - var key = obj.value; + var [startTime,endTime] = obj.value.split(' - '); var searchCol = storeId.rows.item(0).cells.length-3; for (var i = 1; i < rowsLength; i++) { var searchText = storeId.rows[i].cells[searchCol].innerHTML; - if (searchText.match(key)) { + console.log(searchText) + if ((new Date(searchText).getTime() >= new Date(startTime).getTime()) && (new Date(searchText).getTime() <= new Date(endTime).getTime())) { storeId.rows[i].style.display = ''; } else { storeId.rows[i].style.display = 'none'; @@ -173,4 +174,4 @@ const onSearchByCollectTime = function (obj) { const historyButton = function(id) { location.href = '/record/recordSensorData/getPage?id='+id; -} \ No newline at end of file +} diff --git a/ruoyi-admin/src/main/resources/templates/iot-ui/sensorSummary.html b/ruoyi-admin/src/main/resources/templates/iot-ui/sensorSummary.html index 6a34098..5f340b2 100644 --- a/ruoyi-admin/src/main/resources/templates/iot-ui/sensorSummary.html +++ b/ruoyi-admin/src/main/resources/templates/iot-ui/sensorSummary.html @@ -1,49 +1,52 @@ - +
- -