From dfb5a00d7e744ce4e1696d88e264d652f4153933 Mon Sep 17 00:00:00 2001 From: jiang Date: Thu, 24 Jul 2025 18:16:13 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E8=8A=82=E8=83=BD=E5=87=8F=E6=8E=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/newDataAnalysis/energySavingAnalysis.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pages/newDataAnalysis/energySavingAnalysis.html b/pages/newDataAnalysis/energySavingAnalysis.html index 7e7b285..f192519 100644 --- a/pages/newDataAnalysis/energySavingAnalysis.html +++ b/pages/newDataAnalysis/energySavingAnalysis.html @@ -84,7 +84,8 @@ .layui-layer-title { border-bottom: 1px solid #008781; } - .layui-laydate-preview{ + + .layui-laydate-preview { color: #FFFFFF !important; } @@ -186,11 +187,13 @@ laydate = layui.laydate; let range = getDateRangeOneWeek(); + range.startDate = "2024-09-17" + range.endDate = "2024-09-24" laydate.render({ elem: '#ID-laydate-range', range: ['#ID-laydate-start-date', '#ID-laydate-end-date'], btns: ['confirm'], - value: "2024-09-17" + ' - ' + "2024-09-24", + value: range.startDate + ' - ' + range.endDate, done: function (value) { // value 是选择的字符串,比如 '2025-06-23 - 2025-07-23' const [startDateStr, endDateStr] = value.split(" - "); From 6632a03f50a58a59e9ffbdbf40006e0407ac654a Mon Sep 17 00:00:00 2001 From: fl <3098731433@qq.com> Date: Thu, 24 Jul 2025 18:25:53 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/pages/newDataAnalysis/environDetection.js | 49 ++++++++++++++++---- 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/js/pages/newDataAnalysis/environDetection.js b/js/pages/newDataAnalysis/environDetection.js index 152168c..5f1640a 100644 --- a/js/pages/newDataAnalysis/environDetection.js +++ b/js/pages/newDataAnalysis/environDetection.js @@ -53,18 +53,49 @@ function initEcharts() { const url = commonUrl + "screen/largeScreen/environment/getEnvironmentList?currentDay=" + currentDay + "&hour=" + hour + "&proId=" + bidCode; ajaxRequest(url, "get", null , true, function () { }, function (result) { - if (result.code === 200) { - console.log(result.data); - initEchartsOne(result.data); - } else if (result.code === 500) { - layer.msg(result.msg, { icon: 2 }); - } + if (result.code === 200 && result.data) { + initEchartsOne(result.data); + } else { + layer.msg('暂无数据', { + icon: 0 + }); + clearEchartsAndData(); + } }, function (xhr) { layer.msg(xhr, { icon: 2 }); }); } +function clearEchartsAndData() { + // 清空echarts实例 + if (window.trendChart) { + window.trendChart.dispose(); + window.trendChart = null; + } + if (window.gisChart) { + window.gisChart.dispose(); + window.gisChart = null; + } + if (window.spaceChart) { + window.spaceChart.dispose(); + window.spaceChart = null; + } + // 清空六大指标数据 + $('#slopeDisplacementValue').text('--'); + $('#slopeDisplacementStatus').text('--').removeClass().addClass('px-1.5 py-0.5 rounded-full text-xs bg-gray-200 text-gray-400'); + $('#temperatureValue').text('--'); + $('#temperatureStatus').text('--').removeClass().addClass('px-1.5 py-0.5 rounded-full text-xs bg-gray-200 text-gray-400'); + $('#humidityValue').text('--'); + $('#humidityStatus').text('--').removeClass().addClass('px-1.5 py-0.5 rounded-full text-xs bg-gray-200 text-gray-400'); + $('#airQualityIndexValue').text('--'); + $('#airQualityIndexStatus').text('--').removeClass().addClass('px-1.5 py-0.5 rounded-full text-xs bg-gray-200 text-gray-400'); + $('#noiseLevelValue').text('--'); + $('#noiseLevelStatus').text('--').removeClass().addClass('px-1.5 py-0.5 rounded-full text-xs bg-gray-200 text-gray-400'); + $('#illuminationValue').text('--'); + $('#illuminationStatus').text('--').removeClass().addClass('px-1.5 py-0.5 rounded-full text-xs bg-gray-200 text-gray-400'); +} + // 监听日期和小时选择器变化,自动刷新数据 // $(document).on('change', '#layuiDate', function() { // initEcharts(); @@ -83,9 +114,9 @@ function initEchartsOne(obj) { const gisOption = getGisOption(obj); const spaceOption = getSpaceOption(obj); - const trendChart = echarts.init(document.getElementById('trendChart')); - const gisChart = echarts.init(document.getElementById('gisChart')); - const spaceChart = echarts.init(document.getElementById('spaceChart')); + window.trendChart = echarts.init(document.getElementById('trendChart')); + window.gisChart = echarts.init(document.getElementById('gisChart')); + window.spaceChart = echarts.init(document.getElementById('spaceChart')); const lineChartBtn = document.getElementById('lineChartBtn'); const barChartBtn = document.getElementById('barChartBtn'); From 355310b340fee9f80e24f172661a15d8f9757a3e Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Thu, 24 Jul 2025 18:39:05 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/pages/newDataAnalysis/projectProgress.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/pages/newDataAnalysis/projectProgress.js b/js/pages/newDataAnalysis/projectProgress.js index 2b57d8a..6f0a89c 100644 --- a/js/pages/newDataAnalysis/projectProgress.js +++ b/js/pages/newDataAnalysis/projectProgress.js @@ -157,11 +157,11 @@ function initTable(type, bidCode) { "
延误原因:" + rowData.delayActor + "
" + - "
其他原因:" + - data1[index] + + "
延误对策:" + + rowData.delayPolicy + "
" + "
分析结果:" + - data2[index] + + rowData.analyzeResult + "
" + "
", area: ["600px", "300px"], From b5c7fe9bc0c9a03dd0fbd9e6dc286de8af79c60d Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Thu, 24 Jul 2025 18:42:28 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/pages/newDataAnalysis/projectManagement.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/pages/newDataAnalysis/projectManagement.js b/js/pages/newDataAnalysis/projectManagement.js index 10477b8..1767ce5 100644 --- a/js/pages/newDataAnalysis/projectManagement.js +++ b/js/pages/newDataAnalysis/projectManagement.js @@ -562,6 +562,7 @@ function initTable(type, bidCode) { } $(".chart-box").hide(); +$(".chart-box2").hide(); $(".list-view").click(function () { if ($(this).hasClass("active")) return; From 68e49b1b485cba174ee6036fb67d417d25bb1535 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Thu, 24 Jul 2025 18:48:50 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/pages/newDataAnalysis/projectManagement.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/pages/newDataAnalysis/projectManagement.js b/js/pages/newDataAnalysis/projectManagement.js index 1767ce5..2ebe70f 100644 --- a/js/pages/newDataAnalysis/projectManagement.js +++ b/js/pages/newDataAnalysis/projectManagement.js @@ -190,12 +190,12 @@ function setCols(type) { return [ { type: "numbers", title: "序号", width: "10%" }, // 添加序号列 { - field: "taskName", + field: "proName", title: "工程名称", align: "center", }, { - field: "projectNumber", + field: "taskName", title: "任务名称", align: "center", }, From d265151e1781423569e37bd93f478ffaeb94b822 Mon Sep 17 00:00:00 2001 From: lSun <15893999301@qq.com> Date: Thu, 24 Jul 2025 19:07:53 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engineeringSafetyAnalysis.js | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/js/pages/newDataAnalysis/engineeringSafetyAnalysis.js b/js/pages/newDataAnalysis/engineeringSafetyAnalysis.js index 963100b..5fc09a1 100644 --- a/js/pages/newDataAnalysis/engineeringSafetyAnalysis.js +++ b/js/pages/newDataAnalysis/engineeringSafetyAnalysis.js @@ -33,10 +33,10 @@ function initTable(bidCode,name) { { field: 'workLocation', title: '作业地点', align: 'center', width: '10%' }, { field: 'monitoringPointId', title: '监测点编号', align: 'center', width: '10%' }, { field: 'name', title: '监测点名称', align: 'center', width: '10%' }, - { field: 'temperature', title: '当前平均温度', align: 'center', width: '8%' }, - { field: 'humidity', title: '当前平均湿度', align: 'center', width: '8%' }, - { field: 'windSpeed', title: '当前平均风速', align: 'center', width: '8%' }, - { field: 'gasValue', title: '当前平均气体值', align: 'center', width: '10%' }, + { field: 'temperature', title: '温度', align: 'center', width: '8%' }, + { field: 'humidity', title: '湿度', align: 'center', width: '8%' }, + { field: 'windSpeed', title: '风速', align: 'center', width: '8%' }, + { field: 'gasValue', title: '气体值', align: 'center', width: '10%' }, { field: 'rateLevel', title: '最高隐患等级', align: 'center', width: '8%', templet: function (d) { @@ -144,6 +144,14 @@ function initEchartsOne(data) { tooltip: { trigger: 'axis' }, + title: { + text: '异常检测', // 标题文本 + left: 'left', // 标题位置,可以是 'left', 'right', 'center' + textStyle: { + color: '#fff', // 标题颜色 + fontSize: 18, // 字体大小 + }, + }, legend: { data: ['温度', '湿度', '风速'], textStyle: { @@ -155,7 +163,11 @@ function initEchartsOne(data) { data: dates, axisLabel: { color: "#fff", // X轴标签白色 - fontSize: 10, + formatter: function(value) { + // 假设 value 是 "2025-07-24" 格式的字符串 + // 你可以根据需要进行格式化,例如换行显示 + return value.split('-').join('\n'); // 将日期字符串按 "-" 分割,并用换行符连接 + } }, axisLine: { lineStyle: {