From d596d5bb8e801069e4498552028fdefd23562e7b Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 13 Aug 2020 12:08:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=98=E5=8E=9F=20addDateRange=20js=20?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/utils/ruoyi.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js index 462dc8f60..0c0f59082 100644 --- a/ruoyi-ui/src/utils/ruoyi.js +++ b/ruoyi-ui/src/utils/ruoyi.js @@ -54,12 +54,15 @@ export function resetForm(refName) { } // 添加日期范围 -export function addDateRange (params = {}, dateRange) { - if (dateRange != null && dateRange !== '') { - params.beginTime = this.dateRange[0] - params.endTime = this.dateRange[1] +export function addDateRange(params, dateRange) { + var search = params; + search.beginTime = ""; + search.endTime = ""; + if (null != dateRange && '' != dateRange) { + search.beginTime = this.dateRange[0]; + search.endTime = this.dateRange[1]; } - return params + return search; } // 回显数据字典