Merge remote-tracking branch 'origin/master'

This commit is contained in:
jiang 2025-07-24 14:51:11 +08:00
commit 4a7c1eb8d8
5 changed files with 255 additions and 5 deletions

View File

@ -39,12 +39,12 @@ 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: '8%' },
{ 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: '10%',
field: 'rateLevel', title: '最高隐患等级', align: 'center', width: '8%',
templet: function (d) {
let color = '';
if (d.level == "一般隐患") {
@ -161,6 +161,7 @@ function initEchartsOne(data) {
data: dates,
axisLabel: {
color: "#fff", // X轴标签白色
fontSize: 10,
},
axisLine: {
lineStyle: {
@ -260,11 +261,24 @@ function initEchartsOne(data) {
]
};
myChart.setOption(environmentOption, true);
// 添加点击事件监听器
myChart.on('click', function (params) {
if (params.componentType === 'series') {
environmentalReadings()
}
});
window.addEventListener("resize", function () {
myChart.resize();
});
}
function environmentalReadings() {
layer.open()
}
function initEchartsTwo(data) {

View File

@ -0,0 +1,62 @@
let table, layer, form;
let myChart = null, myChart2 = null;
layui.use(['layer', 'table', 'form'], function () {
layer = layui.layer;
table = layui.table;
form = layui.form;
let bidCode = parent.parent.parent.$('#bidPro').val()
initTable(bidCode,"");
});
function initTable(bidCode,name) {
const url = commonUrl + "screen/largeScreen/engineeringSafetyAnalysis/getEnvironmentalList";
table.render({
elem: '#demo2',
url: url,
id: 'demo2',
skin: 'line',
page: true,
height: 'full-400',
headers: {
"decrypt": "decrypt",
"Authorization": token
},
where: {
bidCode: bidCode,
name:name
},
response: {
statusName: "code",
statusCode: 200,
countName: "count",
dataName: "rows",
},
cols: [[
{ type: 'numbers', title: '序号', width: '10%' }, // 添加序号列
{ field: 'id', title: '监测点编号', align: 'center' },
{ field: 'date', title: '环境数据记录日期', align: 'center' },
{ field: 'temperature', title: '当前温度', align: 'center' },
{ field: 'humidity', title: '当前湿度', align: 'center'},
{ field: 'windSpeed', title: '当前风速', align: 'center'},
{ field: 'gasValue', title: '当前气体值', align: 'center'},
]],
initComplete: function () {
// 在表格渲染完成后,重新渲染序号列
var that = this.elem.next();
var tool = that.children('.layui-table-box').children('.layui-table-fixed').children('.layui-table-body').children('.layui-table');
tool.find("tr").each(function (index, item) {
$(this).find('td[data-field="LAY_TABLE_INDEX"]').text(index + 1);
});
},
done: function (res, curr, count, origin) {
// console.log(res);
}
})
}
function query(type) {
let name = $('#name').val();
let bidCode = parent.parent.$('#bidPro').val()
initTable(bidCode,name);
}

View File

@ -0,0 +1,60 @@
let table, layer, form;
let myChart = null, myChart2 = null;
layui.use(['layer', 'table', 'form'], function () {
layer = layui.layer;
table = layui.table;
form = layui.form;
let bidCode = parent.parent.parent.$('#bidPro').val()
initTable(bidCode,"");
});
function initTable(bidCode,name) {
const url = commonUrl + "screen/largeScreen/engineeringSafetyAnalysis/getHazardsList";
table.render({
elem: '#demo2',
url: url,
id: 'demo2',
skin: 'line',
page: true,
height: 'full-400',
headers: {
"decrypt": "decrypt",
"Authorization": token
},
where: {
bidCode: bidCode,
name:name
},
response: {
statusName: "code",
statusCode: 200,
countName: "count",
dataName: "rows",
},
cols: [[
{ type: 'numbers', title: '序号', width: '10%' }, // 添加序号列
{ field: 'id', title: '隐患编号', align: 'center',},
{ field: 'type', title: '隐患类型', align: 'center', },
{ field: 'level', title: '隐患等级', align: 'center', },
{ field: 'timestamp', title: '隐患发生时间', align: 'center', },
]],
initComplete: function () {
// 在表格渲染完成后,重新渲染序号列
var that = this.elem.next();
var tool = that.children('.layui-table-box').children('.layui-table-fixed').children('.layui-table-body').children('.layui-table');
tool.find("tr").each(function (index, item) {
$(this).find('td[data-field="LAY_TABLE_INDEX"]').text(index + 1);
});
},
done: function (res, curr, count, origin) {
// console.log(res);
}
})
}
function query(type) {
let name = $('#name').val();
let bidCode = parent.parent.$('#bidPro').val()
initTable(bidCode,name);
}

View File

@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../../css/font.css">
<link rel="stylesheet" href="../../plugin/layui-v2.9.7/layui/css/layui.css">
<link rel="stylesheet" href="../../css/dataAnalysis/commonStyle.css">
<link rel="stylesheet" href="../../css/shuiYin/shuiYin.css">
<link rel="stylesheet" href="../../css/coreTable.css"/>
<script src="../../js/publics/sm4.js" type="text/javascript"></script>
<script src="../../js/publics/jquery-3.6.0.min.js" type="text/javascript"></script>
<script src="../../js/publics/public.js"></script>
<script src="../../plugin/scroll/jquery.nicescroll.min.js"></script>
<script src="../../js/publics/echarts.js"></script>
<script src="../../plugin/layui-v2.9.7/layui/layui.js"></script>
<script src="../../js/publics/aescbc.js"></script>
<script src="../../js/publics/sm3.js"></script>
<script src="../../api/commonRequest.js"></script>
<script src="../../plugin/watermark.js"></script>
<title>工程安全分析-左边echarts</title>
<style>
.bg-white {
background-color: transparent !important;
color: white;
border: 1px solid #044949;
margin: 3% 1% 1% 1%;
}
</style>
</head>
<body>
<div style="height: 100%;width: 100%;">
<div style="height: 99%;width: 100%; margin-top: 1%">
<div class="basic-search-box layout">
<form class="layui-form basic-form layout" onclick="return false;" onsubmit="return false;">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label" style="width: 80px;">监测点编号:</label>
<div class="layui-input-inline">
<input type="text" id="name" class="layui-input" autocomplete="off">
</div>
</div>
<button type="button" class="layui-btn layui-btn-normal" onclick="query(1)">
<i class="layui-icon layui-icon-query"></i>查询
</button>
</div>
</form>
</div>
<table id="demo2" lay-filter="demo2"></table>
</div>
</div>
</body>
<script src="../../js/pages/newDataAnalysis/environmentalReadings.js" type="text/javascript"></script>
</html>

View File

@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../../css/font.css">
<link rel="stylesheet" href="../../plugin/layui-v2.9.7/layui/css/layui.css">
<link rel="stylesheet" href="../../css/dataAnalysis/commonStyle.css">
<link rel="stylesheet" href="../../css/shuiYin/shuiYin.css">
<link rel="stylesheet" href="../../css/coreTable.css"/>
<script src="../../js/publics/sm4.js" type="text/javascript"></script>
<script src="../../js/publics/jquery-3.6.0.min.js" type="text/javascript"></script>
<script src="../../js/publics/public.js"></script>
<script src="../../plugin/scroll/jquery.nicescroll.min.js"></script>
<script src="../../js/publics/echarts.js"></script>
<script src="../../plugin/layui-v2.9.7/layui/layui.js"></script>
<script src="../../js/publics/aescbc.js"></script>
<script src="../../js/publics/sm3.js"></script>
<script src="../../api/commonRequest.js"></script>
<script src="../../plugin/watermark.js"></script>
<title>工程安全分析-左边echarts</title>
<style>
.bg-white {
background-color: transparent !important;
color: white;
border: 1px solid #044949;
margin: 3% 1% 1% 1%;
}
</style>
</head>
<body>
<div style="height: 100%;width: 100%;">
<div style="height: 99%;width: 100%; margin-top: 1%">
<div class="basic-search-box layout">
<form class="layui-form basic-form layout" onclick="return false;" onsubmit="return false;">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label" style="width: 80px;">隐患编号:</label>
<div class="layui-input-inline">
<input type="text" id="name" class="layui-input" autocomplete="off">
</div>
</div>
<button type="button" class="layui-btn layui-btn-normal" onclick="query(1)">
<i class="layui-icon layui-icon-query"></i>查询
</button>
</div>
</form>
</div>
<table id="demo2" lay-filter="demo2"></table>
</div>
</div>
</body>
<script src="../../js/pages/newDataAnalysis/hiddenDanger.js" type="text/javascript"></script>
</html>