|
@ -104,15 +104,21 @@ export default {
|
104
|
104
|
})
|
105
|
105
|
},
|
106
|
106
|
methods: {
|
107
|
|
optionsCreat() {
|
|
107
|
optionsCreat(val) {
|
108
|
108
|
var that = this
|
109
|
109
|
that.optionsTime = []
|
110
|
110
|
const nowHour = new Date().getHours()
|
111
|
|
console.log(nowHour)
|
112
|
|
if (nowHour > 0) {
|
113
|
|
that.valueDate = this.formatTime(Date.now() + 8 * 60 * 60 * 1000).substring(0, 8)
|
114
|
|
} else {
|
115
|
|
that.valueDate = this.formatTime(Date.now() + 8 * 60 * 60 * 1000 - 1 * 60 * 60 * 1000).substring(0, 8)
|
|
111
|
if (!val) {
|
|
112
|
if (nowHour > 0) {
|
|
113
|
that.valueDate = this.formatTime(Date.now() + 8 * 60 * 60 * 1000).substring(0, 8)
|
|
114
|
} else {
|
|
115
|
that.valueDate = this.formatTime(Date.now() + 8 * 60 * 60 * 1000 - 1 * 60 * 60 * 1000).substring(0, 8)
|
|
116
|
that.pickerOptions0 = {
|
|
117
|
disabledDate(time) {
|
|
118
|
return time.getTime() > Date.now() - 8.64e7
|
|
119
|
}
|
|
120
|
}
|
|
121
|
}
|
116
|
122
|
}
|
117
|
123
|
for (let i = 0; i < 24; i++) {
|
118
|
124
|
var num = (i < 10 ? ('0' + i) : i)
|
|
@ -134,7 +140,7 @@ export default {
|
134
|
140
|
if (nowHour <= i && nowHour !== 0 && that.valueDate === that.formatTime(Date.now() + 8 * 60 * 60 * 1000).substring(0, 8)) {
|
135
|
141
|
oPt.disb = true
|
136
|
142
|
}
|
137
|
|
if (nowHour === 0) {
|
|
143
|
if (nowHour === 0 || that.valueDate !== that.formatTime(Date.now() + 8 * 60 * 60 * 1000).substring(0, 8)) {
|
138
|
144
|
oPt.disb = false
|
139
|
145
|
}
|
140
|
146
|
that.optionsTime.push(oPt)
|
|
@ -219,7 +225,7 @@ export default {
|
219
|
225
|
},
|
220
|
226
|
changeDate(val) {
|
221
|
227
|
this.valueDate = val
|
222
|
|
this.optionsCreat()
|
|
228
|
this.optionsCreat(val)
|
223
|
229
|
},
|
224
|
230
|
changeTimeRange(val) {
|
225
|
231
|
this.TimeVal = val
|