diff --git a/ALOps_sys_fe/alops-ui/src/views/device/deviceType/index.vue b/ALOps_sys_fe/alops-ui/src/views/device/deviceType/index.vue index 9516cb5d..2a8c46ab 100644 --- a/ALOps_sys_fe/alops-ui/src/views/device/deviceType/index.vue +++ b/ALOps_sys_fe/alops-ui/src/views/device/deviceType/index.vue @@ -39,7 +39,7 @@ diff --git a/ALOps_sys_fe/alops-ui/src/views/device/supplier/index.vue b/ALOps_sys_fe/alops-ui/src/views/device/supplier/index.vue index a03ba3a8..f1b3cae3 100644 --- a/ALOps_sys_fe/alops-ui/src/views/device/supplier/index.vue +++ b/ALOps_sys_fe/alops-ui/src/views/device/supplier/index.vue @@ -7,9 +7,9 @@ - - - + + + 搜索 diff --git a/ALOps_sys_fe/alops-ui/src/views/inMonitoring/inMonitor/message/index.vue b/ALOps_sys_fe/alops-ui/src/views/inMonitoring/inMonitor/message/index.vue index fa5ac6fa..38cbd835 100644 --- a/ALOps_sys_fe/alops-ui/src/views/inMonitoring/inMonitor/message/index.vue +++ b/ALOps_sys_fe/alops-ui/src/views/inMonitoring/inMonitor/message/index.vue @@ -237,6 +237,14 @@ export default { if (level) { this.queryParams.level = level; } + + // 检查路由参数是否有时间范围 + const startTime = this.$route.query.startTime; + const endTime = this.$route.query.endTime; + if (startTime && endTime) { + this.dateRange = [startTime, endTime]; + } + this.getList() }, methods: { diff --git a/ALOps_sys_fe/alops-ui/src/views/index.vue b/ALOps_sys_fe/alops-ui/src/views/index.vue index 3447bedf..273fac08 100644 --- a/ALOps_sys_fe/alops-ui/src/views/index.vue +++ b/ALOps_sys_fe/alops-ui/src/views/index.vue @@ -903,6 +903,29 @@ export default { // 年度预警跳转到预警信息页面 if (level === 'annual') { 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级预警跳转到预警信息页面并传递级别参数 else if (level === 'level1') {