From 4c1b0a6d293f679644103aa47acf57fbb05a295d Mon Sep 17 00:00:00 2001 From: LokerL Date: Sun, 15 Dec 2024 18:10:19 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E6=8A=A5=E8=AD=A6=E5=88=86?= =?UTF-8?q?=E6=9E=90-=E5=8E=82=E7=95=8C=E5=9C=A8=E7=BA=BF=20=E5=8A=9F?= =?UTF-8?q?=E8=83=BD3=20=E7=82=B9=E5=87=BB=E6=8A=A5=E8=AD=A6=E6=AC=A1?= =?UTF-8?q?=E6=95=B0=EF=BC=8C=E5=BC=B9=E7=AA=97=E6=8A=A5=E8=AD=A6=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E9=A1=B5=E9=9D=A2-end?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/alarmMonitor/bound/index.vue | 37 +++++++++++++++++++ .../src/views/dataAnalysis/bound/index.vue | 14 +++++-- 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/ruoyi-ui/src/views/alarmMonitor/bound/index.vue b/ruoyi-ui/src/views/alarmMonitor/bound/index.vue index 41b2155..72600f8 100644 --- a/ruoyi-ui/src/views/alarmMonitor/bound/index.vue +++ b/ruoyi-ui/src/views/alarmMonitor/bound/index.vue @@ -164,6 +164,16 @@ export default { name: "alarm", components: { sendMsg, dealAlarm, DeptTree, BmlHeatmap }, dicts: [], + props: { + queryParamsName: { + type: String, + default: "", + }, + queryParamsDate: { + type: Array, + default: () => [], + }, + }, data() { return { detailParams: {}, @@ -210,6 +220,21 @@ export default { created() { // this.userName = store.getters.user.userName; }, + watch: { + queryParamsName: { + handler: function (val) { + this.queryParams.name = val; + this.getList(); + }, + immediate: true, + }, + queryParamsDate: { + handler: function (val) { + this.dateList = val; + }, + immediate: true, + }, + }, mounted() { this.init(); }, @@ -243,6 +268,13 @@ export default { this.queryParams.endTime = null; } this.loading = true; + if (this.queryParamsName) { + this.queryParams.name = this.queryParamsName; + } + if (this.queryParamsDate && this.queryParamsDate.length > 0) { + this.queryParams.startTime = this.queryParamsDate[0]; + this.queryParams.endTime = this.queryParamsDate[1]; + } listAlarm(this.queryParams).then((response) => { this.dataList = response.rows; this.total = response.total; @@ -275,9 +307,14 @@ 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(); }, diff --git a/ruoyi-ui/src/views/dataAnalysis/bound/index.vue b/ruoyi-ui/src/views/dataAnalysis/bound/index.vue index 07bfeff..409d3b1 100644 --- a/ruoyi-ui/src/views/dataAnalysis/bound/index.vue +++ b/ruoyi-ui/src/views/dataAnalysis/bound/index.vue @@ -41,7 +41,7 @@ - + @@ -137,6 +137,8 @@ export default { deviceSn: null, }, dialogAlarmVisible: false, + queryParamsName: null, + queryParamsDate: null, }; }, mounted() { @@ -162,8 +164,14 @@ export default { }, methods: { checkRole, - clickAlarmTag() { + 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"), + ]; }, dateChange() { this.queryDebounce();