From 517e3d7e4df1dcaefb3c883e2e5ad4859dd136c4 Mon Sep 17 00:00:00 2001 From: changyongqiang Date: Fri, 27 May 2022 15:47:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DchartAlarminfo?= =?UTF-8?q?=E6=80=BB=E6=95=B0=E6=8E=A5=E5=8F=A3=E5=8F=82=E6=95=B0=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/charts/charts/ChartAlarmInfo.vue | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/views/charts/charts/ChartAlarmInfo.vue b/src/views/charts/charts/ChartAlarmInfo.vue index 94a0d438..18ee2cda 100644 --- a/src/views/charts/charts/ChartAlarmInfo.vue +++ b/src/views/charts/charts/ChartAlarmInfo.vue @@ -112,7 +112,9 @@ export default { eventSeverityColor: eventSeverityColor, pageNo: 1, alarmInfoCount: {}, - fromChartData: '' + fromChartData: '', + startTime: '', + endTime: '' } }, computed: { @@ -132,6 +134,16 @@ export default { this.getData(1, n) }) } + }, + queryParams: { + deep: true, + handler (n) { + if (n) { + this.startTime = n.startTime + this.endTime = n.endTime + this.getCount() + } + } } }, components: { @@ -141,8 +153,8 @@ export default { unitConvert, getCount () { const countQuery = { - startTime: this.queryParams.startTime, - endTime: this.queryParams.endTime, + startTime: this.startTime, + endTime: this.endTime, eventSeverity: this.tabHandleClickType === 'All' ? '' : this.tabHandleClickType } @@ -196,7 +208,6 @@ export default { this.emitter.on('chart-info', function (value) { _this.getData(1, value) }) - this.getCount() } }