fix: mroombooking在初始状态编辑时slot问题
This commit is contained in:
parent
8e7e36ca29
commit
c6e09c0cef
|
|
@ -55,7 +55,7 @@
|
|||
<view>共{{totalCount}}小时</view> -->
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="footer_sticky">
|
||||
<view class="footer_fixed">
|
||||
<ticketd_b :workflow_key="'wf_mroombooking'" :title="form.title + '-会议室预定'" :t_id="form.id" :ticket_="form.ticket_"
|
||||
@success="submitSuccess" :submit_b_func="submit_b_func" ref="ticketd_b_start"></ticketd_b>
|
||||
</view>
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
})
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue