Просмотр исходного кода

分时查询报表查询导出 时间参数修改

1004749546@qq.com 4 лет назад
Родитель
Сommit
f9b68102ae
1 измененных файлов с 6 добавлено и 6 удалено
  1. 6 6
      src/views/reportForm/rubbishDeliverySearchTime.vue

+ 6 - 6
src/views/reportForm/rubbishDeliverySearchTime.vue

@@ -118,8 +118,8 @@ export default {
           searchData.name = this.optionData.find(item => item.stationNo == searchData.stationNo).name || ''
         }
         if (this.time && this.time.length) {
-          searchData.beginDate = moment(this.time[0])
-          searchData.endDate = moment(this.time[1])
+          searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD HH:00:00')
+          searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD HH:00:00')
         } else {
           searchData.beginDate = ''
           searchData.endDate = ''
@@ -172,8 +172,8 @@ export default {
     handleExport () {
       const params = this.queryParam
       if (this.time && this.time.length) {
-        params.beginDate = moment(this.time[0])
-        params.endDate = moment(this.time[1])
+        params.beginDate = moment(this.time[0]).format('YYYY-MM-DD HH:00:00')
+        params.endDate = moment(this.time[1]).format('YYYY-MM-DD HH:00:00')
       } else {
         params.beginDate = ''
         params.endDate = ''
@@ -239,8 +239,8 @@ export default {
         stationNo: this.queryParam.stationNo // 网点名称
       }
       if (this.time && this.time.length) {
-        params.beginDate = moment(this.time[0])
-        params.endDate = moment(this.time[1])
+        params.beginDate = moment(this.time[0]).format('YYYY-MM-DD HH:00:00')
+        params.endDate = moment(this.time[1]).format('YYYY-MM-DD HH:00:00')
       } else {
         params.beginDate = ''
         params.endDate = ''