优化 addDateRange js 函数

This commit is contained in:
fungleo 2020-08-04 14:32:29 +08:00
parent 876ecf21c7
commit 503dd64e3f
1 changed files with 6 additions and 9 deletions

View File

@ -54,15 +54,12 @@ export function resetForm(refName) {
} }
// 添加日期范围 // 添加日期范围
export function addDateRange(params, dateRange) { export function addDateRange (params = {}, dateRange) {
var search = params; if (dateRange != null && dateRange !== '') {
search.beginTime = ""; params.beginTime = this.dateRange[0]
search.endTime = ""; params.endTime = this.dateRange[1]
if (null != dateRange && '' != dateRange) { }
search.beginTime = this.dateRange[0]; return params
search.endTime = this.dateRange[1];
}
return search;
} }
// 回显数据字典 // 回显数据字典