From 198868bc3d314447f3fd5c5dcf6cb2f27e367f6e Mon Sep 17 00:00:00 2001 From: Wangxin Date: Mon, 10 Nov 2025 23:14:26 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90web=E3=80=91=20=E6=96=87=E6=A1=88?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/device/deviceType/index.vue | 2 +- .../src/views/device/supplier/index.vue | 6 ++--- .../inMonitoring/inMonitor/message/index.vue | 8 +++++++ ALOps_sys_fe/alops-ui/src/views/index.vue | 23 +++++++++++++++++++ 4 files changed, 35 insertions(+), 4 deletions(-) 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') {