|
@ -1,5 +1,5 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class="book-page btPadding"> |
|
|
<view class="book-page btPadding" v-if="bookInfo"> |
|
|
<view class="list-box"> |
|
|
<view class="list-box"> |
|
|
<list-box class="item-wrapper" v-if="item.show" v-for="(item,key) in list" :key="key" :leftTitle="item.leftTitle" :rightTitle="item.rightTitle?item.rightTitle:''"> |
|
|
<list-box class="item-wrapper" v-if="item.show" v-for="(item,key) in list" :key="key" :leftTitle="item.leftTitle" :rightTitle="item.rightTitle?item.rightTitle:''"> |
|
|
<view class="item-inner" v-html="item.custom" v-if="item.custom"></view> |
|
|
<view class="item-inner" v-html="item.custom" v-if="item.custom"></view> |
|
@ -14,8 +14,10 @@ |
|
|
|
|
|
|
|
|
<view class="fixedBot btPadding"> |
|
|
<view class="fixedBot btPadding"> |
|
|
<view class="submit"> |
|
|
<view class="submit"> |
|
|
<view :class="'btn cancel'+(showCancelBook?' btn1':' btn3')" hover-class="hover">返回</view> |
|
|
<view :class="'btn cancel'+(showCancelBook || showReBook?' btn1':' btn3')" hover-class="hover" @click="reback">返回</view> |
|
|
<view class="btn primary btn1" hover-class="hover" v-if="showCancelBook">取消预约</view> |
|
|
<view class="btn primary btn1" hover-class="hover" v-if="showCancelBook && !showReBook" @click="cancelBook">取消预约</view> |
|
|
|
|
|
<view class="btn primary btn1" hover-class="hover" v-if="showReBook && !showCancelBook" @click="rebook">重新预约</view> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -27,37 +29,89 @@ |
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
// data:['status_wait', 'status_out_num', 'status_down', 'status_expire', 'status_ing', 'status_down', 'status_expire', 'status_ing'], |
|
|
statusList:['status_wait', 'status_ing', 'status_out_num', 'status_expire', 'status_down'], |
|
|
status:'status_wait', |
|
|
statusDescList:['候诊', '就诊中', '过号', '已过期', '已完成'], |
|
|
|
|
|
status:'', |
|
|
queueNum:88, |
|
|
queueNum:88, |
|
|
bookDate:"2024.01.09 周二 09:30-12:00", |
|
|
bookDate:"2024.01.09 周二 09:30-12:00", |
|
|
notice:"挂号方式:现场窗口挂号<br>流程:全部挂号,针灸病人按照本系统预约时段排床,拿药病人按叫号顺序就诊<br>其他:请准备一次性医用床单(可现场购买)和户外保温毯(推荐)", |
|
|
notice:"", |
|
|
list:[ |
|
|
list:[ |
|
|
{'leftTitle':'状态','custom':"",show:true}, |
|
|
{'leftTitle':'状态','custom':"",show:true}, |
|
|
{'leftTitle':'就诊人','rightTitle':'上官梓涵',show:true}, |
|
|
{'leftTitle':'就诊人','rightTitle':'',show:true}, |
|
|
{'leftTitle':'就诊医院','rightTitle':'广安门中医医院西单门诊部',show:true}, |
|
|
{'leftTitle':'就诊医院','rightTitle':'',show:true}, |
|
|
{'leftTitle':'就诊科室','rightTitle':'针灸科',show:true}, |
|
|
{'leftTitle':'就诊科室','rightTitle':'',show:true}, |
|
|
{'leftTitle':'医生','rightTitle':'李静',show:true}, |
|
|
{'leftTitle':'医生','rightTitle':'',show:true}, |
|
|
{'leftTitle':'排队情况','custom':"",show:true}, |
|
|
{'leftTitle':'排队情况','custom':"",show:true}, |
|
|
{'leftTitle':'就诊时间','custom':"",show:true} |
|
|
{'leftTitle':'就诊时间','custom':"",show:true} |
|
|
], |
|
|
], |
|
|
showCancelBook:false |
|
|
showCancelBook:false, |
|
|
|
|
|
redirect:'/pages/prebook_list/prebook_list', |
|
|
|
|
|
bookId:false, |
|
|
|
|
|
bookInfo:false, |
|
|
|
|
|
showReBook:false |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
onLoad(option) { |
|
|
|
|
|
// if(option.index) this.redirect = '/pages/index/index' |
|
|
|
|
|
if(option.id) this.bookId = option.id |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
onShow() { |
|
|
onShow() { |
|
|
this.list[0].custom = "<view class='"+this.status+" status'><view class='over status_text'>候诊</view></view>" |
|
|
if(!this.bookId){ |
|
|
this.list[5].custom = "<view class='queue-text'>前方<text class='queue-num-txt PfScSemibold'>"+this.queueNum+"</text>人</view>" |
|
|
this.$func.toPage('/pages/index/index') |
|
|
this.list[6].custom = "<view class='book-date wait'>"+this.bookDate+"</view>" |
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
this.getBookDetail() |
|
|
}, |
|
|
}, |
|
|
components:{ |
|
|
components:{ |
|
|
listBox |
|
|
listBox |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
cancelBook(){ |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
rebook(){ |
|
|
|
|
|
this.$func.toPage('/pages/index/index') |
|
|
|
|
|
}, |
|
|
|
|
|
reback(){ |
|
|
|
|
|
this.$func.toPage('/pages/index/index') |
|
|
|
|
|
}, |
|
|
|
|
|
getBookDetail(){ |
|
|
|
|
|
this.$http.req('client/user/appoint/'+this.bookId, {}, 'GET').then(data=>{ |
|
|
|
|
|
if(data == -1) { |
|
|
|
|
|
this.bookInfo = false |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var bookInfo = data.data |
|
|
|
|
|
if(bookInfo && bookInfo.length <= 0){ |
|
|
|
|
|
this.$pop.modelShow('预约信息为空') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bookInfo = data |
|
|
|
|
|
this.bookInfo = bookInfo |
|
|
|
|
|
bookInfo.status = 2 |
|
|
|
|
|
this.status = this.statusList[bookInfo.status] |
|
|
|
|
|
if(bookInfo.status==3) this.showReBook = true |
|
|
|
|
|
if(bookInfo.status==2) this.showCancelBook = true |
|
|
|
|
|
this.list[0].custom = "<view class='"+this.status+" status'><view class='over status_text'>"+this.statusDescList[bookInfo.status]+"</view></view>" |
|
|
|
|
|
this.list[1].rightTitle = bookInfo.username; |
|
|
|
|
|
this.list[2].rightTitle = bookInfo.visit_hospital.hospital_name |
|
|
|
|
|
this.list[3].rightTitle = bookInfo.visit_hospital.hospital_dept_name |
|
|
|
|
|
this.list[4].rightTitle = bookInfo.visit_hospital.doctor_name ? bookInfo.visit_hospital.doctor_name : '无' |
|
|
|
|
|
this.list[5].custom = "<view class='queue-text'>前方<text class='queue-num-txt PfScSemibold'>"+bookInfo.wait_count+"</text>人</view>" |
|
|
|
|
|
if(bookInfo.wait_count<=0) this.list[5].show = false |
|
|
|
|
|
this.list[6].custom = "<view class='book-date"+(bookInfo.status==0?' wait':' expire')+"'>"+bookInfo.create_datetime+"</view>" |
|
|
|
|
|
this.notice = bookInfo.visit_hospital.remind_text |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
<style lang="scss" scoped> |
|
|
|
|
|
|
|
|
.book-page{ |
|
|
.book-page{ |
|
|
height: 100vh; |
|
|
height: 100vh; |
|
|
width: 100%; |
|
|
width: 100%; |
|
@ -161,6 +215,7 @@ |
|
|
padding: 40rpx 27rpx; |
|
|
padding: 40rpx 27rpx; |
|
|
box-sizing: border-box; |
|
|
box-sizing: border-box; |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
|
|
|
min-height: 430rpx; |
|
|
.title{ |
|
|
.title{ |
|
|
height: 44rpx; |
|
|
height: 44rpx; |
|
|
font-size: 32rpx; |
|
|
font-size: 32rpx; |
|
|