|
|
@ -58,7 +58,7 @@ export function addDateRange(params, dateRange, propName) {
|
|
|
|
var search = params;
|
|
|
|
var search = params;
|
|
|
|
search.params = {};
|
|
|
|
search.params = {};
|
|
|
|
if (null != dateRange && '' != dateRange) {
|
|
|
|
if (null != 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 {
|
|
|
@ -183,13 +183,15 @@ export function tansParams(params) {
|
|
|
|
for (const propName of Object.keys(params)) {
|
|
|
|
for (const propName of Object.keys(params)) {
|
|
|
|
const value = params[propName];
|
|
|
|
const value = params[propName];
|
|
|
|
var part = encodeURIComponent(propName) + "=";
|
|
|
|
var part = encodeURIComponent(propName) + "=";
|
|
|
|
if (value !== null && typeof(value) !== "undefined") {
|
|
|
|
if (value !== null && typeof (value) !== "undefined") {
|
|
|
|
if (typeof value === 'object') {
|
|
|
|
if (typeof value === 'object') {
|
|
|
|
for (const key of Object.keys(value)) {
|
|
|
|
for (const key of Object.keys(value)) {
|
|
|
|
|
|
|
|
if (value[key] !== null && typeof (value[key]) !== 'undefined') {
|
|
|
|
let params = propName + '[' + key + ']';
|
|
|
|
let params = propName + '[' + key + ']';
|
|
|
|
var subPart = encodeURIComponent(params) + "=";
|
|
|
|
var subPart = encodeURIComponent(params) + "=";
|
|
|
|
result += subPart + encodeURIComponent(value[key]) + "&";
|
|
|
|
result += subPart + encodeURIComponent(value[key]) + "&";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
result += part + encodeURIComponent(value) + "&";
|
|
|
|
result += part + encodeURIComponent(value) + "&";
|
|
|
|
}
|
|
|
|
}
|
|
|
|