From 89051daf80136be42289139362e327eeaba67ade Mon Sep 17 00:00:00 2001 From: lSun <15893999301@qq.com> Date: Thu, 24 Jul 2025 13:14:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E5=AE=89=E5=85=A8=E5=88=86?= =?UTF-8?q?=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engineeringSafetyAnalysis.js | 78 +++++++++++++++++-- 1 file changed, 72 insertions(+), 6 deletions(-) diff --git a/js/pages/newDataAnalysis/engineeringSafetyAnalysis.js b/js/pages/newDataAnalysis/engineeringSafetyAnalysis.js index dfd4ddd..f458ce7 100644 --- a/js/pages/newDataAnalysis/engineeringSafetyAnalysis.js +++ b/js/pages/newDataAnalysis/engineeringSafetyAnalysis.js @@ -35,14 +35,16 @@ function initTable(bidCode,name) { }, cols: [[ { type: 'numbers', title: '序号', width: '10%' }, // 添加序号列 + { field: 'proName', title: '工程名称', align: 'center', width: '10%' }, + { field: 'workLocation', title: '作业地点', align: 'center', width: '10%' }, { field: 'monitoringPointId', title: '监测点编号', align: 'center', width: '10%' }, - { field: 'name', title: '监测点名称', align: 'center', width: '20%' }, - { field: 'temperature', title: '当前温度', align: 'center', width: '10%' }, - { field: 'humidity', title: '当前湿度', align: 'center', width: '10%' }, - { field: 'windSpeed', title: '当前风速', align: 'center', width: '10%' }, - { field: 'gasValue', 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: '8%' }, { - field: 'rateLevel', title: '最高隐患等级', align: 'center', width: '20%', + field: 'rateLevel', title: '最高隐患等级', align: 'center', width: '10%', templet: function (d) { let color = ''; if (d.level == "一般隐患") { @@ -54,6 +56,14 @@ function initTable(bidCode,name) { } return '

' + d.level + '

'; } + }, + { + title: "操作", + align: "center", + width: '8%', + templet: function (row) { + return ` 分析与改进` + }, } ]], initComplete: function () { @@ -305,3 +315,59 @@ function initEchartsTwo(data) { } myChart2.setOption(riskOption, true) } + +function handlDetails(analysisReason){ + // 分离原因分析和改进措施 + const [reason, measure] = analysisReason.match(/原因分析:(.*)。改进措施:(.*)/).slice(1); + + // 创建一个包含分析原因及改进措施的HTML结构 + const content = ` +
+
+

分析原因及改进措施

+
+
+ 原因分析: + ${reason} +
+
+ 改进措施: + ${measure} +
+
+
+
+
+ `; + layer.open({ + type: 1, + title: "分析原因及改进措施", + content: content, + area: ["400px", "300px"], + shade: 0.3, // 遮罩透明度 + skin: "custom-layer-style", // 自定义皮肤 + success: function (layero, index) { + // 修改弹框背景颜色 + $(layero).css( + "background", + "rgba(13, 34, 37, 0.9)" + ); // 半透明黑色背景 + $(layero).find(".layui-layer-title").css({ + color: "#fff", // 标题文字颜色 + background: "transparent", // 标题背景透明 + "border-bottom": + "1px solid rgba(255, 255, 255, 0.2)", // 标题底部边框 + }); + $(layero).find(".layui-layer-content").css({ + background: "transparent", // 内容区域透明 + }); + + $(layero) + .find(".layui-layer-setwin .layui-layer-close") + .css({ + color: "#fff", // 文字颜色 + "border-color": "#fff", // 边框颜色(如果按钮有边框) + }); + }, + }); +}