Browse Source

add autofill endtime

master
刘嘉炜 4 years ago
parent
commit
200ab2b39d
  1. 16
      src/pages/course/list/list.vue

16
src/pages/course/list/list.vue

@ -109,6 +109,7 @@ export default {
date: '',
startTime: '',
endTime: '',
time_dimension: 0 //
}
}
},
@ -141,8 +142,18 @@ export default {
})
}, 300, 300),
modalStartTime(e){
console.warn(e);
this.orderInfo.startTime = e.detail.value;
let { orderInfo } = this;
let _value = e.detail.value;
// ····
let _timeArr = _value.split(':');
let _dimension = orderInfo.time_dimension;
let _end_hour = util.formatNumber(+_timeArr[0]+(parseInt((+_dimension*60+(+_timeArr[1]))/60)));
let _end_min = util.formatNumber((+_dimension*60+(+_timeArr[1]))%60)
let _endTime = `${_end_hour}:${_end_min}`
// ····
this.orderInfo.startTime = _value;
this.orderInfo.endTime = _endTime;
this.$nextTick(_=>this.$forceUpdate());
},
modalEndTime(e){
@ -189,6 +200,7 @@ export default {
date: '',
startTime: '',
endTime: '',
time_dimension: e.time_dimension
}
util.showLoad();
servers.get({

Loading…
Cancel
Save