Browse Source

就诊人挂号信息列表页面交互

master
kuaileWu 1 year ago
parent
commit
937dbce211
  1. 2
      pages.json
  2. 80
      pages/visitors/visitors.vue

2
pages.json

@ -68,7 +68,7 @@
"path" : "pages/visitors/visitors",
"style" :
{
"navigationBarTitleText": "请选择就诊人",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},

80
pages/visitors/visitors.vue

@ -30,7 +30,7 @@
<view>身份证尾号{{item.id_no}}</view>
</view>
<view class="bt">
<view class="bt-item flex" v-for="(item2,key2) in item.hospital_info">
<view class="bt-item flex" v-for="(item2,key2) in item.hospital_info" @click="showNotice(item2.popmsgIndex)">
<view class="left flex">
<view class="over3">{{item2.hospital_name}} {{item2.hospital_dept}}</view>
<view class="status2" v-if="!item2.hospital_state">停诊</view>
@ -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(){

Loading…
Cancel
Save