Browse Source

就诊人页面样式交互兼容微信小程序

master
kuaileWu 3 months ago
parent
commit
b14d3ec9d6
  1. 39
      components/listBox.vue
  2. 7
      components/preBookList.vue
  3. 343
      components/visitorAccount.vue
  4. 145
      pages/visit_detail/visit_detail.vue
  5. 38
      pages/visitors_new/visitors_new.vue

39
components/listBox.vue

@ -7,7 +7,13 @@
<view class="right">
<!-- #ifdef MP-WEIXIN -->
<template>{{rightTitle}}</template>
<template v-if="rightTitle">
{{rightTitle}}
</template>
<template v-else-if="indexkey >= 0 && Object.keys(info).length > 0">
<view class="item-inner" v-html="info.custom" v-if="info.custom" @click="edit" :data-item="info" :data-key="indexkey"></view>
</template>
<!-- #endif -->
<!-- #ifdef H5 -->
@ -21,22 +27,36 @@
<script>
export default {
options: {
styleIsolation: 'shared'
},
name: "listBox",
props: {
leftTitle: {
type: String,
default: ""
},
rightTitle: {
type: String,
default: ""
}
leftTitle: {
type: String,
default: ""
},
rightTitle: {
type: String,
default: ""
},
info: {
type: Object,
default: {}
},
indexkey: {
type: Number,
default: -1
}
},
data() {
return {
}
},
methods: {
edit(e) {
this.$emit('editevent', e)
}
}
};
</script>
@ -73,6 +93,5 @@ export default {
justify-content: flex-end;
}
}
}
</style>

7
components/preBookList.vue

