|
|
@@ -286,7 +286,19 @@ export default {
|
|
|
const params = { ...this.queryParams };
|
|
|
if (this.dateRange && this.dateRange.length === 2) {
|
|
|
params.beginCreateTime = this.dateRange[0];
|
|
|
- params.endCreateTime = this.dateRange[1];
|
|
|
+
|
|
|
+ // 判断是否是同一天
|
|
|
+ if (this.dateRange[0] === this.dateRange[1]) {
|
|
|
+ // 如果是同一天,结束时间加一天
|
|
|
+ const endDate = new Date(this.dateRange[1]);
|
|
|
+ endDate.setDate(endDate.getDate() + 1);
|
|
|
+ const year = endDate.getFullYear();
|
|
|
+ const month = String(endDate.getMonth() + 1).padStart(2, '0');
|
|
|
+ const day = String(endDate.getDate()).padStart(2, '0');
|
|
|
+ params.endCreateTime = `${year}-${month}-${day}`;
|
|
|
+ } else {
|
|
|
+ params.endCreateTime = this.dateRange[1];
|
|
|
+ }
|
|
|
} else {
|
|
|
params.beginCreateTime = null;
|
|
|
params.endCreateTime = null;
|
|
|
@@ -360,7 +372,19 @@ export default {
|
|
|
const params = { ...this.queryParams };
|
|
|
if (this.dateRange && this.dateRange.length === 2) {
|
|
|
params.beginCreateTime = this.dateRange[0];
|
|
|
- params.endCreateTime = this.dateRange[1];
|
|
|
+
|
|
|
+ // 判断是否是同一天
|
|
|
+ if (this.dateRange[0] === this.dateRange[1]) {
|
|
|
+ // 如果是同一天,结束时间加一天
|
|
|
+ const endDate = new Date(this.dateRange[1]);
|
|
|
+ endDate.setDate(endDate.getDate() + 1);
|
|
|
+ const year = endDate.getFullYear();
|
|
|
+ const month = String(endDate.getMonth() + 1).padStart(2, '0');
|
|
|
+ const day = String(endDate.getDate()).padStart(2, '0');
|
|
|
+ params.endCreateTime = `${year}-${month}-${day}`;
|
|
|
+ } else {
|
|
|
+ params.endCreateTime = this.dateRange[1];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
this.$confirm('是否确认导出所有短信发送记录数据项?', "警告", {
|
|
|
@@ -372,7 +396,7 @@ export default {
|
|
|
}).then(response => {
|
|
|
this.download(response.msg);
|
|
|
}).catch(() => {});
|
|
|
- }
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|