diff --git a/pages.json b/pages.json index 6170386..fe916df 100644 --- a/pages.json +++ b/pages.json @@ -68,7 +68,7 @@ "path" : "pages/visitors/visitors", "style" : { - "navigationBarTitleText": "请选择就诊人", + "navigationBarTitleText": "", "enablePullDownRefresh": false } }, diff --git a/pages/visitors/visitors.vue b/pages/visitors/visitors.vue index 8a887b6..f11d654 100644 --- a/pages/visitors/visitors.vue +++ b/pages/visitors/visitors.vue @@ -30,7 +30,7 @@ 身份证尾号:{{item.id_no}} - + {{item2.hospital_name}} {{item2.hospital_dept}} 停诊 @@ -86,6 +86,7 @@ var type = uni.getStorageSync('visitor_type') if(type) this.type = type } + uni.setStorageSync('visitor_type', this.type) this.getVisitors() @@ -96,6 +97,15 @@ } }, onShow() { + if(this.type == 2){ + uni.setNavigationBarTitle({ + title:'就诊人' + }) + }else{ + uni.setNavigationBarTitle({ + title:'请选择就诊人' + }) + } }, methods: { chooseVisitor(info, key){ @@ -115,27 +125,28 @@ var server_time = data.server_time this.visitUsers = data.data this.popMsgs = [] + var popmsgIndex = 0 for (var i = 0; i < this.visitUsers.length; i++) { this.visitUsers[i].select = false - // this.visitUsers[i].hospital_info = [ - // { - // "times": -1, - // "hospital_name": "测试医院", - // "hospital_dept": "呼吸科", - // "hospital_state": true, - // "is_expire":true, - // "last_visit_time": "2021-01-12 13:16:26" - // }, + this.visitUsers[i].hospital_info = [ + { + "times": -1, + "hospital_name": "测试医院", + "hospital_dept": "呼吸科", + "hospital_state": true, + "is_expire":true, + "last_visit_time": "2021-01-12 13:16:26" + }, - // { - // "times": 10, - // "hospital_name": "测试医院", - // "hospital_dept": "呼吸科", - // "hospital_state": true, - // "is_expire":true, - // "last_visit_time": "2021-01-12 13:16:26" - // } - // ] + { + "times": 10, + "hospital_name": "测试医院", + "hospital_dept": "呼吸科", + "hospital_state": true, + "is_expire":true, + "last_visit_time": "2021-01-12 13:16:26" + } + ] try{ var dateService = new Date(server_time.replaceAll('-', "/")); @@ -168,6 +179,8 @@ popobj.popContent = this.visitUsers[i].real_name+'在'+hospitalInfo[j].hospital_name+hospitalInfo[j].hospital_dept+'须补挂号啦,请挂号缴费后告知医生' popobj.popTitle = "挂号提醒" } + popmsgIndex = this.popMsgs.length + this.visitUsers[i].hospital_info[j].popmsgIndex = popmsgIndex this.popMsgs.push(popobj) } }catch(et){ @@ -192,18 +205,27 @@ this.$refs.popcom.close() }, popConfirm(e, index){ - if(this.popMsgs.length > 0 && index<(this.popMsgs.length-1)){ - this.popIndex = index+1 - var popinfo = this.popMsgs[this.popIndex] - this.popContent = popinfo.popContent - this.popTitle = popinfo.popTitle - this.popShowCancel = popinfo.popShowCancel - this.showPopCom() - }else{ - uni.setStorageSync('has_noticed', 1) - this.closePopCom() + if(!uni.getStorageSync('has_noticed')){ + if(this.popMsgs.length > 0 && index<(this.popMsgs.length-1)){ + this.popIndex = index+1 + var popinfo = this.popMsgs[this.popIndex] + this.popContent = popinfo.popContent + this.popTitle = popinfo.popTitle + this.popShowCancel = popinfo.popShowCancel + this.showPopCom() + }else{ + uni.setStorageSync('has_noticed', 1) + this.closePopCom() + } } }, + showNotice(popmshIndex){ + var popinfo = this.popMsgs[popmshIndex] + this.popContent = popinfo.popContent + this.popTitle = popinfo.popTitle + this.popShowCancel = popinfo.popShowCancel + this.showPopCom() + }, popCancel(e){ }, addVisitor(){