From 1a6abfaa502b446019d13a8110b6c79bc0fa39be Mon Sep 17 00:00:00 2001 From: lyc Date: Fri, 30 Aug 2024 14:15:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=A2=84=E7=BA=A6=E8=AF=BE=E7=A8=8B-?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/prepare/container/reserv.vue | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/renderer/src/views/prepare/container/reserv.vue b/src/renderer/src/views/prepare/container/reserv.vue index f08e0ec..57f0c97 100644 --- a/src/renderer/src/views/prepare/container/reserv.vue +++ b/src/renderer/src/views/prepare/container/reserv.vue @@ -177,14 +177,19 @@ const disabledHours = ()=>{ } } // 限制分-返回被禁选的 -const disabledMinute = () => { +const disabledMinute = (hour,role) => { if(getCurrentTime('YYYY-MM-DD') == form.day){ const arrs = [] - for (let i = 0; i < 60; i++) { - if (new Date().getMinutes() <= i && form.time[0]) continue; - arrs.push(i) + if(role == 'start'){ + for (let i = 0; i < 60; 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.time = [getCurrentTime('HH:mm'), getAfterMinutes(45)] + console.log(getCurrentTime('HH:mm'), getAfterMinutes(45)) } centerDialogVisible.value = true } -- 2.44.0.windows.1 From 05c567d1cdcfa6ffbd03203564a6b8bd512ff15f Mon Sep 17 00:00:00 2001 From: lyc Date: Fri, 30 Aug 2024 14:28:55 +0800 Subject: [PATCH 2/2] console --- src/renderer/src/views/prepare/container/reserv.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/renderer/src/views/prepare/container/reserv.vue b/src/renderer/src/views/prepare/container/reserv.vue index 57f0c97..ed2ee39 100644 --- a/src/renderer/src/views/prepare/container/reserv.vue +++ b/src/renderer/src/views/prepare/container/reserv.vue @@ -209,7 +209,6 @@ const openDialog = (data) => { // 默认当前时间 form.day = getCurrentTime('YYYY-MM-DD') form.time = [getCurrentTime('HH:mm'), getAfterMinutes(45)] - console.log(getCurrentTime('HH:mm'), getAfterMinutes(45)) } centerDialogVisible.value = true } -- 2.44.0.windows.1