From c6e09c0cef20e2642183762c021166fc6b76c20e Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 1 Dec 2025 13:47:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20mroombooking=E5=9C=A8=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E7=BC=96=E8=BE=91=E6=97=B6slot=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/ofm/mroombooking_form.vue | 51 +++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/pages/ofm/mroombooking_form.vue b/pages/ofm/mroombooking_form.vue index be22f32..c2f2147 100644 --- a/pages/ofm/mroombooking_form.vue +++ b/pages/ofm/mroombooking_form.vue @@ -55,7 +55,7 @@ 共{{totalCount}}小时 --> - + @@ -171,24 +171,24 @@ import {actStateEnum} from "@/utils/enum.js" } } await that.getmRooms(); - if(options.slots){ - that.form.slots = []; - let slots = options.slots.split(','); - if(slots.length>0){ - slots.forEach(item=>{ - let slot = Number(item); - that.form.slots.push(slot); - if(slot<12){ - that.timesListAm[slot].isSelect = true; - that.selectList.push(that.timesListAm[slot]) - }else{ - that.timesListPm[slot].isSelect = true; - that.selectList.push(that.timesListPm[slot]) - } - }) - that.totalCount = slots.length*0.5; - } - } + // if(options.slots){ + // that.form.slots = []; + // let slots = options.slots.split(','); + // if(slots.length>0){ + // slots.forEach(item=>{ + // let slot = Number(item); + // that.form.slots.push(slot); + // if(slot<12){ + // that.timesListAm[slot].isSelect = true; + // that.selectList.push(that.timesListAm[slot]) + // }else{ + // that.timesListPm[slot].isSelect = true; + // that.selectList.push(that.timesListPm[slot]) + // } + // }) + // that.totalCount = slots.length*0.5; + // } + // } }, methods:{ async getmRooms(){ @@ -270,11 +270,18 @@ import {actStateEnum} from "@/utils/enum.js" that.$api.bookingSlot(form).then(res=>{ res.forEach(item=>{ if(item.slot<12){ - that.timesListAm[item.slot].sloted = true; + if(item.booking == that.form.id) { + that.timesListAm[item.slot].isSelect = true; + }else{ + that.timesListAm[item.slot].sloted = true; + } }else{ - that.timesListPm[item.slot-12].sloted = true; + if(item.booking == that.form.id) { + that.timesListPm[item.slot-12].isSelect = true; + }else{ + that.timesListPm[item.slot-12].sloted = true; + } } - }) }) },