|
|
@ -55,16 +55,15 @@ export function resetForm(refName) {
|
|
|
|
|
|
|
|
|
|
|
|
// 添加日期范围
|
|
|
|
// 添加日期范围
|
|
|
|
export function addDateRange(params, dateRange, propName) {
|
|
|
|
export function addDateRange(params, dateRange, propName) {
|
|
|
|
var search = params;
|
|
|
|
let search = params;
|
|
|
|
search.params = {};
|
|
|
|
search.params = typeof (search.params) === 'object' && search.params !== null && !Array.isArray(search.params) ? search.params : {};
|
|
|
|
if (null != dateRange && '' != dateRange) {
|
|
|
|
dateRange = Array.isArray(dateRange) ? dateRange : [];
|
|
|
|
if (typeof (propName) === "undefined") {
|
|
|
|
if (typeof (propName) === 'undefined') {
|
|
|
|
search.params["beginTime"] = dateRange[0];
|
|
|
|
search.params['beginTime'] = dateRange[0];
|
|
|
|
search.params["endTime"] = dateRange[1];
|
|
|
|
search.params['endTime'] = dateRange[1];
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
search.params["begin" + propName] = dateRange[0];
|
|
|
|
search.params['begin' + propName] = dateRange[0];
|
|
|
|
search.params["end" + propName] = dateRange[1];
|
|
|
|
search.params['end' + propName] = dateRange[1];
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return search;
|
|
|
|
return search;
|
|
|
|
}
|
|
|
|
}
|
|
|
|