diff --git a/resources/assets/js/functions/common.js b/resources/assets/js/functions/common.js index 0a5e0990a..42221657e 100755 --- a/resources/assets/js/functions/common.js +++ b/resources/assets/js/functions/common.js @@ -881,11 +881,13 @@ if (params instanceof Date) { params = $A.formatDate(format, params); } else if ($A.isJson(params)) { + params = Object.assign({}, params) for (let key in params) { if (!params.hasOwnProperty(key)) continue; params[key] = $A.date2string(params[key], format); } } else if ($A.isArray(params)) { + params = Object.assign([], params) params.forEach((val, index) => { params[index] = $A.date2string(val, format); }); diff --git a/resources/assets/js/pages/manage/components/TaskAdd.vue b/resources/assets/js/pages/manage/components/TaskAdd.vue index c9aa0e65f..b34c57eac 100644 --- a/resources/assets/js/pages/manage/components/TaskAdd.vue +++ b/resources/assets/js/pages/manage/components/TaskAdd.vue @@ -214,7 +214,7 @@ export default { const {times} = this.addData; let temp = $A.date2string(times, "Y-m-d H:i"); if (temp[0] && temp[1]) { - let d = Math.floor(($A.Date(temp[1]).getTime() - $A.Date(temp[0]).getTime()) / 86400000); + let d = Math.ceil(($A.Date(temp[1]).getTime() - $A.Date(temp[0]).getTime()) / 86400000); if (d > 0) { return d; }