From 8aac7c2218d64199c30aa890052642f1214dec51 Mon Sep 17 00:00:00 2001 From: fl <3098731433@qq.com> Date: Thu, 24 Jul 2025 17:14:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E9=80=89=E6=8B=A9=E6=A1=86?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/pages/newDataAnalysis/environDetection.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/js/pages/newDataAnalysis/environDetection.js b/js/pages/newDataAnalysis/environDetection.js index cff24da..f59d360 100644 --- a/js/pages/newDataAnalysis/environDetection.js +++ b/js/pages/newDataAnalysis/environDetection.js @@ -7,12 +7,8 @@ layui.use(['layer', 'table', 'form', 'laydate'], function () { form = layui.form; var laydate = layui.laydate; - // 获取当前日期和小时 - var now = new Date(); - var defaultDate = now.getFullYear() + '-' + - ('0' + (now.getMonth() + 1)).slice(-2) + '-' + - ('0' + now.getDate()).slice(-2); - var defaultHour = ('0' + now.getHours()).slice(-2); + var defaultDate = '2025-03-14'; + var defaultHour = '00'; // 初始化日期选择器 laydate.render({ @@ -22,6 +18,7 @@ layui.use(['layer', 'table', 'form', 'laydate'], function () { theme: '#00C6BE', trigger: 'click', value: defaultDate, + max: '2025-03-14', done: function(value, date, endDate){ // 选中日期后的回调,自动查询 initEcharts(); @@ -137,14 +134,14 @@ function getEnvironment(obj) { const humidityStandard = 75 const airQualityIndexStandard = 75 const noiseLevelStandard = 90 - const illuminationStandard = 1200 + const illuminationStandard = 100000 const slopeDisplacementDanger = 1.2 const temperatureDanger = 40 const humidityDanger = 85 const airQualityIndexDanger = 100 const noiseLevelDanger = 110 - const illuminationDanger = 1500 + const illuminationDanger = 110000 // 状态判断逻辑 function getStatus(value, standard, danger) {