2025-10-18 15:55:58 +08:00
|
|
|
|
let table, layer, form, laydate;
|
2026-01-21 10:34:06 +08:00
|
|
|
|
let temperatureHumidityChart = null;
|
|
|
|
|
|
let windSpeedChart = null;
|
|
|
|
|
|
let airQualityChart = null;
|
2026-01-23 16:33:21 +08:00
|
|
|
|
let currentPage = 1;
|
|
|
|
|
|
let pageSize = 10;
|
|
|
|
|
|
let bidCode = parent.parent.$('#bidPro').val();
|
|
|
|
|
|
let keyword = ''; // 监测点关键字
|
|
|
|
|
|
|
2026-01-24 18:55:45 +08:00
|
|
|
|
// 获取当天日期
|
|
|
|
|
|
function getTodayDate() {
|
|
|
|
|
|
const now = new Date();
|
|
|
|
|
|
const year = now.getFullYear();
|
|
|
|
|
|
const month = String(now.getMonth() + 1).padStart(2, '0');
|
|
|
|
|
|
const day = String(now.getDate()).padStart(2, '0');
|
|
|
|
|
|
return year + '-' + month + '-' + day;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 获取当月第一天和最后一天(保留用于其他功能)
|
2026-01-23 16:33:21 +08:00
|
|
|
|
function getCurrentMonthRange() {
|
|
|
|
|
|
const now = new Date();
|
|
|
|
|
|
const year = now.getFullYear();
|
|
|
|
|
|
const month = now.getMonth();
|
|
|
|
|
|
|
|
|
|
|
|
// 当月第一天
|
|
|
|
|
|
const firstDay = new Date(year, month, 1);
|
|
|
|
|
|
const startDate = year + '-' + String(month + 1).padStart(2, '0') + '-' + String(firstDay.getDate()).padStart(2, '0');
|
|
|
|
|
|
|
|
|
|
|
|
// 当月最后一天
|
|
|
|
|
|
const lastDay = new Date(year, month + 1, 0);
|
|
|
|
|
|
const endDate = year + '-' + String(month + 1).padStart(2, '0') + '-' + String(lastDay.getDate()).padStart(2, '0');
|
|
|
|
|
|
|
|
|
|
|
|
return { startDate, endDate };
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-24 18:55:45 +08:00
|
|
|
|
const today = getTodayDate();
|
2026-01-23 16:33:21 +08:00
|
|
|
|
let queryParams = {
|
|
|
|
|
|
projectId: bidCode,
|
2026-01-24 18:55:45 +08:00
|
|
|
|
startTestDay: today,
|
|
|
|
|
|
endTestDay: today,
|
2026-01-23 16:33:21 +08:00
|
|
|
|
}
|
2026-01-21 10:34:06 +08:00
|
|
|
|
|
|
|
|
|
|
layui.use(["layer", "table", "form", "laydate"], function () {
|
2025-10-14 18:16:49 +08:00
|
|
|
|
layer = layui.layer;
|
|
|
|
|
|
table = layui.table;
|
|
|
|
|
|
form = layui.form;
|
2025-10-18 15:55:58 +08:00
|
|
|
|
laydate = layui.laydate;
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
// 响应成功后的拦截器
|
|
|
|
|
|
$.ajaxSetup({
|
|
|
|
|
|
beforeSend: function (xhr, options) {
|
|
|
|
|
|
var originalSuccess = options.success;
|
|
|
|
|
|
options.success = function (data, textStatus, jqXhr) {
|
|
|
|
|
|
data = modifyResponseData(data);
|
|
|
|
|
|
originalSuccess.apply(this, arguments);
|
|
|
|
|
|
};
|
|
|
|
|
|
},
|
2025-10-18 15:55:58 +08:00
|
|
|
|
});
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
// 初始化页面
|
|
|
|
|
|
initPage();
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
// 初始化日期范围选择器
|
|
|
|
|
|
initDateRangePicker();
|
|
|
|
|
|
});
|
2025-10-14 18:16:49 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
// 初始化页面
|
|
|
|
|
|
function initPage() {
|
|
|
|
|
|
initTemperatureHumidityChart();
|
|
|
|
|
|
initWindSpeedChart();
|
|
|
|
|
|
initAirQualityChart();
|
|
|
|
|
|
initEnvironmentRecordTable();
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-24 18:55:45 +08:00
|
|
|
|
// 页面初始化时,按默认当天日期加载一次接口数据
|
2026-01-23 16:33:21 +08:00
|
|
|
|
refreshAllModules();
|
2026-01-21 10:34:06 +08:00
|
|
|
|
}
|
2025-10-27 19:10:17 +08:00
|
|
|
|
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
|
|
|
|
|
// 初始化日期范围选择器(逻辑与工程质量分析模块保持一致)
|
2026-01-21 10:34:06 +08:00
|
|
|
|
function initDateRangePicker() {
|
2026-01-24 18:55:45 +08:00
|
|
|
|
// 设置初始显示值为当天范围
|
2026-01-23 16:33:21 +08:00
|
|
|
|
const initialValue = queryParams.startTestDay + ' ~ ' + queryParams.endTestDay;
|
|
|
|
|
|
$('#dateRange').val(initialValue);
|
|
|
|
|
|
|
|
|
|
|
|
// 使用范围选择器,单个输入框显示日期范围
|
2026-01-21 10:34:06 +08:00
|
|
|
|
laydate.render({
|
|
|
|
|
|
elem: '#dateRange',
|
|
|
|
|
|
type: 'date',
|
2026-01-23 16:33:21 +08:00
|
|
|
|
range: true, // 启用范围选择
|
2026-01-21 10:34:06 +08:00
|
|
|
|
format: 'yyyy-MM-dd',
|
|
|
|
|
|
theme: 'dark',
|
2026-01-24 18:55:45 +08:00
|
|
|
|
// 默认值使用当天范围
|
2026-01-23 16:33:21 +08:00
|
|
|
|
value: queryParams.startTestDay + ' - ' + queryParams.endTestDay,
|
|
|
|
|
|
done: function (value, date, endDate) {
|
2026-01-24 18:55:45 +08:00
|
|
|
|
// 重置为当天日期的函数
|
|
|
|
|
|
const resetToToday = function () {
|
|
|
|
|
|
const today = getTodayDate();
|
|
|
|
|
|
queryParams.startTestDay = today;
|
|
|
|
|
|
queryParams.endTestDay = today;
|
|
|
|
|
|
$('#dateRange').val(today + ' ~ ' + today);
|
2026-01-23 16:33:21 +08:00
|
|
|
|
refreshAllModules();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
if (value && value.trim() !== '') {
|
|
|
|
|
|
const dates = value.split(' - ');
|
|
|
|
|
|
if (dates.length === 2) {
|
|
|
|
|
|
const startDate = dates[0].trim();
|
|
|
|
|
|
const endDateStr = dates[1].trim();
|
|
|
|
|
|
|
2026-01-24 18:55:45 +08:00
|
|
|
|
// 在单个输入框中显示日期范围(格式:2026-01-15 ~ 2026-01-15)
|
2026-01-23 16:33:21 +08:00
|
|
|
|
$('#dateRange').val(startDate + ' ~ ' + endDateStr);
|
|
|
|
|
|
|
|
|
|
|
|
// 更新查询参数
|
|
|
|
|
|
queryParams.startTestDay = startDate;
|
|
|
|
|
|
queryParams.endTestDay = endDateStr;
|
|
|
|
|
|
|
|
|
|
|
|
// 日期变化后,重新调用所有模块接口
|
|
|
|
|
|
refreshAllModules();
|
|
|
|
|
|
} else {
|
2026-01-24 18:55:45 +08:00
|
|
|
|
// 如果格式不正确,重置为当天日期
|
|
|
|
|
|
resetToToday();
|
2026-01-23 16:33:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
} else {
|
2026-01-24 18:55:45 +08:00
|
|
|
|
// 清空时,重置为当天日期
|
|
|
|
|
|
resetToToday();
|
2026-01-23 16:33:21 +08:00
|
|
|
|
}
|
2026-01-21 10:34:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
2025-10-14 18:16:49 +08:00
|
|
|
|
|
2026-01-23 16:33:21 +08:00
|
|
|
|
// 刷新所有模块数据
|
|
|
|
|
|
function refreshAllModules() {
|
|
|
|
|
|
// 重新调用接口获取数据
|
2026-01-21 10:34:06 +08:00
|
|
|
|
getTemperatureHumidityData();
|
2026-01-23 16:33:21 +08:00
|
|
|
|
getQualityDetectionRecord();
|
|
|
|
|
|
|
|
|
|
|
|
// 重新加载表格
|
|
|
|
|
|
if (table) {
|
|
|
|
|
|
table.reload('environmentRecordTable', {
|
|
|
|
|
|
where: {
|
|
|
|
|
|
projectId: bidCode,
|
|
|
|
|
|
startTestDay: queryParams.startTestDay,
|
|
|
|
|
|
endTestDay: queryParams.endTestDay,
|
|
|
|
|
|
monitoringPointName: keyword || ''
|
|
|
|
|
|
},
|
|
|
|
|
|
page: {
|
|
|
|
|
|
curr: 1
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 查询数据(统一刷新所有模块)
|
|
|
|
|
|
function queryData() {
|
|
|
|
|
|
refreshAllModules();
|
2026-01-21 10:34:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 初始化温湿度图表(柱状图+折线图,双Y轴)
|
|
|
|
|
|
function initTemperatureHumidityChart() {
|
|
|
|
|
|
const chartDom = document.getElementById('temperatureHumidityChart');
|
|
|
|
|
|
if (!chartDom) return;
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
if (temperatureHumidityChart) {
|
|
|
|
|
|
temperatureHumidityChart.dispose();
|
|
|
|
|
|
}
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
temperatureHumidityChart = echarts.init(chartDom);
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
// 模拟数据 - 后续替换为真实接口数据
|
|
|
|
|
|
const times = ['8:00', '9:00', '10:00', '11:00', '12:00', '13:00', '14:00'];
|
|
|
|
|
|
const temperatures = [25, 28, 30, 32, 30, 28, 26]; // 温度(°C)
|
|
|
|
|
|
const humidities = [60, 65, 70, 75, 72, 68, 65]; // 湿度(%)
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
const option = {
|
|
|
|
|
|
backgroundColor: 'transparent',
|
|
|
|
|
|
tooltip: {
|
|
|
|
|
|
trigger: 'axis',
|
|
|
|
|
|
backgroundColor: 'rgba(13, 34, 37, 0.95)',
|
|
|
|
|
|
borderColor: 'rgba(6, 189, 221, 0.8)',
|
|
|
|
|
|
borderWidth: 1,
|
|
|
|
|
|
borderRadius: 4,
|
|
|
|
|
|
padding: [12, 16],
|
|
|
|
|
|
textStyle: {
|
|
|
|
|
|
color: '#FFFFFF',
|
|
|
|
|
|
fontSize: 12
|
|
|
|
|
|
}
|
2025-10-14 18:16:49 +08:00
|
|
|
|
},
|
2026-01-21 10:34:06 +08:00
|
|
|
|
legend: {
|
|
|
|
|
|
data: ['温度', '湿度'],
|
|
|
|
|
|
top: '5%',
|
|
|
|
|
|
right: '5%',
|
|
|
|
|
|
textStyle: {
|
|
|
|
|
|
color: '#FFFFFF',
|
|
|
|
|
|
fontSize: 12
|
|
|
|
|
|
},
|
|
|
|
|
|
itemWidth: 12,
|
|
|
|
|
|
itemHeight: 12,
|
|
|
|
|
|
icon: 'rect'
|
2025-10-14 18:16:49 +08:00
|
|
|
|
},
|
2026-01-21 10:34:06 +08:00
|
|
|
|
grid: {
|
|
|
|
|
|
left: '10%',
|
|
|
|
|
|
right: '10%',
|
|
|
|
|
|
bottom: '15%',
|
|
|
|
|
|
top: '20%',
|
|
|
|
|
|
containLabel: true
|
2025-10-14 18:16:49 +08:00
|
|
|
|
},
|
2026-01-21 10:34:06 +08:00
|
|
|
|
xAxis: {
|
|
|
|
|
|
type: 'category',
|
|
|
|
|
|
data: times,
|
|
|
|
|
|
axisLabel: {
|
|
|
|
|
|
color: '#FFFFFF',
|
|
|
|
|
|
fontSize: 12
|
|
|
|
|
|
},
|
|
|
|
|
|
axisLine: {
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
color: 'rgba(255, 255, 255, 0.3)',
|
|
|
|
|
|
width: 1
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
axisTick: {
|
|
|
|
|
|
show: false
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
yAxis: [
|
|
|
|
|
|
{
|
|
|
|
|
|
type: 'value',
|
|
|
|
|
|
name: '°C',
|
|
|
|
|
|
nameTextStyle: {
|
|
|
|
|
|
color: '#FFFFFF',
|
|
|
|
|
|
fontSize: 12
|
|
|
|
|
|
},
|
|
|
|
|
|
axisLabel: {
|
|
|
|
|
|
color: '#FFFFFF',
|
|
|
|
|
|
fontSize: 12
|
|
|
|
|
|
},
|
|
|
|
|
|
axisLine: {
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
color: 'rgba(255, 255, 255, 0.3)',
|
|
|
|
|
|
width: 1
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
splitLine: {
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
color: 'rgba(255, 255, 255, 0.15)',
|
|
|
|
|
|
type: 'dashed',
|
|
|
|
|
|
width: 1
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
type: 'value',
|
|
|
|
|
|
name: '%',
|
|
|
|
|
|
nameTextStyle: {
|
|
|
|
|
|
color: '#FFFFFF',
|
|
|
|
|
|
fontSize: 12
|
|
|
|
|
|
},
|
|
|
|
|
|
axisLabel: {
|
|
|
|
|
|
color: '#FFFFFF',
|
|
|
|
|
|
fontSize: 12
|
|
|
|
|
|
},
|
|
|
|
|
|
axisLine: {
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
color: 'rgba(255, 255, 255, 0.3)',
|
|
|
|
|
|
width: 1
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
splitLine: {
|
|
|
|
|
|
show: false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
series: [
|
|
|
|
|
|
{
|
|
|
|
|
|
name: '温度',
|
|
|
|
|
|
type: 'bar',
|
|
|
|
|
|
yAxisIndex: 0,
|
|
|
|
|
|
data: temperatures,
|
|
|
|
|
|
barWidth: '40%',
|
|
|
|
|
|
itemStyle: {
|
|
|
|
|
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
|
|
|
|
|
offset: 0,
|
|
|
|
|
|
color: '#4A90E2'
|
|
|
|
|
|
}, {
|
|
|
|
|
|
offset: 1,
|
|
|
|
|
|
color: '#2E5C8A'
|
|
|
|
|
|
}]),
|
|
|
|
|
|
borderRadius: [2, 2, 0, 0]
|
|
|
|
|
|
},
|
|
|
|
|
|
label: {
|
|
|
|
|
|
show: false
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
name: '湿度',
|
|
|
|
|
|
type: 'line',
|
|
|
|
|
|
yAxisIndex: 1,
|
|
|
|
|
|
data: humidities,
|
|
|
|
|
|
itemStyle: {
|
|
|
|
|
|
color: '#50E3C2'
|
|
|
|
|
|
},
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
width: 2,
|
|
|
|
|
|
color: '#50E3C2'
|
|
|
|
|
|
},
|
|
|
|
|
|
symbol: 'circle',
|
|
|
|
|
|
symbolSize: 6,
|
|
|
|
|
|
label: {
|
|
|
|
|
|
show: false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
};
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
temperatureHumidityChart.setOption(option);
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
// 响应式调整
|
2026-01-23 16:33:21 +08:00
|
|
|
|
window.addEventListener('resize', function () {
|
2026-01-21 10:34:06 +08:00
|
|
|
|
if (temperatureHumidityChart) {
|
|
|
|
|
|
temperatureHumidityChart.resize();
|
2025-10-14 18:16:49 +08:00
|
|
|
|
}
|
2026-01-21 10:34:06 +08:00
|
|
|
|
});
|
2025-10-14 18:16:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
// 初始化风速图表(折线图)
|
|
|
|
|
|
function initWindSpeedChart() {
|
|
|
|
|
|
const chartDom = document.getElementById('windSpeedChart');
|
|
|
|
|
|
if (!chartDom) return;
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
if (windSpeedChart) {
|
|
|
|
|
|
windSpeedChart.dispose();
|
2025-10-18 15:55:58 +08:00
|
|
|
|
}
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
windSpeedChart = echarts.init(chartDom);
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
// 模拟数据 - 后续替换为真实接口数据
|
|
|
|
|
|
const times = ['8:00', '9:00', '10:00', '11:00', '12:00', '13:00', '14:00'];
|
|
|
|
|
|
const windSpeeds = [5.2, 6.1, 5.8, 4.5, 5.0, 6.2, 5.5]; // 风速(m/s)
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
const option = {
|
|
|
|
|
|
backgroundColor: 'transparent',
|
|
|
|
|
|
tooltip: {
|
|
|
|
|
|
trigger: 'axis',
|
|
|
|
|
|
backgroundColor: 'rgba(13, 34, 37, 0.95)',
|
|
|
|
|
|
borderColor: 'rgba(6, 189, 221, 0.8)',
|
|
|
|
|
|
borderWidth: 1,
|
|
|
|
|
|
borderRadius: 4,
|
|
|
|
|
|
padding: [12, 16],
|
|
|
|
|
|
textStyle: {
|
|
|
|
|
|
color: '#FFFFFF',
|
|
|
|
|
|
fontSize: 12
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
legend: {
|
|
|
|
|
|
data: ['风速'],
|
|
|
|
|
|
top: '5%',
|
|
|
|
|
|
right: '5%',
|
|
|
|
|
|
textStyle: {
|
|
|
|
|
|
color: '#FFFFFF',
|
|
|
|
|
|
fontSize: 12
|
|
|
|
|
|
},
|
|
|
|
|
|
itemWidth: 12,
|
|
|
|
|
|
itemHeight: 12,
|
|
|
|
|
|
icon: 'rect'
|
|
|
|
|
|
},
|
|
|
|
|
|
grid: {
|
|
|
|
|
|
left: '10%',
|
|
|
|
|
|
right: '10%',
|
|
|
|
|
|
bottom: '15%',
|
|
|
|
|
|
top: '20%',
|
|
|
|
|
|
containLabel: true
|
|
|
|
|
|
},
|
|
|
|
|
|
xAxis: {
|
|
|
|
|
|
type: 'category',
|
|
|
|
|
|
data: times,
|
|
|
|
|
|
axisLabel: {
|
|
|
|
|
|
color: '#FFFFFF',
|
|
|
|
|
|
fontSize: 12
|
|
|
|
|
|
},
|
|
|
|
|
|
axisLine: {
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
color: 'rgba(255, 255, 255, 0.3)',
|
|
|
|
|
|
width: 1
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
axisTick: {
|
|
|
|
|
|
show: false
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
yAxis: {
|
|
|
|
|
|
type: 'value',
|
|
|
|
|
|
name: 'm/s',
|
|
|
|
|
|
nameTextStyle: {
|
|
|
|
|
|
color: '#FFFFFF',
|
|
|
|
|
|
fontSize: 12
|
|
|
|
|
|
},
|
|
|
|
|
|
axisLabel: {
|
|
|
|
|
|
color: '#FFFFFF',
|
|
|
|
|
|
fontSize: 12
|
|
|
|
|
|
},
|
|
|
|
|
|
axisLine: {
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
color: 'rgba(255, 255, 255, 0.3)',
|
|
|
|
|
|
width: 1
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
splitLine: {
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
color: 'rgba(255, 255, 255, 0.15)',
|
|
|
|
|
|
type: 'dashed',
|
|
|
|
|
|
width: 1
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
series: [
|
|
|
|
|
|
{
|
|
|
|
|
|
name: '风速',
|
|
|
|
|
|
type: 'line',
|
|
|
|
|
|
data: windSpeeds,
|
|
|
|
|
|
itemStyle: {
|
|
|
|
|
|
color: '#50E3C2'
|
|
|
|
|
|
},
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
width: 2,
|
|
|
|
|
|
color: '#50E3C2'
|
|
|
|
|
|
},
|
|
|
|
|
|
symbol: 'circle',
|
|
|
|
|
|
symbolSize: 6,
|
|
|
|
|
|
areaStyle: {
|
|
|
|
|
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
|
|
|
|
|
offset: 0,
|
|
|
|
|
|
color: 'rgba(80, 227, 194, 0.3)'
|
|
|
|
|
|
}, {
|
|
|
|
|
|
offset: 1,
|
|
|
|
|
|
color: 'rgba(80, 227, 194, 0.05)'
|
|
|
|
|
|
}])
|
|
|
|
|
|
},
|
|
|
|
|
|
label: {
|
|
|
|
|
|
show: false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
};
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
windSpeedChart.setOption(option);
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
// 响应式调整
|
2026-01-23 16:33:21 +08:00
|
|
|
|
window.addEventListener('resize', function () {
|
2026-01-21 10:34:06 +08:00
|
|
|
|
if (windSpeedChart) {
|
|
|
|
|
|
windSpeedChart.resize();
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
2025-10-14 18:16:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-23 16:33:21 +08:00
|
|
|
|
// 初始化空气质量图表(单折线图,只显示PM2.5)
|
2026-01-21 10:34:06 +08:00
|
|
|
|
function initAirQualityChart() {
|
|
|
|
|
|
const chartDom = document.getElementById('airQualityChart');
|
|
|
|
|
|
if (!chartDom) return;
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
if (airQualityChart) {
|
|
|
|
|
|
airQualityChart.dispose();
|
|
|
|
|
|
}
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
airQualityChart = echarts.init(chartDom);
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
|
|
|
|
|
// 默认空数据
|
|
|
|
|
|
const times = [];
|
|
|
|
|
|
const pm25 = [];
|
|
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
const option = {
|
|
|
|
|
|
backgroundColor: 'transparent',
|
|
|
|
|
|
tooltip: {
|
|
|
|
|
|
trigger: 'axis',
|
|
|
|
|
|
backgroundColor: 'rgba(13, 34, 37, 0.95)',
|
|
|
|
|
|
borderColor: 'rgba(6, 189, 221, 0.8)',
|
|
|
|
|
|
borderWidth: 1,
|
|
|
|
|
|
borderRadius: 4,
|
|
|
|
|
|
padding: [12, 16],
|
|
|
|
|
|
textStyle: {
|
|
|
|
|
|
color: '#FFFFFF',
|
|
|
|
|
|
fontSize: 12
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
legend: {
|
2026-01-23 16:33:21 +08:00
|
|
|
|
data: ['PM2.5'],
|
2026-01-21 10:34:06 +08:00
|
|
|
|
top: '5%',
|
|
|
|
|
|
right: '5%',
|
|
|
|
|
|
textStyle: {
|
|
|
|
|
|
color: '#FFFFFF',
|
|
|
|
|
|
fontSize: 12
|
|
|
|
|
|
},
|
|
|
|
|
|
itemWidth: 12,
|
|
|
|
|
|
itemHeight: 12,
|
|
|
|
|
|
icon: 'rect'
|
2025-10-14 18:16:49 +08:00
|
|
|
|
},
|
2026-01-21 10:34:06 +08:00
|
|
|
|
grid: {
|
|
|
|
|
|
left: '10%',
|
|
|
|
|
|
right: '10%',
|
|
|
|
|
|
bottom: '15%',
|
|
|
|
|
|
top: '20%',
|
|
|
|
|
|
containLabel: true
|
|
|
|
|
|
},
|
|
|
|
|
|
xAxis: {
|
|
|
|
|
|
type: 'category',
|
|
|
|
|
|
data: times,
|
|
|
|
|
|
axisLabel: {
|
|
|
|
|
|
color: '#FFFFFF',
|
|
|
|
|
|
fontSize: 12
|
|
|
|
|
|
},
|
|
|
|
|
|
axisLine: {
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
color: 'rgba(255, 255, 255, 0.3)',
|
|
|
|
|
|
width: 1
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
axisTick: {
|
|
|
|
|
|
show: false
|
2025-10-18 15:55:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2026-01-21 10:34:06 +08:00
|
|
|
|
yAxis: {
|
|
|
|
|
|
type: 'value',
|
|
|
|
|
|
name: 'µg/m³',
|
|
|
|
|
|
nameTextStyle: {
|
|
|
|
|
|
color: '#FFFFFF',
|
|
|
|
|
|
fontSize: 12
|
|
|
|
|
|
},
|
|
|
|
|
|
axisLabel: {
|
|
|
|
|
|
color: '#FFFFFF',
|
|
|
|
|
|
fontSize: 12
|
|
|
|
|
|
},
|
|
|
|
|
|
axisLine: {
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
color: 'rgba(255, 255, 255, 0.3)',
|
|
|
|
|
|
width: 1
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
splitLine: {
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
color: 'rgba(255, 255, 255, 0.15)',
|
|
|
|
|
|
type: 'dashed',
|
|
|
|
|
|
width: 1
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-10-18 15:55:58 +08:00
|
|
|
|
},
|
2026-01-21 10:34:06 +08:00
|
|
|
|
series: [
|
|
|
|
|
|
{
|
|
|
|
|
|
name: 'PM2.5',
|
|
|
|
|
|
type: 'line',
|
|
|
|
|
|
data: pm25,
|
|
|
|
|
|
itemStyle: {
|
|
|
|
|
|
color: '#87CEEB'
|
|
|
|
|
|
},
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
width: 2,
|
|
|
|
|
|
color: '#87CEEB'
|
|
|
|
|
|
},
|
|
|
|
|
|
symbol: 'circle',
|
|
|
|
|
|
symbolSize: 6,
|
2026-01-23 16:33:21 +08:00
|
|
|
|
areaStyle: {
|
|
|
|
|
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
|
|
|
|
|
offset: 0,
|
|
|
|
|
|
color: 'rgba(135, 206, 235, 0.3)'
|
|
|
|
|
|
}, {
|
|
|
|
|
|
offset: 1,
|
|
|
|
|
|
color: 'rgba(135, 206, 235, 0.05)'
|
|
|
|
|
|
}])
|
2026-01-21 10:34:06 +08:00
|
|
|
|
},
|
|
|
|
|
|
label: {
|
|
|
|
|
|
show: false
|
2025-10-18 17:19:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-01-21 10:34:06 +08:00
|
|
|
|
]
|
|
|
|
|
|
};
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
airQualityChart.setOption(option);
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
// 响应式调整
|
2026-01-23 16:33:21 +08:00
|
|
|
|
window.addEventListener('resize', function () {
|
2026-01-21 10:34:06 +08:00
|
|
|
|
if (airQualityChart) {
|
|
|
|
|
|
airQualityChart.resize();
|
2025-10-18 15:55:58 +08:00
|
|
|
|
}
|
2026-01-21 10:34:06 +08:00
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-10-18 15:55:58 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
// 初始化环境监测记录表格
|
|
|
|
|
|
function initEnvironmentRecordTable() {
|
|
|
|
|
|
table.render({
|
|
|
|
|
|
elem: '#environmentRecordTable',
|
2026-01-23 16:33:21 +08:00
|
|
|
|
url: commonUrl + 'screen/project/projectSafety/list',
|
|
|
|
|
|
headers: {
|
|
|
|
|
|
decrypt: 'decrypt',
|
|
|
|
|
|
Authorization: token
|
|
|
|
|
|
},
|
|
|
|
|
|
method: 'GET',
|
|
|
|
|
|
where: {
|
|
|
|
|
|
projectId: bidCode,
|
|
|
|
|
|
startTestDay: queryParams.startTestDay,
|
|
|
|
|
|
endTestDay: queryParams.endTestDay,
|
|
|
|
|
|
monitoringPointName: keyword || ''
|
|
|
|
|
|
},
|
2026-01-21 10:34:06 +08:00
|
|
|
|
skin: 'line',
|
|
|
|
|
|
page: {
|
|
|
|
|
|
layout: ['prev', 'page', 'next', 'count', 'skip'],
|
|
|
|
|
|
groups: 5,
|
2026-01-23 16:33:21 +08:00
|
|
|
|
limit: pageSize,
|
|
|
|
|
|
limits: [10, 20, 30, 50]
|
2026-01-21 10:34:06 +08:00
|
|
|
|
},
|
|
|
|
|
|
height: 'full',
|
2026-01-23 16:33:21 +08:00
|
|
|
|
request: {
|
|
|
|
|
|
pageName: 'pageNum',
|
|
|
|
|
|
limitName: 'pageSize'
|
|
|
|
|
|
},
|
|
|
|
|
|
response: {
|
|
|
|
|
|
statusName: 'code',
|
|
|
|
|
|
statusCode: 200,
|
|
|
|
|
|
msgName: 'msg',
|
|
|
|
|
|
countName: 'total',
|
|
|
|
|
|
dataName: 'rows'
|
|
|
|
|
|
},
|
2026-01-21 10:34:06 +08:00
|
|
|
|
cols: [[
|
2026-01-23 16:33:21 +08:00
|
|
|
|
{ type: 'numbers', title: '序号', width: '8%', align: 'center' },
|
|
|
|
|
|
{ field: 'proName', title: '工程名称', width: '15%', align: 'center' },
|
|
|
|
|
|
{ field: 'planNum', title: '作业计划编号', width: '10%', align: 'center' },
|
|
|
|
|
|
{ field: 'workLocation', title: '作业地点', width: '10%', align: 'center' },
|
|
|
|
|
|
{ field: 'monitorCode', title: '监测点编号', width: '10%', align: 'center' },
|
|
|
|
|
|
{ field: 'monitorName', title: '监测点名称', width: '15%', align: 'center' },
|
|
|
|
|
|
{ field: 'detectionTime', title: '监测时间', width: '12%', align: 'center' },
|
|
|
|
|
|
{ field: 'wd', title: '温度', width: '6%', align: 'center' },
|
|
|
|
|
|
{ field: 'sd', title: '湿度', width: '6%', align: 'center' },
|
|
|
|
|
|
{ field: 'speed', title: '风速', width: '6%', align: 'center' },
|
|
|
|
|
|
{ field: 'airQuality', title: '空气质量', width: '6%', align: 'center' },
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '视频查看', width: '6%', align: 'center', templet: function (d) {
|
2026-01-24 19:22:36 +08:00
|
|
|
|
return '<a href="javascript:void(0)" style="color: #00FFB8;" onclick="viewVideo()">查看</a>';
|
2026-01-23 16:33:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
{ field: 'analysis', title: '分析改进', width: '6%', align: 'center' },
|
|
|
|
|
|
// {
|
|
|
|
|
|
// title: '分析改进', width: '8%', align: 'center', templet: function (d) {
|
|
|
|
|
|
// return '<a href="javascript:void(0)" style="color: #00FFB8;" onclick="analyzeImprove(\'' + (d.monitoringPointNumber || '') + '\')">分析与改进</a>';
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
2026-01-21 10:34:06 +08:00
|
|
|
|
]]
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
2025-10-18 15:55:58 +08:00
|
|
|
|
|
2026-01-23 16:33:21 +08:00
|
|
|
|
// 查询记录(监测点输入框查询)
|
2026-01-21 10:34:06 +08:00
|
|
|
|
function queryRecords() {
|
2026-01-23 16:33:21 +08:00
|
|
|
|
keyword = $('#keywordInput').val() || '';
|
|
|
|
|
|
|
|
|
|
|
|
// 重新加载表格
|
2026-01-21 10:34:06 +08:00
|
|
|
|
table.reload('environmentRecordTable', {
|
|
|
|
|
|
where: {
|
2026-01-23 16:33:21 +08:00
|
|
|
|
projectId: bidCode,
|
|
|
|
|
|
startTestDay: queryParams.startTestDay,
|
|
|
|
|
|
endTestDay: queryParams.endTestDay,
|
2026-01-24 17:14:53 +08:00
|
|
|
|
monitorName: keyword
|
2026-01-21 10:34:06 +08:00
|
|
|
|
},
|
|
|
|
|
|
page: {
|
|
|
|
|
|
curr: 1
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
2025-10-18 15:55:58 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
// 查看视频
|
2026-01-24 19:22:36 +08:00
|
|
|
|
function viewVideo() {
|
|
|
|
|
|
// 清空视频源(占位)
|
|
|
|
|
|
const videoPlayer = document.getElementById('videoPlayer');
|
|
|
|
|
|
if (videoPlayer) {
|
|
|
|
|
|
videoPlayer.src = '';
|
2026-01-24 19:20:17 +08:00
|
|
|
|
}
|
2026-01-24 19:22:36 +08:00
|
|
|
|
|
|
|
|
|
|
// 显示弹框
|
|
|
|
|
|
$('#videoModal').addClass('show');
|
2026-01-24 19:20:17 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 关闭视频查看弹框
|
|
|
|
|
|
function closeVideoModal() {
|
|
|
|
|
|
const videoPlayer = document.getElementById('videoPlayer');
|
|
|
|
|
|
if (videoPlayer) {
|
|
|
|
|
|
// 暂停视频并清空源
|
|
|
|
|
|
videoPlayer.pause();
|
|
|
|
|
|
videoPlayer.src = '';
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 隐藏弹框
|
|
|
|
|
|
$('#videoModal').removeClass('show');
|
2026-01-21 10:34:06 +08:00
|
|
|
|
}
|
2025-10-18 15:55:58 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
// 分析与改进
|
|
|
|
|
|
function analyzeImprove(monitoringPointNumber) {
|
2026-01-23 16:33:21 +08:00
|
|
|
|
layer.msg('分析与改进: ' + monitoringPointNumber, { icon: 1 });
|
2026-01-21 10:34:06 +08:00
|
|
|
|
// 后续实现分析改进功能
|
2025-10-18 15:55:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-23 16:33:21 +08:00
|
|
|
|
// 从detectionTime字段提取时:分格式
|
|
|
|
|
|
function extractTime(detectionTime) {
|
|
|
|
|
|
if (!detectionTime) return '';
|
|
|
|
|
|
|
|
|
|
|
|
// 如果包含时间部分(格式:2026-01-24 07:08:00)
|
|
|
|
|
|
if (detectionTime.includes(' ')) {
|
|
|
|
|
|
const timePart = detectionTime.split(' ')[1];
|
|
|
|
|
|
if (timePart) {
|
|
|
|
|
|
// 提取时:分(前5个字符,例如 "07:08")
|
|
|
|
|
|
return timePart.substring(0, 5);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 如果只有日期,返回空字符串或默认值
|
|
|
|
|
|
return '';
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 获取温湿度 风速 空气质量 3个图表数据(只调用一次接口,渲染3个图表)
|
2026-01-21 10:34:06 +08:00
|
|
|
|
function getTemperatureHumidityData() {
|
2026-01-23 16:33:21 +08:00
|
|
|
|
const url = commonUrl +
|
|
|
|
|
|
'screen/project/projectSafety/hjlist?projectId=' + bidCode +
|
|
|
|
|
|
'&startTestDay=' + queryParams.startTestDay +
|
|
|
|
|
|
'&endTestDay=' + queryParams.endTestDay;
|
|
|
|
|
|
|
|
|
|
|
|
ajaxRequestGet(
|
|
|
|
|
|
url,
|
|
|
|
|
|
'GET',
|
|
|
|
|
|
true,
|
|
|
|
|
|
function () { },
|
|
|
|
|
|
function (result) {
|
|
|
|
|
|
console.log(result, '温湿度/风速/空气质量 3个图表数据');
|
|
|
|
|
|
|
|
|
|
|
|
if (result && result.rows && Array.isArray(result.rows)) {
|
|
|
|
|
|
const data = result.rows;
|
|
|
|
|
|
|
|
|
|
|
|
// 处理数据:提取时间和各字段值,只保留有完整时间的数据
|
|
|
|
|
|
const processedData = data
|
|
|
|
|
|
.map(item => {
|
|
|
|
|
|
const time = extractTime(item.detectionTime);
|
|
|
|
|
|
if (time === '') return null; // 过滤掉没有时间的数据
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
time: time,
|
|
|
|
|
|
temperature: parseFloat(item.wd) || 0,
|
|
|
|
|
|
humidity: parseFloat(item.sd) || 0,
|
|
|
|
|
|
windSpeed: parseFloat(item.speed) || 0,
|
|
|
|
|
|
airQuality: parseFloat(item.airQuality) || 0
|
|
|
|
|
|
};
|
|
|
|
|
|
})
|
|
|
|
|
|
.filter(item => item !== null); // 过滤掉null值
|
|
|
|
|
|
|
|
|
|
|
|
// 提取各字段数组
|
|
|
|
|
|
const times = processedData.map(item => item.time);
|
|
|
|
|
|
const temperatures = processedData.map(item => item.temperature);
|
|
|
|
|
|
const humidities = processedData.map(item => item.humidity);
|
|
|
|
|
|
const windSpeeds = processedData.map(item => item.windSpeed);
|
|
|
|
|
|
const airQualities = processedData.map(item => item.airQuality);
|
|
|
|
|
|
|
|
|
|
|
|
// 更新3个图表
|
|
|
|
|
|
updateTemperatureHumidityChart(times, temperatures, humidities);
|
|
|
|
|
|
updateWindSpeedChart(times, windSpeeds);
|
|
|
|
|
|
updateAirQualityChart(times, airQualities);
|
2026-01-21 10:34:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2026-01-23 16:33:21 +08:00
|
|
|
|
aqEnnable
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 获取质量检测记录(完善查询逻辑)
|
|
|
|
|
|
function getQualityDetectionRecord() {
|
|
|
|
|
|
const url = commonUrl +
|
|
|
|
|
|
'screen/project/projectSafety/list?projectId=' + bidCode +
|
|
|
|
|
|
'&startTestDay=' + queryParams.startTestDay +
|
|
|
|
|
|
'&endTestDay=' + queryParams.endTestDay;
|
|
|
|
|
|
|
|
|
|
|
|
ajaxRequestGet(
|
|
|
|
|
|
url,
|
|
|
|
|
|
'GET',
|
|
|
|
|
|
true,
|
|
|
|
|
|
function () { },
|
|
|
|
|
|
function (result) {
|
|
|
|
|
|
console.log(result, '环境监测记录(工程安全分析)');
|
|
|
|
|
|
|
|
|
|
|
|
// 表格数据通过layui table的url自动加载,这里只打印返回数据
|
|
|
|
|
|
},
|
|
|
|
|
|
aqEnnable
|
|
|
|
|
|
);
|
2026-01-21 10:34:06 +08:00
|
|
|
|
}
|
2025-10-18 17:19:35 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
// 更新温湿度图表
|
2026-01-23 16:33:21 +08:00
|
|
|
|
function updateTemperatureHumidityChart(times, temperatures, humidities) {
|
2026-01-21 10:34:06 +08:00
|
|
|
|
if (!temperatureHumidityChart) return;
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
temperatureHumidityChart.setOption({
|
|
|
|
|
|
xAxis: {
|
|
|
|
|
|
data: times
|
|
|
|
|
|
},
|
|
|
|
|
|
series: [
|
|
|
|
|
|
{
|
|
|
|
|
|
name: '温度',
|
|
|
|
|
|
data: temperatures
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
name: '湿度',
|
|
|
|
|
|
data: humidities
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
2025-10-18 17:19:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
// 更新风速图表
|
2026-01-23 16:33:21 +08:00
|
|
|
|
function updateWindSpeedChart(times, windSpeeds) {
|
2026-01-21 10:34:06 +08:00
|
|
|
|
if (!windSpeedChart) return;
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
windSpeedChart.setOption({
|
|
|
|
|
|
xAxis: {
|
|
|
|
|
|
data: times
|
|
|
|
|
|
},
|
|
|
|
|
|
series: [{
|
|
|
|
|
|
name: '风速',
|
|
|
|
|
|
data: windSpeeds
|
|
|
|
|
|
}]
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
2025-10-18 17:19:35 +08:00
|
|
|
|
|
2026-01-23 16:33:21 +08:00
|
|
|
|
// 更新空气质量图表(单折线,只显示PM2.5)
|
|
|
|
|
|
function updateAirQualityChart(times, airQualities) {
|
2026-01-21 10:34:06 +08:00
|
|
|
|
if (!airQualityChart) return;
|
2026-01-23 16:33:21 +08:00
|
|
|
|
|
2026-01-21 10:34:06 +08:00
|
|
|
|
airQualityChart.setOption({
|
|
|
|
|
|
xAxis: {
|
|
|
|
|
|
data: times
|
|
|
|
|
|
},
|
|
|
|
|
|
series: [
|
|
|
|
|
|
{
|
|
|
|
|
|
name: 'PM2.5',
|
2026-01-23 16:33:21 +08:00
|
|
|
|
data: airQualities
|
2026-01-21 10:34:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|