|
|
@ -1,16 +1,18 @@ |
|
|
|
<template> |
|
|
|
<view class="book-page btPadding" v-show="bookInfo"> |
|
|
|
<view class="book-page btPadding" v-if="bookInfo"> |
|
|
|
<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" @editevent="edit" v-if="item.show" v-for="(item,key) in list" :key="key" :indexkey="key" :info="item" :leftTitle="item.leftTitle" :rightTitle="item.rightTitle?item.rightTitle:''"> |
|
|
|
<!-- #ifdef H5 --> |
|
|
|
<view class="item-inner" v-html="item.custom" v-if="item.custom" @click="edit" :data-item="item" :data-key="key"></view> |
|
|
|
<!-- #endif --> |
|
|
|
</list-box> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="bot-con" v-show="hasRecord"> |
|
|
|
<view class="bot-con" v-if="hasRecord"> |
|
|
|
<view class="title PfScMedium">治疗记录</view> |
|
|
|
<visitor-account @hasrecord="hasrecord" :open="true" :disabled="true" :depart_id="depart_id" :visitor_id="visitor_id" :visit_record="true" :visit_id="bookId" cusstyle="background:#F8FFF7;padding:0;"></visitor-account> |
|
|
|
<view class="visitor-account"> |
|
|
|
<VisitorAccount :isOpen="visitorAccountOpen" :visitorInfo="visitorInfo" :open="true"/> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="bot-con"> |
|
|
@ -29,9 +31,7 @@ |
|
|
|
<view :class="'ccpop'+(popkey==1?' bed-edit-pop':'')"> |
|
|
|
<uni-popup ref="popup" type="bottom" background-color="#fff"> |
|
|
|
<view class="edit-pop-title PfScSemibold">{{poptitle}}</view> |
|
|
|
|
|
|
|
<user-card :ref="'usercard_'+key" v-for="(item, key) in visitorList" :dataitem="item" @clickEvent="changeType" :index="key" :showuinfo="false"></user-card> |
|
|
|
|
|
|
|
<view class="submit flex submit-popup"> |
|
|
|
<view :class="'btn cancel'+(' btn1')" hover-class="hover" @click="closepop">取消</view> |
|
|
|
<view class="btn primary btn1" hover-class="hover" @click="submitEdit">确认修改</view> |
|
|
@ -50,13 +50,16 @@ |
|
|
|
import userCard from '@/components/userCard.vue'; |
|
|
|
|
|
|
|
export default { |
|
|
|
options: { styleIsolation: "shared" }, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
statusList:{'9':'text_wait', '1':'text_ing', '2':'text_down', '3':'text_out_num', '4':'text_expire', '5':'text_cancle'}, |
|
|
|
statusStyleList:{'0':'status_wait', '1':'status_ing', '2':'status_down', '3':'status_out_num', '4':'status_expire','5':'status_cancle'}, |
|
|
|
visitorInfo:{}, |
|
|
|
status:'', |
|
|
|
notice:"", |
|
|
|
visit_id:0, |
|
|
|
visitorAccountOpen:true, |
|
|
|
hasRecord:false, |
|
|
|
list:[ |
|
|
|
{'leftTitle':'候诊状态','custom':"",show:true,edit:false}, |
|
|
@ -93,6 +96,7 @@ |
|
|
|
this.$func.toPage('/pages/index/index') |
|
|
|
return; |
|
|
|
} |
|
|
|
this.getVisitorInfo() |
|
|
|
this.getBookDetail() |
|
|
|
}, |
|
|
|
components:{ |
|
|
@ -101,6 +105,20 @@ |
|
|
|
userCard |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
async getVisitorInfo() { |
|
|
|
var obj = new Object() |
|
|
|
obj.visit_id = this.bookId |
|
|
|
obj.visitor_id = this.visitor_id |
|
|
|
obj.depart_id = this.depart_id |
|
|
|
obj.visit_record = 1 |
|
|
|
this.$http.req('/api/user/get_visitor_info', obj, 'POST').then(data=>{ |
|
|
|
if(data == -1) return |
|
|
|
data.detail = true |
|
|
|
data.istreat = true |
|
|
|
this.hasRecord = true |
|
|
|
this.visitorInfo = {...data,visit_id:this.bookId} |
|
|
|
}); |
|
|
|
}, |
|
|
|
hasrecord(res) { |
|
|
|
this.hasRecord = res == 1 ? true : false |
|
|
|
}, |
|
|
@ -148,7 +166,7 @@ |
|
|
|
this.$refs.popup.open('bottom') |
|
|
|
setTimeout(function(){ |
|
|
|
this.$refs.usercard_0[0].setTypeValue(this.wait_type) |
|
|
|
if(this.bookInfo.bed_desc) this.$refs.usercard_0[0].setType(this.bookInfo.bed_desc) |
|
|
|
if(this.bookInfo.bed_desc && this.bookInfo.bed_desc != '未备注床位') this.$refs.usercard_0[0].setType(this.bookInfo.bed_desc) |
|
|
|
}.bind(this)); |
|
|
|
|
|
|
|
}, |
|
|
@ -187,8 +205,47 @@ |
|
|
|
this.$func.toPage('/pages/index/index') |
|
|
|
}, |
|
|
|
changeType() { |
|
|
|
|
|
|
|
}, |
|
|
|
// #ifdef MP-WEIXIN |
|
|
|
getStatusTextStyle(status) { |
|
|
|
var statusTextStyle = 'display:block;border-radius:'+uni.rpx2px(6)+'px;font-size:'+uni.rpx2px(26)+'px;height:'+uni.rpx2px(40)+'px;line-height:'+uni.rpx2px(38)+'px;padding:0 '+uni.rpx2px(18)+'px;box-sizing:border-box;text-align:center;width:auto;'; |
|
|
|
switch(status) { |
|
|
|
case '0': |
|
|
|
return statusTextStyle + 'background:#F8FFF7;border:'+uni.rpx2px(1)+'px solid #5BD07A;color:#58CA7F;'; |
|
|
|
case '1': |
|
|
|
return statusTextStyle + 'border:'+uni.rpx2px(1)+'px solid #5FA1CB;background:#F7FCFF;color:#5FA1CB;'; |
|
|
|
case '2': |
|
|
|
return statusTextStyle + 'background:#FCFCFC;border:'+uni.rpx2px(1)+'px solid #999999;color:#999999;'; |
|
|
|
case '3': |
|
|
|
return statusTextStyle + 'background:#FFFAF7;color:#FE6710;border:'+uni.rpx2px(1)+'px solid #FE6710;'; |
|
|
|
case '4': |
|
|
|
return statusTextStyle + 'background:#FFEEEE;border:'+uni.rpx2px(1)+'px solid #FD0000;color:#FD3B3B;'; |
|
|
|
case '5': |
|
|
|
return statusTextStyle + 'background:#FCFCFC;border:'+uni.rpx2px(1)+'px solid #AEB0B8;color:#B6B8BF;'; |
|
|
|
default: |
|
|
|
return statusTextStyle; |
|
|
|
} |
|
|
|
}, |
|
|
|
getBookDateStatusStyle(status) { |
|
|
|
var bookDateStyle = 'height:'+uni.rpx2px(45)+'px;font-size:'+uni.rpx2px(32)+'px;line-height:'+uni.rpx2px(45)+'px;'; |
|
|
|
switch(status) { |
|
|
|
case '1': |
|
|
|
return bookDateStyle+'color:#666666;'; |
|
|
|
case '2': |
|
|
|
return bookDateStyle+'color:#999999;'; |
|
|
|
case '3': |
|
|
|
return bookDateStyle+'color:#FE6710;'; |
|
|
|
case '4': |
|
|
|
return bookDateStyle+'color:#FD3B3B;'; |
|
|
|
case '5': |
|
|
|
return bookDateStyle+'color:#B6B8BF;'; |
|
|
|
case '9': |
|
|
|
return bookDateStyle+'color:#58CA7F;'; |
|
|
|
default: |
|
|
|
return bookDateStyle+'#999999'; |
|
|
|
} |
|
|
|
}, |
|
|
|
// #endif |
|
|
|
getBookDetail(){ |
|
|
|
this.$http.req('api/user/get_appoint_detail', {appoint_id:this.bookId,depart_id:this.depart_id}, 'POST').then(data=>{ |
|
|
|
if(data == -1) { |
|
|
@ -216,8 +273,27 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// #ifdef H5 |
|
|
|
this.list[0].custom = "<view class='bi flex'><view class='"+this.status+" status'><view class='over status_text'>"+status_desc+"</view></view>" |
|
|
|
this.list[1].custom = "<view class='bi flex'><text>"+bookInfo.bed_desc+"</text>" |
|
|
|
// #endif |
|
|
|
|
|
|
|
// #ifdef MP-WEIXIN |
|
|
|
var bistyle = 'display:flex;align-items:center;column-gap:'+uni.rpx2px(12)+'px;'; |
|
|
|
var biimgstyle = 'width:'+uni.rpx2px(42)+'px;height:'+uni.rpx2px(42)+'px;'; |
|
|
|
var statusStyle = 'display:flex;justify-content:flex-end;'; |
|
|
|
|
|
|
|
var textWaitStyle = 'color:#58CA7F;'; |
|
|
|
var textIngStyle = 'color:#5FA1CB;'; |
|
|
|
var textDownStyle = 'color:#999999;'; |
|
|
|
var textOutNumStyle = 'color:#FE6710;'; |
|
|
|
var textExpireCancleStyle = 'color:#B6B8BF;'; |
|
|
|
|
|
|
|
this.list[0].custom = "<div style='"+bistyle+"'><div class='"+this.status+" status' style='"+statusStyle+"'><div class='over status_text' style='"+this.getStatusTextStyle(bookInfo.status)+"'>"+status_desc+"</div></div>" |
|
|
|
this.list[1].custom = "<div style='"+bistyle+"'><span>"+bookInfo.bed_desc+"</span>" |
|
|
|
// #endif |
|
|
|
|
|
|
|
|
|
|
|
if(bookInfo.bed_desc) { |
|
|
|
this.list[1].show = true |
|
|
|
}else{ |
|
|
@ -225,8 +301,8 @@ |
|
|
|
} |
|
|
|
|
|
|
|
if(bookInfo.status == 0) { |
|
|
|
this.list[0].custom += '<img src="'+this.cssUrl+'bi.svg">' |
|
|
|
this.list[1].custom += '<img src="'+this.cssUrl+'bi.svg">' |
|
|
|
this.list[0].custom += '<img style="'+biimgstyle+'" src="'+this.cssUrl+'bi.svg">' |
|
|
|
this.list[1].custom += '<img style="'+biimgstyle+'" src="'+this.cssUrl+'bi.svg">' |
|
|
|
this.list[0].edit = true |
|
|
|
this.list[1].edit = true |
|
|
|
}else{ |
|
|
@ -234,15 +310,33 @@ |
|
|
|
this.list[0].edit = false |
|
|
|
this.list[1].edit = false |
|
|
|
} |
|
|
|
|
|
|
|
// #ifdef H5 |
|
|
|
this.list[0].custom += '</view>' |
|
|
|
this.list[1].custom += '</view>' |
|
|
|
// #endif |
|
|
|
|
|
|
|
// #ifdef MP-WEIXIN |
|
|
|
this.list[0].custom += '</div>' |
|
|
|
this.list[1].custom += '</div>' |
|
|
|
// #endif |
|
|
|
|
|
|
|
this.list[2].rightTitle = bookInfo.name |
|
|
|
this.list[3].rightTitle = bookInfo.hospital_name |
|
|
|
this.list[4].rightTitle = bookInfo.depart_name |
|
|
|
this.list[5].rightTitle = bookInfo.doctor_name ? bookInfo.doctor_name : '无' |
|
|
|
this.list[6].show = false |
|
|
|
|
|
|
|
// #ifdef H5 |
|
|
|
this.list[7].custom = "<view class='book-date "+this.statusList[bookInfo.status]+"'>"+bookInfo.visit_date+' '+bookInfo.week_desc+' '+bookInfo.visit_time+"</view>" |
|
|
|
// #endif |
|
|
|
|
|
|
|
// #ifdef MP-WEIXIN |
|
|
|
this.list[7].custom = "<div class='book-date "+this.statusList[bookInfo.status]+"' style='"+this.getBookDateStatusStyle(bookInfo.status)+"'>"+bookInfo.visit_date+' '+bookInfo.week_desc+' '+bookInfo.visit_time+"</div>" |
|
|
|
// #endif |
|
|
|
|
|
|
|
this.notice = bookInfo.notice; |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
@ -257,6 +351,7 @@ |
|
|
|
background: #F6F6F6; |
|
|
|
overflow-y: auto; |
|
|
|
box-sizing: border-box; |
|
|
|
|
|
|
|
.ccpop{ |
|
|
|
&.bed-edit-pop{ |
|
|
|
::v-deep{ |
|
|
@ -269,6 +364,7 @@ |
|
|
|
.card-cus-txt{ |
|
|
|
display: none; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
::v-deep{ |
|
|
@ -311,6 +407,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// #ifdef H5 |
|
|
|
.list-box{ |
|
|
|
.item-wrapper{ |
|
|
|
.item-inner ::v-deep{ |
|
|
@ -375,30 +472,10 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.queue-text{ |
|
|
|
height: 40rpx; |
|
|
|
font-size: 28rpx; |
|
|
|
color: #242833; |
|
|
|
line-height: 40rpx; |
|
|
|
.queue-num-txt{ |
|
|
|
height: 48rpx; |
|
|
|
font-weight: 600; |
|
|
|
font-size: 48rpx; |
|
|
|
color: #39D067; |
|
|
|
line-height: 48rpx; |
|
|
|
margin: 0 8rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
.book-date{ |
|
|
|
height: 45rpx; |
|
|
|
font-size: 32rpx; |
|
|
|
line-height: 45rpx; |
|
|
|
&.wait{ |
|
|
|
color: #39D067; |
|
|
|
} |
|
|
|
&.expire{ |
|
|
|
color: #FD7B13; |
|
|
|
} |
|
|
|
} |
|
|
|
.text_wait{ |
|
|
|
color: #58CA7F; |
|
|
@ -418,10 +495,11 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// #endif |
|
|
|
.bot-con{ |
|
|
|
background: #FFFFFF; |
|
|
|
margin-top: 15rpx; |
|
|
|
padding: 40rpx 27rpx; |
|
|
|
padding: 40rpx 24rpx; |
|
|
|
box-sizing: border-box; |
|
|
|
overflow: hidden; |
|
|
|
min-height: 430rpx; |
|
|
@ -431,6 +509,7 @@ |
|
|
|
color: #000000; |
|
|
|
line-height: 44rpx; |
|
|
|
letter-spacing: 2rpx; |
|
|
|
margin-bottom: 16rpx; |
|
|
|
} |
|
|
|
.content{ |
|
|
|
margin-top: 16rpx; |
|
|
|