diff --git a/components/visitorAccount.vue b/components/visitorAccount.vue
index fe7ec67..f4d26d5 100644
--- a/components/visitorAccount.vue
+++ b/components/visitorAccount.vue
@@ -77,7 +77,7 @@ export default {
default: 0
},
visitorInfo: {
- type: Object,
+ type: [Object, Array],
default: () => { }
},
},
diff --git a/pages/visitors/visitors.vue b/pages/visitors/visitors.vue
index 4ff136f..d954660 100644
--- a/pages/visitors/visitors.vue
+++ b/pages/visitors/visitors.vue
@@ -13,15 +13,16 @@
{{item.name}}
已预约今日 {{ item.visit_time.split('-')[0] }} 预约
- 新
+ 首次
-
{{item.sex}}| {{ item.age }}岁
|手机号:{{ item.phone }}
-
+
+
+
+
@@ -30,18 +31,20 @@
今日没有预约哦,请先预约时间
-
+
返回
现在预约
+ 请先勾选就诊人,可多选
确认预约(已选{{selectCount}}位)
-
+
+ 请先勾选就诊人,可多选
确认以上患者已到(已选{{selectCount}}位)
@@ -320,7 +323,7 @@
}
this.$http.req('api/user/get_visitors', obj, 'POST').then(data=>{
- this.visitUsers = data;
+ this.visitUsers = data;
if(this.visitUsers.length == 0 && !obj.get_preview) {
this.addVisitor()
return;
@@ -385,7 +388,7 @@
uni.setStorageSync('active_visitors', JSON.stringify(this.activeVisitors))
// 确认报道 => 跳转候诊方式
- if((this.type == 0 || this.type == 1) && !this.is_preview){
+ if((this.type == 0 || this.type == 1) && !this.is_preview){
uni.setStorageSync('methods_set_wait', 1)
this.$nav.navToPath('/pages/waiting_method/waiting_method')
return
@@ -499,17 +502,28 @@
}
&.active{
border: 2rpx solid #39D067;
- .status{
- display: block;
+ .status:first-of-type{
+ display: none !important;
+ }
+ .status:nth-of-type(2){
+ display: block !important;
}
}
.status{
- right: 0;
- bottom: 0;
- width: 98rpx;
- height: 98rpx;
+ right: 24rpx;
+ bottom: 37rpx;
+ width: 36rpx;
+ height: 36rpx;
+ z-index: 2;
+ }
+
+ .status:first-of-type{
+ display: block;
+ }
+ .status:nth-of-type(2){
display: none;
}
+
.bg{
bottom: 0;
right: 0;
@@ -587,6 +601,12 @@
color: #B3B4BC;
margin-top: 33rpx;
}
+ .choose-desc{
+ font-size: 28rpx;
+ text-align: center;
+ color: #21B955;
+ margin-bottom: 19rpx;
+ }
}
.list-wrapper2{
.item{
diff --git a/pages/visitors_new/visitors_new.vue b/pages/visitors_new/visitors_new.vue
index f8f41b3..278406b 100644
--- a/pages/visitors_new/visitors_new.vue
+++ b/pages/visitors_new/visitors_new.vue
@@ -2,10 +2,10 @@
-
+
-
+
@@ -27,7 +27,7 @@
visitor_list:false,
visitor_id:0,
pageShow:false,
- visitorInfo:{},
+ visitorInfo:[],
isOpen:false
}
},
@@ -44,28 +44,20 @@
},
modifyVisitor(e) {
var visitor = e.currentTarget.dataset.item
-
- // var is_jump = true
- // if(visitor.h_list && visitor.h_list.length > 0) {
- // is_jump = false
- // if(e.detail.y < 291){
- // is_jump = true
- // }
- // }
- // if(!is_jump) return
uni.setStorageSync('visitor_info_'+visitor.id, JSON.stringify(visitor))
this.$func.toPage("/pages/modify_visitor/modify_visitor?type="+this.type+'&vid='+visitor.id)
},
stopModifyVisitor(e) {
- console.log(e)
},
closeCollapse() {
this.isOpen = false
},
pageInit() {
+ this.visitor_list = false
+ this.pageShow = false
this.$refs.visitors.getVisitors()
},
- setVisitorListData(e) {
+ async setVisitorListData(e) {
this.visitor_list = e.map(item=>{
if(item.h_list && item.h_list.length > 0){
item.h_list.forEach((item1)=>{item1.isOpen = false})
@@ -73,28 +65,43 @@
return item
})
+ for(var key in this.visitor_list) {
+ var item = this.visitor_list[key]
+ this.visitorInfo[item.id] = new Array()
+ for(var key1 in item.h_list){
+ var item2 = item.h_list[key1]
+ this.visitorInfo[item.id][item2.depart_id] = false
+
+ var param = new Object()
+ param.visitor_id = item.id
+ param.depart_id = item2.depart_id
+
+ this.visitor_list[key].h_list[key1].isOpen = true
+ await this.get_visitor_info(param)
+ }
+ }
+
this.pageShow = true
},
getVisitorListData(visitor_id){
this.visitor_id = visitor_id
+ this.visitor_list = false
+ this.pageShow = false
+ this.$refs.visitors.getVisitors()
},
- get_visitor_info(param) {
- this.visitorInfo = false
-
+ async get_visitor_info(param) {
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=>{
+ await 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)
- // }
+ var visitorinfo = this.visitorInfo
+ visitorinfo[param.visitor_id][param.depart_id] = data
+
+ this.visitorInfo = visitorinfo
+ this.isOpen = true
});
}
}