Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
edb7662c55
|
|
@ -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: {
|
||||
|
|
|
|||
|
|
@ -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('<span style="color:#00C6BE">暂无数据</span>', {
|
||||
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');
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
},
|
||||
|
|
@ -562,6 +562,7 @@ function initTable(type, bidCode) {
|
|||
}
|
||||
|
||||
$(".chart-box").hide();
|
||||
$(".chart-box2").hide();
|
||||
|
||||
$(".list-view").click(function () {
|
||||
if ($(this).hasClass("active")) return;
|
||||
|
|
|
|||
|
|
@ -157,11 +157,11 @@ function initTable(type, bidCode) {
|
|||
"<div style='font-size: 16px; padding: 20px;'>延误原因:" +
|
||||
rowData.delayActor +
|
||||
"</div>" +
|
||||
"<div style='font-size: 16px; padding: 20px;'>其他原因:" +
|
||||
data1[index] +
|
||||
"<div style='font-size: 16px; padding: 20px;'>延误对策:" +
|
||||
rowData.delayPolicy +
|
||||
"</div>" +
|
||||
"<div style='font-size: 16px; padding: 20px;'>分析结果:" +
|
||||
data2[index] +
|
||||
rowData.analyzeResult +
|
||||
"</div>" +
|
||||
"</div>",
|
||||
area: ["600px", "300px"],
|
||||
|
|
|
|||
|
|
@ -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(" - ");
|
||||
|
|
|
|||
Loading…
Reference in New Issue