预约课程-时间限制
This commit is contained in:
parent
b249df2dff
commit
1a6abfaa50
|
@ -177,14 +177,19 @@ const disabledHours = ()=>{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 限制分-返回被禁选的
|
// 限制分-返回被禁选的
|
||||||
const disabledMinute = () => {
|
const disabledMinute = (hour,role) => {
|
||||||
if(getCurrentTime('YYYY-MM-DD') == form.day){
|
if(getCurrentTime('YYYY-MM-DD') == form.day){
|
||||||
const arrs = []
|
const arrs = []
|
||||||
for (let i = 0; i < 60; i++) {
|
if(role == 'start'){
|
||||||
if (new Date().getMinutes() <= i && form.time[0]) continue;
|
for (let i = 0; i < 60; i++) {
|
||||||
arrs.push(i)
|
if (new Date().getMinutes() <= i) continue;
|
||||||
|
arrs.push(i)
|
||||||
|
}
|
||||||
|
return arrs;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(form.time[0]) return []
|
||||||
}
|
}
|
||||||
return arrs;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,6 +209,7 @@ const openDialog = (data) => {
|
||||||
// 默认当前时间
|
// 默认当前时间
|
||||||
form.day = getCurrentTime('YYYY-MM-DD')
|
form.day = getCurrentTime('YYYY-MM-DD')
|
||||||
form.time = [getCurrentTime('HH:mm'), getAfterMinutes(45)]
|
form.time = [getCurrentTime('HH:mm'), getAfterMinutes(45)]
|
||||||
|
console.log(getCurrentTime('HH:mm'), getAfterMinutes(45))
|
||||||
}
|
}
|
||||||
centerDialogVisible.value = true
|
centerDialogVisible.value = true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue