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: 'workLocation', title: '作业地点', align: 'center', width: '10%' },
|
||||||
{ field: 'monitoringPointId', title: '监测点编号', align: 'center', width: '10%' },
|
{ field: 'monitoringPointId', title: '监测点编号', align: 'center', width: '10%' },
|
||||||
{ field: 'name', title: '监测点名称', align: 'center', width: '10%' },
|
{ field: 'name', title: '监测点名称', align: 'center', width: '10%' },
|
||||||
{ field: 'temperature', title: '当前平均温度', align: 'center', width: '8%' },
|
{ field: 'temperature', title: '温度', align: 'center', width: '8%' },
|
||||||
{ field: 'humidity', title: '当前平均湿度', align: 'center', width: '8%' },
|
{ field: 'humidity', title: '湿度', align: 'center', width: '8%' },
|
||||||
{ field: 'windSpeed', title: '当前平均风速', align: 'center', width: '8%' },
|
{ field: 'windSpeed', title: '风速', align: 'center', width: '8%' },
|
||||||
{ field: 'gasValue', title: '当前平均气体值', align: 'center', width: '10%' },
|
{ field: 'gasValue', title: '气体值', align: 'center', width: '10%' },
|
||||||
{
|
{
|
||||||
field: 'rateLevel', title: '最高隐患等级', align: 'center', width: '8%',
|
field: 'rateLevel', title: '最高隐患等级', align: 'center', width: '8%',
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
|
|
@ -144,6 +144,14 @@ function initEchartsOne(data) {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis'
|
trigger: 'axis'
|
||||||
},
|
},
|
||||||
|
title: {
|
||||||
|
text: '异常检测', // 标题文本
|
||||||
|
left: 'left', // 标题位置,可以是 'left', 'right', 'center'
|
||||||
|
textStyle: {
|
||||||
|
color: '#fff', // 标题颜色
|
||||||
|
fontSize: 18, // 字体大小
|
||||||
|
},
|
||||||
|
},
|
||||||
legend: {
|
legend: {
|
||||||
data: ['温度', '湿度', '风速'],
|
data: ['温度', '湿度', '风速'],
|
||||||
textStyle: {
|
textStyle: {
|
||||||
|
|
@ -155,7 +163,11 @@ function initEchartsOne(data) {
|
||||||
data: dates,
|
data: dates,
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: "#fff", // X轴标签白色
|
color: "#fff", // X轴标签白色
|
||||||
fontSize: 10,
|
formatter: function(value) {
|
||||||
|
// 假设 value 是 "2025-07-24" 格式的字符串
|
||||||
|
// 你可以根据需要进行格式化,例如换行显示
|
||||||
|
return value.split('-').join('\n'); // 将日期字符串按 "-" 分割,并用换行符连接
|
||||||
|
}
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
|
|
|
||||||
|
|
@ -53,18 +53,49 @@ function initEcharts() {
|
||||||
const url = commonUrl + "screen/largeScreen/environment/getEnvironmentList?currentDay=" + currentDay + "&hour=" + hour + "&proId=" + bidCode;
|
const url = commonUrl + "screen/largeScreen/environment/getEnvironmentList?currentDay=" + currentDay + "&hour=" + hour + "&proId=" + bidCode;
|
||||||
ajaxRequest(url, "get", null , true, function () {
|
ajaxRequest(url, "get", null , true, function () {
|
||||||
}, function (result) {
|
}, function (result) {
|
||||||
if (result.code === 200) {
|
if (result.code === 200 && result.data) {
|
||||||
console.log(result.data);
|
initEchartsOne(result.data);
|
||||||
initEchartsOne(result.data);
|
} else {
|
||||||
} else if (result.code === 500) {
|
layer.msg('<span style="color:#00C6BE">暂无数据</span>', {
|
||||||
layer.msg(result.msg, { icon: 2 });
|
icon: 0
|
||||||
}
|
});
|
||||||
|
clearEchartsAndData();
|
||||||
|
}
|
||||||
}, function (xhr) {
|
}, function (xhr) {
|
||||||
layer.msg(xhr, { icon: 2 });
|
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() {
|
// $(document).on('change', '#layuiDate', function() {
|
||||||
// initEcharts();
|
// initEcharts();
|
||||||
|
|
@ -83,9 +114,9 @@ function initEchartsOne(obj) {
|
||||||
const gisOption = getGisOption(obj);
|
const gisOption = getGisOption(obj);
|
||||||
const spaceOption = getSpaceOption(obj);
|
const spaceOption = getSpaceOption(obj);
|
||||||
|
|
||||||
const trendChart = echarts.init(document.getElementById('trendChart'));
|
window.trendChart = echarts.init(document.getElementById('trendChart'));
|
||||||
const gisChart = echarts.init(document.getElementById('gisChart'));
|
window.gisChart = echarts.init(document.getElementById('gisChart'));
|
||||||
const spaceChart = echarts.init(document.getElementById('spaceChart'));
|
window.spaceChart = echarts.init(document.getElementById('spaceChart'));
|
||||||
|
|
||||||
const lineChartBtn = document.getElementById('lineChartBtn');
|
const lineChartBtn = document.getElementById('lineChartBtn');
|
||||||
const barChartBtn = document.getElementById('barChartBtn');
|
const barChartBtn = document.getElementById('barChartBtn');
|
||||||
|
|
|
||||||
|
|
@ -190,12 +190,12 @@ function setCols(type) {
|
||||||
return [
|
return [
|
||||||
{ type: "numbers", title: "序号", width: "10%" }, // 添加序号列
|
{ type: "numbers", title: "序号", width: "10%" }, // 添加序号列
|
||||||
{
|
{
|
||||||
field: "taskName",
|
field: "proName",
|
||||||
title: "工程名称",
|
title: "工程名称",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "projectNumber",
|
field: "taskName",
|
||||||
title: "任务名称",
|
title: "任务名称",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
|
|
@ -562,6 +562,7 @@ function initTable(type, bidCode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$(".chart-box").hide();
|
$(".chart-box").hide();
|
||||||
|
$(".chart-box2").hide();
|
||||||
|
|
||||||
$(".list-view").click(function () {
|
$(".list-view").click(function () {
|
||||||
if ($(this).hasClass("active")) return;
|
if ($(this).hasClass("active")) return;
|
||||||
|
|
|
||||||
|
|
@ -157,11 +157,11 @@ function initTable(type, bidCode) {
|
||||||
"<div style='font-size: 16px; padding: 20px;'>延误原因:" +
|
"<div style='font-size: 16px; padding: 20px;'>延误原因:" +
|
||||||
rowData.delayActor +
|
rowData.delayActor +
|
||||||
"</div>" +
|
"</div>" +
|
||||||
"<div style='font-size: 16px; padding: 20px;'>其他原因:" +
|
"<div style='font-size: 16px; padding: 20px;'>延误对策:" +
|
||||||
data1[index] +
|
rowData.delayPolicy +
|
||||||
"</div>" +
|
"</div>" +
|
||||||
"<div style='font-size: 16px; padding: 20px;'>分析结果:" +
|
"<div style='font-size: 16px; padding: 20px;'>分析结果:" +
|
||||||
data2[index] +
|
rowData.analyzeResult +
|
||||||
"</div>" +
|
"</div>" +
|
||||||
"</div>",
|
"</div>",
|
||||||
area: ["600px", "300px"],
|
area: ["600px", "300px"],
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,8 @@
|
||||||
.layui-layer-title {
|
.layui-layer-title {
|
||||||
border-bottom: 1px solid #008781;
|
border-bottom: 1px solid #008781;
|
||||||
}
|
}
|
||||||
.layui-laydate-preview{
|
|
||||||
|
.layui-laydate-preview {
|
||||||
color: #FFFFFF !important;
|
color: #FFFFFF !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -186,11 +187,13 @@
|
||||||
laydate = layui.laydate;
|
laydate = layui.laydate;
|
||||||
let range = getDateRangeOneWeek();
|
let range = getDateRangeOneWeek();
|
||||||
|
|
||||||
|
range.startDate = "2024-09-17"
|
||||||
|
range.endDate = "2024-09-24"
|
||||||
laydate.render({
|
laydate.render({
|
||||||
elem: '#ID-laydate-range',
|
elem: '#ID-laydate-range',
|
||||||
range: ['#ID-laydate-start-date', '#ID-laydate-end-date'],
|
range: ['#ID-laydate-start-date', '#ID-laydate-end-date'],
|
||||||
btns: ['confirm'],
|
btns: ['confirm'],
|
||||||
value: "2024-09-17" + ' - ' + "2024-09-24",
|
value: range.startDate + ' - ' + range.endDate,
|
||||||
done: function (value) {
|
done: function (value) {
|
||||||
// value 是选择的字符串,比如 '2025-06-23 - 2025-07-23'
|
// value 是选择的字符串,比如 '2025-06-23 - 2025-07-23'
|
||||||
const [startDateStr, endDateStr] = value.split(" - ");
|
const [startDateStr, endDateStr] = value.split(" - ");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue