From 5273fb0a73d005de7a0d6267409e05543d42fb6d Mon Sep 17 00:00:00 2001 From: chenjinsong <523037378@qq.com> Date: Thu, 10 Oct 2024 16:20:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Ddetection=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E7=BF=BB=E9=A1=B5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/detections/Index.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/detections/Index.vue b/src/views/detections/Index.vue index 78ef5ea6..2780cadf 100644 --- a/src/views/detections/Index.vue +++ b/src/views/detections/Index.vue @@ -569,6 +569,12 @@ export default { this.timeFilter = { startTime: s, endTime: e, dateRangeValue: v.value } }, search (param) { + // 如果不是最新时间,则获取当前时间 + if (!param.isNowDate) { + const myTimeFilter = getNowDate(this.$_.cloneDeep(this.timeFilter)) + this.reload(myTimeFilter.startTime, myTimeFilter.endTime, myTimeFilter.dateRangeValue) + return true + } let q let metaList if (param) { @@ -606,12 +612,6 @@ export default { mode: mode }) overwriteUrl(newUrl) - // 如果不是最新时间,则获取当前时间 - if (!param.isNowDate) { - const myTimeFilter = getNowDate(this.$_.cloneDeep(this.timeFilter)) - this.reload(myTimeFilter.startTime, myTimeFilter.endTime, myTimeFilter.dateRangeValue) - return true - } this.queryFilter(this.q) this.queryList(this.q) },