|
|
|
@ -903,6 +903,29 @@ export default { |
|
|
|
// 年度预警跳转到预警信息页面 |
|
|
|
// 年度预警跳转到预警信息页面 |
|
|
|
if (level === 'annual') { |
|
|
|
if (level === 'annual') { |
|
|
|
this.$router.push('/inMonitoring/inMonitoring/message'); |
|
|
|
this.$router.push('/inMonitoring/inMonitoring/message'); |
|
|
|
|
|
|
|
}else if (level === 'monthly') { |
|
|
|
|
|
|
|
const today = new Date(); |
|
|
|
|
|
|
|
// 当前月的第一天 |
|
|
|
|
|
|
|
const firstDayOfMonth = new Date(today.getFullYear(), today.getMonth(), 1); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 格式化日期为YYYY-MM-DD HH:mm:ss格式 |
|
|
|
|
|
|
|
const formatDate = (date) => { |
|
|
|
|
|
|
|
const year = date.getFullYear(); |
|
|
|
|
|
|
|
const month = String(date.getMonth() + 1).padStart(2, '0'); |
|
|
|
|
|
|
|
const day = String(date.getDate()).padStart(2, '0'); |
|
|
|
|
|
|
|
const hours = String(date.getHours()).padStart(2, '0'); |
|
|
|
|
|
|
|
const minutes = String(date.getMinutes()).padStart(2, '0'); |
|
|
|
|
|
|
|
const seconds = String(date.getSeconds()).padStart(2, '0'); |
|
|
|
|
|
|
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.$router.push({ |
|
|
|
|
|
|
|
path: '/inMonitoring/inMonitoring/message', |
|
|
|
|
|
|
|
query: { |
|
|
|
|
|
|
|
startTime: formatDate(firstDayOfMonth), |
|
|
|
|
|
|
|
endTime: formatDate(today) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
// 1-3级预警跳转到预警信息页面并传递级别参数 |
|
|
|
// 1-3级预警跳转到预警信息页面并传递级别参数 |
|
|
|
else if (level === 'level1') { |
|
|
|
else if (level === 'level1') { |
|
|
|
|