1.修改 设备管理 - 分组管理 页面
2.修改 监控中心 - 能耗监测 初始化时间bug
This commit is contained in:
@@ -340,11 +340,25 @@
|
||||
// 获取当天的时间
|
||||
const today = new Date();
|
||||
const year = today.getFullYear();
|
||||
const month = String(today.getMonth() + 1).padStart(2, '0'); // getMonth() 返回的月份是0-11
|
||||
const day = String(today.getDate()).padStart(2, '0');
|
||||
const month = Number(String(today.getMonth() + 1).padStart(2, '0')); // getMonth() 返回的月份是0-11
|
||||
const day = Number(String(today.getDate()).padStart(2, '0'));
|
||||
|
||||
startTime = year + '-' + month + '-' + day;
|
||||
endTime = year + '-' + month + '-' + day;
|
||||
if (dateTypeValue.value == 'month') {
|
||||
startTime = year + '-' + month + '-01';
|
||||
// 创建下一个月的第一天
|
||||
const date = new Date(year, month, 1);
|
||||
|
||||
// 减去一天得到当月的最后一天
|
||||
// date.setDate(date.getDate() - 1);
|
||||
endTime = date.toISOString().split('T')[0];
|
||||
// endTime = endDate.value + '-01';
|
||||
} else if (dateTypeValue.value == 'year') {
|
||||
startTime = year + '-01-01';
|
||||
endTime = year + '-12-31';
|
||||
} else {
|
||||
startTime = year + '-' + month + '-' + day;
|
||||
endTime = year + '-' + month + '-' + day;
|
||||
}
|
||||
}
|
||||
|
||||
// 图表数据
|
||||
|
Reference in New Issue
Block a user