From 285df1f96b2703ebcc119330af46f2f4561efd84 Mon Sep 17 00:00:00 2001 From: LokerL Date: Sun, 15 Dec 2024 20:02:08 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E6=8A=A5=E8=AD=A6=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E6=97=A5=E6=9C=9F=E9=80=89=E6=8B=A9=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/alarmMonitor/bound/index.vue | 16 ++++++---------- ruoyi-ui/src/views/dataAnalysis/bound/index.vue | 6 +----- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/ruoyi-ui/src/views/alarmMonitor/bound/index.vue b/ruoyi-ui/src/views/alarmMonitor/bound/index.vue index 72600f8..274ab1c 100644 --- a/ruoyi-ui/src/views/alarmMonitor/bound/index.vue +++ b/ruoyi-ui/src/views/alarmMonitor/bound/index.vue @@ -22,7 +22,7 @@ 日期 + end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd"> @@ -160,6 +160,7 @@ import sendMsg from "@/views/demostrate/alarm/sendMsg"; import dealAlarm from "@/views/demostrate/alarm/dealAlarm"; import DeptTree from "@/components/DeptTree/index.vue"; import { BmlHeatmap } from "vue-baidu-map"; //引人 +import moment from "moment"; export default { name: "alarm", components: { sendMsg, dealAlarm, DeptTree, BmlHeatmap }, @@ -261,8 +262,8 @@ export default { }, getList() { if (this.dateList && this.dateList.length > 0) { - this.queryParams.startTime = this.dateList[0]; - this.queryParams.endTime = this.dateList[1]; + this.queryParams.startTime = moment(this.dateList[0]).format("YYYY-MM-DD 00:00:00"); + this.queryParams.endTime = moment(this.dateList[1]).format("YYYY-MM-DD 23:59:59"); } else { this.queryParams.startTime = null; this.queryParams.endTime = null; @@ -272,8 +273,8 @@ export default { this.queryParams.name = this.queryParamsName; } if (this.queryParamsDate && this.queryParamsDate.length > 0) { - this.queryParams.startTime = this.queryParamsDate[0]; - this.queryParams.endTime = this.queryParamsDate[1]; + this.queryParams.startTime = moment(this.queryParamsDate[0]).format("YYYY-MM-DD 00:00:00"); + this.queryParams.endTime = moment(this.queryParamsDate[1]).format("YYYY-MM-DD 23:59:59"); } listAlarm(this.queryParams).then((response) => { this.dataList = response.rows; @@ -307,15 +308,10 @@ export default { this.queryParams.dealUser = null; this.queryParams.startTime = null; this.queryParams.endTime = null; - this.queryParamsName = null; - this.queryParamsDate = []; this.getList(); }, handleQuery() { this.queryParams.pageNum = 1; - this.queryParamsName = null; - this.queryParamsDate = []; - this.getList(); }, handleSizeChange(val) { diff --git a/ruoyi-ui/src/views/dataAnalysis/bound/index.vue b/ruoyi-ui/src/views/dataAnalysis/bound/index.vue index 409d3b1..957fc43 100644 --- a/ruoyi-ui/src/views/dataAnalysis/bound/index.vue +++ b/ruoyi-ui/src/views/dataAnalysis/bound/index.vue @@ -167,11 +167,7 @@ export default { clickAlarmTag(row) { this.dialogAlarmVisible = true; this.queryParamsName = row.name; - // 日期加上00:00:00 - this.queryParamsDate = [ - moment(this.dateList[0]).format("YYYY-MM-DD 00:00:00"), - moment(this.dateList[1]).format("YYYY-MM-DD 23:59:59"), - ]; + this.queryParamsDate = [...this.dateList]; }, dateChange() { this.queryDebounce();