Browse Source

修改时间

lex-xin 4 years ago
parent
commit
8e4c5f4e43
2 changed files with 5 additions and 12 deletions
  1. 5 5
      src/views/trainStatistics/index.vue
  2. 0 7
      src/views/trainStatistics/trainDetail.vue

+ 5 - 5
src/views/trainStatistics/index.vue

@@ -166,12 +166,12 @@ export default {
                 dataForm.minDate = new Date(dayjs(this.formatStartTime))
                 }
                 setTimeout(() => {
-                dataForm.currentDate = this.formatEndTime ? new Date(dayjs(this.formatEndTime)) : new Date()
+                    dataForm.currentDate = this.formatEndTime ? new Date(dayjs(this.formatEndTime)) : new Date()
                 }, 500)
             } else if(type == 'showStart') {
                 dataForm.minDate = new Date(2000, 0, 1)
                 setTimeout(() => {
-                dataForm.currentDate = this.formatStartTime ? new Date(dayjs(this.formatStartTime)) : new Date()
+                    dataForm.currentDate = this.formatStartTime ? new Date(dayjs(this.formatStartTime)) : new Date()
                 }, 500)
             }
             dataForm.status = true
@@ -180,12 +180,12 @@ export default {
         chioseDate(value) {
             let dataForm = this.dataForm
             if(dataForm.type == 'showStart') {
-                this.formatStartTime = dayjs(value).format('YYYY/MM/DD')
+                this.formatStartTime = dayjs(value).format('YYYY-MM-DD')
                 if(this.formatEndTime && dayjs(value).unix() > dayjs(this.formatEndTime).unix()) {
                 this.formatEndTime = null
                 }
             } else if(dataForm.type == 'showEnd') {
-                this.formatEndTime = dayjs(value).format('YYYY/MM/DD')
+                this.formatEndTime = dayjs(value).format('YYYY-MM-DD')
             }
             dataForm.status = false
         },
@@ -244,7 +244,7 @@ export default {
     min-height: 100vh;
     .visitTime {
         .van-cell__right-icon{
-        line-height: .36rem;
+        // line-height: .36rem;
         }
     }
     /deep/.van-dropdown-menu__bar {

+ 0 - 7
src/views/trainStatistics/trainDetail.vue

@@ -181,13 +181,6 @@ export default {
             }
         },
         onSearch() {
-            if(!this.searchList.startTime) {
-                this.$toast('请选择开始时间')
-                return
-            } else if(!this.searchList.endTime) {
-                this.$toast('请选择结束时间')
-                return
-            }
             this.dataList = [] // 重置数据
             this.show = true
             this.loading = true