From 937dbce2117bc3caabcb22226fbb73f06a2ee567 Mon Sep 17 00:00:00 2001 From: kuaileWu <1432334894@qq.com> Date: Thu, 18 Apr 2024 19:19:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=B1=E8=AF=8A=E4=BA=BA=E6=8C=82=E5=8F=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2=E4=BA=A4?= =?UTF-8?q?=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 2 +- pages/visitors/visitors.vue | 80 +++++++++++++++++++++++++++++---------------- 2 files changed, 52 insertions(+), 30 deletions(-) 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(){