| | |
| | | <picker-view-column> |
| | | <view class="picker_item" v-for="(item,index) in minutes" :key="index">{{ item }}分</view> |
| | | </picker-view-column> |
| | | <picker-view-column> |
| | | <view class="picker_item" v-for="(item,index) in seconds" :key="index">{{ item }}秒</view> |
| | | </picker-view-column> |
| | | </picker-view> |
| | | </view> |
| | | </u-popup> |
| | |
| | | days: [], |
| | | hours: [], |
| | | minutes: [], |
| | | seconds: [], |
| | | doorTimeValue: [0, 0, 0, 0, 0, 0], |
| | | tempDoorTimeValue: [0, 0, 0, 0, 0, 0] |
| | | doorTimeValue: [0, 0, 0, 0, 0], |
| | | tempDoorTimeValue: [0, 0, 0, 0, 0] |
| | | } |
| | | }, |
| | | onBackPress(options) { |
| | |
| | | this.months = this.createRange(1, 12) |
| | | this.hours = this.createRange(0, 23) |
| | | this.minutes = this.createRange(0, 59) |
| | | this.seconds = this.createRange(0, 59) |
| | | this.setDoorTimeValueByDate(now) |
| | | }, |
| | | createRange(start, end) { |
| | |
| | | monthIndex, |
| | | date.getDate() - 1, |
| | | date.getHours(), |
| | | date.getMinutes(), |
| | | date.getSeconds() |
| | | date.getMinutes() |
| | | ] |
| | | this.tempDoorTimeValue = [...this.doorTimeValue] |
| | | }, |
| | |
| | | this.showDoorTimePicker = false |
| | | }, |
| | | formatDoorTimeByValue(value) { |
| | | return `${this.years[value[0]]}-${this.months[value[1]]}-${this.days[value[2]]} ${this.hours[value[3]]}:${this.minutes[value[4]]}:${this.seconds[value[5]]}` |
| | | return `${this.years[value[0]]}-${this.months[value[1]]}-${this.days[value[2]]} ${this.hours[value[3]]}:${this.minutes[value[4]]}:00` |
| | | }, |
| | | close() { |
| | | this.showSuccess = false |