@ -12,8 +12,7 @@
<view class="right">
<view :class="statusStyleList[item.status_desc]+' status'"><view class="over">{{item.status_desc}}</view></view>
<view class="queue-num" v-if="item.status_desc=='候诊' && item.wait_visit_count && item.wait_visit_count>0"><view>前方<text class="PfScSemibold">{{item.wait_visit_count}}</text></view> </view>
<view class="bedDesc" v-if="item.bed_desc">{{item.bed_desc}}</view>
<view class="bedDesc" v-if="item.bed_desc && item.status_desc=='待就诊'">{{item.bed_desc}}</view>
</view>
</view>
</view>
@ -43,7 +42,7 @@ export default {
},
methods: {
toBookDetail(item){
this.$nav.navToPath('/pages/visit_detail/visit_detail?id='+item.id+'&depart_id='+item.depart_id+'&visitor_id='+item.visitor_id)
this.$nav.navToPath('/pages/visit_detail/visit_detail?id='+item.id+'&depart_id='+item.depart_id+'&visitor_id='+item.visitor_id)
},
}
};
@ -129,7 +128,7 @@ export default {
display: flex;
border-radius: 6rpx;
font-size: 26rpx;
line-height: 36rpx;
line-height: 40rpx;
padding: 0 10rpx;
box-sizing: border-box;
min-width: 90rpx;

343
components/visitorAccount.vue

@ -1,52 +1,60 @@
<template>
<view :class="'visitor-account-com'+(open?' default-open':'')" :style="cusstyle?cusstyle:''">
<uni-collapse v-model="open?valueOpen:valueClose" @change="change">
<uni-collapse-item :title="hospital_name" :thumb="thumb" :errmsg="errmsg" :disabled="disabled">
<view class="collapse-list" v-if="visitorInfo">
<view :class="'visitor-account-com'+(open?' default-open':'')+(isOpen?' openstyle':'')">
<!-- <view class="visitor-account-com"> -->
<uni-collapse @change="change">
<uni-collapse-item :title="title ? title : ''" :thumb="thumb" :errmsg="errmsg" :disabled="disabled" :open="isOpen" v-if="visitorInfo">
<view class="collapse-list">
<view class="account-list">
<!-- 单次项目 -->
<view class="account-item" v-if="visitorInfo.single_items && visitorInfo.single_items.length > 0">
<view v-if="visitorInfo.single_items && Object.keys(visitorInfo.single_items).length" class="account-item">
<view class="title PfScSemibold">单次项目</view>
<view class="item" v-for="(item, index) in visitorInfo.single_items" :key="'single_'+index">
<text>{{item.name}}</text>
<text :class="{'outnum': parseInt(item.num) < 0}">{{parseInt(item.num) >= 0 ? '治疗'+item.num+'次' : '欠'+Math.abs(parseInt(item.num))+'次'}}</text>
<view class="item" v-for="(item, key) in visitorInfo.single_items" v-if="item.num != 0">
<text>{{ item.name }}</text>
<text v-if="item.num > 0">{{visitorInfo.istreat ? '治疗':''}}{{ item.num }}</text>
<text class="outnum" v-if="item.num < 0">{{ -item.num }}</text>
</view>
</view>
<!-- 疗程套餐 -->
<view class="account-item" v-if="visitorInfo.treatment_package && Object.keys(visitorInfo.treatment_package).length > 0">
<view class="title PfScSemibold">疗程套餐</view>
<view class="accout-package" v-for="(packageItem, packageId) in visitorInfo.treatment_package" :key="'package_'+packageId">
<span class="package-name over">{{packageItem.name}}</span>
<view class="item" v-for="(item, index) in packageItem.data" :key="'package_item_'+index" :class="{'notice': parseInt(item.num) < 0}">
<text>{{item.name}}</text>
<text :class="{'outnum': parseInt(item.num) < 0}">{{parseInt(item.num) >= 0 ? '治疗'+item.num+'次' : '欠'+Math.abs(parseInt(item.num))+'次'}}</text>
<view class="accout-package" v-for="(item, key) in visitorInfo.treatment_package">
<view class="package-name over">
<view>{{ item.name }}</view>
</view>
<view class="item" v-for="(item2, key2) in item.data">
<text>{{ item2.name }}</text>
<text v-if="item2.num > 0">{{visitorInfo.istreat ? '治疗':''}}{{ item2.num }}</text>
<text class="outnum" v-if="item2.num < 0">{{ -item2.num }}</text>
</view>
</view>
</view>
</view>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
</view>
</template>
<script>
export default {
name: "visitorAccount",
props: {
name: "visitorAccount",
options: { styleIsolation: "shared" },
props: {
errmsg: {
type: String,
default: ''
},
cusstyle: {
title: {
type: String,
default: ''
},
thumb:{
thumb: {
type: String,
default:''
default: ''
},
open: {
type: Boolean,
@ -56,155 +64,200 @@ export default {
type: Boolean,
default: false
},
visit_record: {
isOpen: {
type: Boolean,
default: false
},
depart_id: {
type: [Number, String],
visitor_id:{
type: Number,
default: 0
},
visitor_id: {
type: [Number, String],
depart_id:{
type: Number,
default: 0
},
visit_id: {
type: [Number, String],
default: 0
visitorInfo: {
type: Object,
default: () => { }
},
hospital_name: {
type: String,
default: '医院科室'
},
data() {
return {
cssUrl: this.cssUrl,
valueOpen: ['0'],
valueClose: ['1'],
}
},
data() {
return {
cssUrl:this.cssUrl,
valueOpen:['0'],
valueClose:['1'],
visitorInfo: false
}
},
mounted() {
if(this.open) {
this.get_visitor_info();
}
},
methods: {
},
methods: {
change(e) {
if(e[0] == 0) this.get_visitor_info()
},
async get_visitor_info() {
this.visitorInfo = false
var obj = new Object()
obj.depart_id = this.depart_id
obj.visitor_id = this.visitor_id
if(this.visit_record) obj.visit_record = 1
if(this.visit_id) obj.visit_id = this.visit_id
await this.$http.req('api/user/get_visitor_info', obj, 'POST').then(data=>{
if(data == -1) return
this.visitorInfo = data;
if((this.visitorInfo.single_items && this.visitorInfo.single_items.length > 0) || (this.visitorInfo.treatment_package && Object.keys(this.visitorInfo.treatment_package).length > 0)) {
this.$emit('hasrecord', 1)
}else{
this.$emit('hasrecord', 0)
}
});
if(e[0] != 0) {
this.$emit('closeEvent')
return;
}
const object = {
visitor_id: this.visitor_id,
depart_id: this.depart_id
}
this.$emit('getinfo', object)
}
}
}
};
</script>
<style lang="scss" scoped>
.visitor-account-com{
::v-deep .uni-collapse-item{
color:red;
}
.visitor-account-com {
width: 100%;
height: auto;
overflow: hidden;
&.default-open {
::v-deep {
.uni-collapse-item__title.uni-collapse-item-border {
display: none;
}
}
}
&.openstyle {
::v-deep {
.uni-collapse-item .error{
margin-top: 24rpx;
margin-bottom: 24rpx;
}
}
}
::v-deep {
.uni-collapse-item{
padding: 24rpx;
}
.uni-collapse-item__title-box {
height: 86rpx;
line-height: 86rpx;
}
.uni-collapse-item__title-text {
font-size: 28rpx;
color: #333333;
font-weight: 700;
}
@supports (-webkit-touch-callout: none) {
.uni-collapse-item__title-text {
font-weight: 600;
}
}
.uniui-bottom[data-v-a2e81f6e]:before {
content: "\e6b8";
color: #AEB0B8;
font-size: 32rpx;
}
.uni-collapse-item__title.uni-collapse-item-border {
border: none;
}
.uni-collapse {
background: #F8FFF7;
}
.uni-collapse-item__title-box {
padding: 0 24rpx;
}
.uni-collapse-item__title-box {
background: #F8FFF7;
}
.uni-collapse-item__wrap {
background: #F9FAFB;
.uni-collapse-item__wrap-content {
background: #F8FFF7;
margin-bottom: 24rpx;
border: none;
&.open {}
}
}
}
.account-list {
padding: 24rpx;
box-sizing: border-box;
width: 100%;
height: auto;
overflow: hidden;
margin-top: 28rpx;
padding: 12px;
box-sizing: border-box;
background: #F9FAFB;
&.default-open{
::v-deep{
.uni-collapse-item__title{
display: none !important;
}
.account-list{
margin-top: 0 !important;
.account-item {
margin-bottom: 40rpx;
&:last-of-type {
margin-bottom: 24rpx;
}
.title {
font-size: 28rpx;
color: #333333;
}
.item {
display: flex;
justify-content: space-between;
align-items: center;
height: 38rpx;
line-height: 38rpx;
margin-top: 24rpx;
font-size: 28rpx;
letter-spacing: 3.14rpx;
color: #333333;
text {
&.outnum {
color: #FD3B3B;
}
}
.uni-collapse-item__wrap{
margin-top: 16rpx;
}
.accout-package {
.title {
font-size: 28rpx;
color: #999999;
}
.uni-collapse-item__wrap-content{
border: none !important;
&:last-of-type {
margin-bottom: 0rpx;
}
}
}
::v-deep{
.uni-collapse-item__wrap-content{
border: none;
}
.uni-collapse-item__wrap{
background: #F9FAFB;
.uni-collapse-item__wrap-content{
background: #F8FFF7;
margin-bottom:24rpx;
&.open{
.account-list{
padding: 24rpx;
margin-top: 24rpx;
box-sizing: border-box;
width: 100%;
height: auto;
overflow: hidden;
.account-item{
margin-bottom: 40rpx;
&:last-of-type{
margin-bottom: 24rpx;
}
.item{
display: flex;
justify-content: space-between;
align-items: center;
height: 38rpx;
line-height: 38rpx;
margin-top: 24rpx;
font-size: 28rpx;
letter-spacing: 3.14rpx;
color: #333333;
text{
&.outnum{
color: #FD3B3B;
}
}
}
.accout-package{
&:last-of-type{
margin-bottom: 0rpx;
}
.package-name{
border-radius: 6rpx;
background: linear-gradient(270deg, #FFEFD5 0%, #FED9A6 100%);
height: 43rpx;
line-height: 43rpx;
padding: 0px 16rpx;
margin-top: 24rpx;
width: auto;
display: inline-block;
font-size: 28rpx;
color: #79624A;
text-align: center;
max-width: calc(100% - 24rpx);
}
}
}
}
.package-name {
display: flex;
height: 44rpx;
margin-top: 24rpx;
width: auto;
font-size: 28rpx;
color: #79624A;
max-width: calc(100% - 24rpx);
align-items: center;
view{
height: 28rpx;
background: linear-gradient(270deg, #FFEFD5 0%, #FED9A6 100%);
border-radius: 6rpx;
padding: 8rpx 16rpx;
line-height: 28rpx;
text-align: center;
width: auto;
display: inline-block;
}
}
}
}
}
}
</style>

145
pages/visit_detail/visit_detail.vue

@ -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;

38
pages/visitors_new/visitors_new.vue

@ -2,8 +2,10 @@
<view class='waiting-method-page'>
<visitor-list @clickEvent="getVisitorListData" @dataEvent="setVisitorListData" ref="visitors" :add="true"></visitor-list>
<uni-card v-if="visitor_id==0 || (visitor_id!=0 && visitor_id==item.id)" v-for="(item,key) in visitor_list" :title="item.name" :extra="'身份证:'+item.idcard_txt" :class="((visitor_list && item.h_list && item.h_list.length>0)?'':'empty')" margin="0 0 0rpx 0" shadow="none" :border="false" padding="24rpx">
<visitor-account v-for="(item2,key2) in item.h_list" :depart_id="item2.depart_id" :visitor_id="item.id" :thumb="cssUrl+'hicon.svg'" v-if="visitor_list && item.h_list && item.h_list.length>0" :errmsg="(!item2.weeks ? '' : ' '+(item2.weeks<=10?item2.weeks:('超过10')))+'周未看病,请及时复诊'"></visitor-account>
<uni-card v-if="(visitor_id==0 || (visitor_id!=0 && visitor_id==item.id)) && pageShow" v-for="(item,key) in visitor_list" :title="item.name" :extra="'身份证:'+item.idcard_txt" :class="((visitor_list && item.h_list && item.h_list.length>0)?'':'empty')" margin="0 0 0rpx 0" shadow="none" :border="false" padding="24rpx">
<view class="visitor-account">
<VisitorAccount @closeEvent="closeCollapse" @getinfo="get_visitor_info" :isOpen="isOpen" :title="item2.hospital+' '+item2.depart" v-for="(item2,key2) in item.h_list" :visitorInfo="visitorInfo" v-if="visitor_list && item.h_list && item.h_list.length>0" :depart_id="item2.depart_id" :visitor_id="item.id" :thumb="cssUrl+'hicon.svg'" :errmsg="(!item2.weeks ? '' : ' '+(item2.weeks<=10?item2.weeks:('超过10')))+'周未看病,请及时复诊'"/>
</view>
</uni-card>
<view class="bt btPadding"></view>
@ -21,6 +23,9 @@
depart_id:0,
visitor_list:false,
visitor_id:0,
pageShow:false,
visitorInfo:{},
isOpen:false
}
},
components:{
@ -31,22 +36,49 @@
this.pageInit()
},
methods: {
closeCollapse() {
this.isOpen = false
},
pageInit() {
this.$refs.visitors.getVisitors()
},
setVisitorListData(e) {
this.visitor_list = e
this.pageShow = true
},
getVisitorListData(visitor_id){
this.visitor_id = visitor_id
}
},
get_visitor_info(param) {
this.visitorInfo = false
var obj = new Object()
obj.depart_id = param.depart_id
obj.visitor_id = param.visitor_id
this.$http.req('api/user/get_visitor_info', obj, 'POST').then(data=>{
if(data == 1) return
this.visitorInfo = data
this.isOpen = true
// if((this.visitorInfo.single_items && this.visitorInfo.single_items.length > 0) || (this.visitorInfo.treatment_package && Object.keys(this.visitorInfo.treatment_package).length > 0)) {
// this.$emit('hasrecord', 1)
// }else{
// this.$emit('hasrecord', 0)
// }
});
}
}
}
</script>
<style lang="scss" scoped>
.waiting-method-page{
overflow: hidden;
.visitor-account{
margin-top: 28rpx;
}
::v-deep {
.uni-card{
border-radius: 0;

Loading…
Cancel
Save