Browse Source

接口调试及页面显示、样式调整

master
zq 9 months ago
parent
commit
1e7763a240
  1. 1
      App.vue
  2. 82
      components/bookBox.vue
  3. 24
      components/preBookList.vue
  4. 8
      main.js
  5. 6
      pages.json
  6. 62
      pages/book_detail/book_detail.vue
  7. 140
      pages/index/index.vue
  8. 72
      pages/modify_visitor/modify_visitor.vue
  9. 216
      pages/prebook/prebook.vue
  10. 218
      pages/prebook_list/prebook_list.vue
  11. 38
      pages/user_modify/user_modify.vue
  12. 6
      pages/usercenter/usercenter.vue
  13. 127
      pages/visitors/visitors.vue

1
App.vue

@ -5,6 +5,7 @@
doctoridStorageKey:'doctor_id'
},
onLaunch: function(option) {
console.log(option,'option====');
if(!(option.query && option.query.did)){
var doctor_id = uni.getStorageSync(this.globalData.doctoridStorageKey)
if(doctor_id){

82
components/bookBox.vue

@ -1,14 +1,17 @@
<template>
<view class="book-com">
<view class="date-wraper">
<view :class="'date'+((selectDay==key)?' active':'')" v-for="(item,key) in RegistrationTimeList" @click="chooseDay(key, item)">
<view class="top">
<view>{{item.date.date.substring(8,10)}}</view>
<view class="PfScMedium">{{item.date.weekday}}</view>
</view>
<view :class="'bot'+((item.date.type!=1 && item.date.type!=5)?' active':'')+(key==0?' PfScMedium':'')">
{{item.date.type_text}}
</view>
<view :class="'date'+((selectDay===item.date)?' active':'')" v-for="(item,key) in Object.values(RegistrationTimeList)" @click="chooseDay(item.date)">
<view class="top">
<view>{{item.month}}.{{ item.day }}</view>
<view class="PfScMedium">{{item.week_desc}}</view>
</view>
<view :class="'bot'+((item.work_desc !== '不出诊')?' active':'')+(key==0?' PfScMedium':'')">
{{item.work_desc}}
</view>
<!-- <view :class="'bot'+((item.date.type!=1 && item.date.type!=5)?' active':'')+(key==0?' PfScMedium':'')">
{{item.work_desc}}
</view> -->
</view>
</view>
@ -16,9 +19,9 @@
<view :class="'item'+(timeList.am.length<=0?' itemempty':' ')" v-if="bookTimeList">
<view class="title PfScMedium">上午预约</view>
<view class="inner-wrapper" v-if="timeList.am.length>0">
<view v-for="(item,key) in timeList.am" :class="'son PfScMedium'+(item.bed_count<=0?' disable':'')" @click="confirmSubmit(item, 1)" :hover-class="item.bed_count>0?'hover2':''">
{{item.start}}-{{item.end}}
<text v-if="visitorList.length > item.bed_count || item.bed_count<=0">{{item.bed_count>0?item.bed_count:'满'}}</text>
<view v-for="(item,key) in timeList.am" :class="'son PfScMedium'+( time2remain[item] <=0?' disable':'')" @click="confirmSubmit(item, 1)" :hover-class="time2remain[item]>0?'hover2':''">
{{item}}
<text v-if="visitorList.length > time2remain[item] || time2remain[item]<=0">{{time2remain[item]>0?time2remain[item]:'满'}}</text>
</view>
</view>
@ -31,9 +34,9 @@
<view :class="'item'+(timeList.pm.length<=0?' itemempty':' ')" v-if="bookTimeList">
<view class="title PfScMedium">下午预约</view>
<view class="inner-wrapper" v-if="timeList.pm.length>0">
<view :class="'son PfScMedium'+(item.bed_count<=0?' disable':'')" @click="confirmSubmit(item, 2)" :hover-class="item.bed_count>0?'hover2':''" v-for="(item,key) in timeList.pm">
{{item.start}}-{{item.end}}
<text v-if="visitorList.length > item.bed_count || item.bed_count<=0">{{item.bed_count?item.bed_count:''}}</text>
<view :class="'son PfScMedium'+(time2remain[item]<=0?' disable':'')" @click="confirmSubmit(item, 2)" :hover-class="time2remain[item]>0?'hover2':''" v-for="(item,key) in timeList.pm">
{{item}}
<text v-if="visitorList.length > time2remain[item] || time2remain[item]<=0">{{time2remain[item]?time2remain[item]:''}}</text>
</view>
</view>
<view class="empty" v-else>
@ -58,10 +61,11 @@
export default {
name: "bookBox",
props: {
RegistrationTimeList:{
type:Array,
default:()=>[]
},
// RegistrationTimeList:Object,
// RegistrationTimeList:{
// type:Object,
// default:()=>{}
// },
visitorList:{
type:Array,
default:()=>[]
@ -70,32 +74,46 @@ export default {
data() {
return {
cssUrl:this.cssUrl,
workDate:[],
time2remain:[],
bookTimeList:false,
timeList:true,
disable:true,
selectDay:-1
selectDay:-1,
RegistrationTimeList:[]
}
},
methods: {
dataInit(firstRegistrationTime) {
this.selectDay = 0
this.bookTimeList = firstRegistrationTime
dataInit(allDate,chooseDate) {//
// dataInit(firstRegistrationTime,time2remain,chooseDate) {//
let firstRegistrationTime = allDate['date2time']
this.RegistrationTimeList = allDate['date2work']
this.time2remain = allDate['time2remain'];
if(chooseDate){
this.selectDay = chooseDate;
}else{
this.selectDay = Object.keys(this.RegistrationTimeList)[0];
this.chooseDay(this.selectDay)
return
}
this.bookTimeList = false
if(firstRegistrationTime.am.length > 0 || firstRegistrationTime.pm.length > 0) this.bookTimeList = true
this.timeList = firstRegistrationTime
},
chooseDay(day, book){
this.selectDay = day
chooseDay(date){
this.selectDay = date
this.bookTimeList = false
if(book.am.length > 0 || book.pm.length > 0) this.bookTimeList = true
this.timeList = book
this.$emit('getAvailabletRegistrationTime', date)
// if(book.am.length > 0 || book.pm.length > 0) this.bookTimeList = true
// this.timeList = book
},
confirmSubmit(times, type){
if(times.bed_count <= 0) return
times.date = this.RegistrationTimeList[this.selectDay].date
times.key = this.selectDay
times.type = type
this.$emit('confirmSubmitEvent', times)
confirmSubmit(time_interval, type){
let param = new Object()
if(this.time2remain[time_interval] <= 0) return
param.date = this.selectDay
param.time_interval = time_interval
param.type = type
this.$emit('confirmSubmitEvent', param)
}
}
};

24
components/preBookList.vue

@ -3,20 +3,21 @@
<view class="list btPadding" v-if="dataList.length>0">
<view :class="'item '+item" v-for="(item, key) in dataList" @click="toBookDetail(item)">
<view class="left">
<view class="title PfScMedium"><text v-if="item.visitor_name">{{item.visitor_name}}</text><text v-else></text></view>
<view class="date">{{item.visit_date}} {{getDayOfWeek(item.visit_date)}} {{item.visit_time}}</view>
<view class="loction">{{item.h_name}} {{item.depart_name}}</view>
<view class="title PfScMedium"><text v-if="item.name">{{item.name}}</text><text v-else></text></view>
<view class="date">{{item.date}} {{item.week_desc}} {{item.time_interval}}</view>
<view class="loction over1">
{{item.hospital_name}}
<!-- {{item.depart_name}} 科目类型-->
</view>
</view>
<view class="right">
<view :class="statusList[item.status]+' status'"><view class="over">{{statusDescList[item.status]}}</view></view>
<view class="queue-num" v-if="statusList[item.status]=='status_wait' && item.wait_visit_count && item.wait_visit_count>0"><view>前方<text class="PfScSemibold">{{item.wait_visit_count}}</text></view> </view>
<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>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: "preBookList",
@ -31,13 +32,14 @@ export default {
data() {
return {
cssUrl:this.cssUrl,
statusList:['status_wait', 'status_ing', 'status_down', 'status_out_num', 'status_expire', 'status_expire'],
statusDescList:['候诊', '就诊中', '已完成', '过号', '已过期', '已取消']
// statusList:['status_wait', 'status_ing', 'status_down', 'status_out_num', 'status_expire', 'status_expire'],
// statusDescList:['', '', '', '', '', ''],
statusStyleList:{'待就诊':'status_wait', '就诊中':'status_ing', '就诊完成':'status_down', '过号':'status_out_num', '过期':'status_expire','取消':'status_cancle'}
}
},
methods: {
toBookDetail(item){
this.$func.toPage('/pages/book_detail/book_detail?id='+item.id)
this.$func.toPage('/pages/book_detail/book_detail?id='+item.id+'&depart_id='+item.depart_id)
},
getDayOfWeek(dateString) {
var str = new Date(dateString);
@ -142,7 +144,7 @@ export default {
color: #B6B8BF;
}
}
&.status_expire{
&.status_expire,&.status_cancle{
view{
background: #FCFCFC;
border: 1rpx solid #AEB0B8;

8
main.js

@ -357,7 +357,13 @@ function modelShow(content, path="",title="提示") {
}
});
}
//设置页main标题
function setTitlefFunc(title) {
uni.setNavigationBarTitle({
title: title || ''
});
};
Vue.prototype.$setTitle = {setTitlefFunc}
Vue.prototype.$pop = {modelShow}
Vue.prototype.$func = {toPage}
Vue.prototype.$http = {req}

6
pages.json

@ -1,11 +1,11 @@
{
"pages": [
{
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "预约就诊"
}
},
{
"path" : "pages/prebook_list/prebook_list",
"style" :
@ -14,6 +14,7 @@
"enablePullDownRefresh": false
}
},
{
"path" : "pages/book_detail/book_detail",
"style" :
@ -29,7 +30,6 @@
"navigationBarTitleText": "修改资料",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/usercenter/usercenter",

62
pages/book_detail/book_detail.vue

@ -28,8 +28,9 @@
export default {
data() {
return {
statusList:['status_wait', 'status_ing', 'status_out_num', 'status_expire', 'status_down', 'status_expire'],
statusDescList:['候诊', '就诊中', '过号', '已过期', '已完成', '已取消'],
statusList:['status_wait', 'status_ing', 'status_down', 'status_out_num', 'status_expire', 'status_cancle'],
statusStyleList:{'0':'status_wait', '1':'status_ing', '2':'status_down', '3':'status_out_num', '4':'status_expire','5':'status_cancle'},
statusDescList:['候诊', '就诊中', '已完成','过号', '已过期', '已取消'],
status:'',
queueNum:88,
bookDate:"2024.01.09 周二 09:30-12:00",
@ -46,6 +47,7 @@
showCancelBook:false,
redirect:'/pages/prebook_list/prebook_list',
bookId:false,
depart_id:false,
bookInfo:false,
showReBook:false,
cssUrl:this.cssUrl
@ -54,10 +56,11 @@
onLoad(option) {
// if(option.index) this.redirect = '/pages/index/index'
if(option.id) this.bookId = option.id
if(option.depart_id) this.depart_id = option.depart_id
},
onShow() {
if(!this.bookId){
if(!this.bookId || !this.depart_id){
this.$func.toPage('/pages/index/index')
return;
}
@ -74,7 +77,11 @@
content:'确认取消预约?',
success(res) {
if(!res.confirm) return
that.$http.req('cancel_appoint', {appoint_id:that.bookId}, 'GET').then(data=>{
that.$http.req('user/cancel_appoint', {
appoint_id:that.bookId,
depart_id:that.depart_id
},
'POST').then(data=>{
if(data == -1) return
that.getBookDetail()
uni.showToast({
@ -97,31 +104,32 @@
this.$func.toPage('/pages/index/index')
},
getBookDetail(){
this.$http.req('get_appoint_detail', {appoint_id:this.bookId}, 'GET').then(data=>{
this.$http.req('user/get_appoint_detail', {appoint_id:this.bookId,depart_id:this.depart_id}, 'POST').then(data=>{
if(data == -1) {
this.bookInfo = false
return
}
var bookInfo = data
if(bookInfo && bookInfo.length <= 0){
this.$pop.modelShow('预约信息为空')
return
}
// if(bookInfo && bookInfo.length <= 0){
// this.$pop.modelShow('')
// return
// }
bookInfo = data
this.bookInfo = bookInfo
this.status = this.statusList[bookInfo.status]
this.status = this.statusStyleList[bookInfo.status]
if(bookInfo.status==0 || bookInfo.status==2) this.showCancelBook = true
this.list[0].custom = "<view class='"+this.status+" status'><view class='over status_text'>"+this.statusDescList[bookInfo.status]+"</view></view>"
this.list[1].rightTitle = bookInfo.visitor_name
this.list[0].custom = "<view class='"+this.status+" status'><view class='over status_text'>"+bookInfo.status_desc+"</view></view>"
this.list[1].rightTitle = bookInfo.name
this.list[2].rightTitle = bookInfo.hospital_name
this.list[3].rightTitle = bookInfo.depart_name
this.list[4].rightTitle = bookInfo.doctor_name ? bookInfo.doctor_name : '无'
this.list[5].custom = "<view class='queue-text'>前方<text class='queue-num-txt PfScSemibold'>"+bookInfo.wait_visit_count+"</text>人</view>"
if(bookInfo.wait_visit_count<=0 || bookInfo.status!=0) this.list[5].show = false
this.list[6].custom = "<view class='book-date"+(bookInfo.status==0?' wait':' expire')+"'>"+bookInfo.visit_date+' '+bookInfo.week+' '+bookInfo.visit_time+"</view>"
this.notice = bookInfo.notice
// this.list[5].custom = "<view class='queue-text'><text class='queue-num-txt PfScSemibold'>"+bookInfo.wait_visit_count+"</text></view>"
// if(bookInfo.wait_visit_count<=0 || bookInfo.status!=0) this.list[5].show = false
this.list[5].show = false
this.list[6].custom = "<view class='book-date"+(bookInfo.status==0?' wait':' expire')+"'>"+bookInfo.visit_date+' '+bookInfo.week_desc+' '+bookInfo.visit_time+"</view>"
this.notice = bookInfo.notice;
});
}
}
@ -162,38 +170,38 @@
display: block;
text-align: center;
}
&.status_wait {
&.status_wait{
.status_text{
background: #F8FFF7;
border: 1rpx solid #5BD07A;
color: #58CA7F;
background: #EEFFF6;
// border: 1rpx solid #5BD07A;
color: #4FC381;
}
}
&.status_out_num{
.status_text{
background: #FFFAF7;
border: 1rpx solid #FE6710;
background: #FFF2EE;
// border: 1rpx solid #FE6710;
color: #FE6710;
}
}
&.status_down{
.status_text{
background: #FCFCFC;
border: 1rpx solid #AEB0B8;
// border: 1rpx solid #AEB0B8;
color: #B6B8BF;
}
}
&.status_expire{
&.status_expire,&.status_cancle{
.status_text{
background: #FCFCFC;
border: 1rpx solid #AEB0B8;
// border: 1rpx solid #AEB0B8;
color: #B6B8BF;
}
}
&.status_ing{
.status_text{
border: 1rpx solid #5FA1CB;
background: #F7FCFF;
// border: 1rpx solid #5FA1CB;
background: #EEF8FF;
color: #5FA1CB;
}
}

140
pages/index/index.vue

@ -3,19 +3,18 @@
<view class="header-wrapper flex">
<view class="left">
<view class="flex top PfScMedium">
<view class="ft50 over2">{{doctorInfo.doctor_info.name}}</view>
<view class="ft50 over2">{{doctorInfo.doctor_info.doctor_name}}</view>
<view v-if="doctor_dept">
<view class="over2">{{doctor_dept}}</view>
</view>
</view>
<view class="bt over2" v-if="doctorInfo.doctor_info.desc">
{{doctorInfo.doctor_info.desc}}
<view class="bt over2" v-if="doctorInfo.doctor_info.doctor_desc">
{{doctorInfo.doctor_info.doctor_desc}}
</view>
</view>
<img class="right" :src="doctorInfo.doctor_info.avator" alt="" @click="enlargePicture(doctorInfo.doctor_info.avator)" v-if="doctorInfo.doctor_info.avator">
</view>
<view class="block desc-wrapper" v-if="doctorInfo.doctor_info.detail">
<view class="block desc-wrapper" v-if="doctorInfo.doctor_info.doctor_detail">
<view class="title-wrapper flex">
<view class="title">
医生简介
@ -23,8 +22,10 @@
<img :src="cssUrl+'right_bg.png'" alt="">
</view>
<view class="con over2 over4">
{{doctorInfo.doctor_info.detail}}
<view class="con">
<!-- <view class="con over2 over4"> -->
{{doctorInfo.doctor_info.doctor_detail}}
北京中医药大学硕士研究生中国针灸学会会员中国中医药信息学会专科专病诊疗分会理事学会专科专病诊疗分会理事擅长针药并用治疗内科疾病
</view>
</view>
@ -33,15 +34,18 @@
<view class="top flex">
<view class="left">
<view class="title flex">
<text class="over2">{{item.h_name}} {{item.depart_name}}</text>
<img :src="cssUrl+'index_comback.svg'" v-if="item.h_pos" @click="toLocation(item)">
<text class="over2 PfScMedium">{{item.hospital_name}}
<!-- {{item.depart_name}} -->
<!-- 科室 -->
</text>
<img :src="cssUrl+'index_comback.svg'" v-if="item.hospital_pos" @click="toLocation(item)">
</view>
<view class="date over2" v-if="item.visit_times">
出诊{{item.visit_times}}
<view class="date over2 over4">
出诊{{ item.visit_time }}
</view>
</view>
<view class="right">
<view class="flex right-wrapper" style="justify-content:flex-end;" v-if="item.h_pos">
<view class="flex right-wrapper" style="justify-content:flex-end;" v-if="item.hospital_pos">
<view class="" @click="toLocation(item)">
<img :src="cssUrl+'index_nav.svg'" alt="">
<view>导航</view>
@ -93,6 +97,47 @@
recentAppoint:[],
loginToken:false,
state:'',
workdate:[],
workPlan:{
1:'上午',
2:'下午',
3:'全天',
},
visitlist:[
{
"id": "16",
"depart_id": "18",
"name": "暴富喽",
"date": "2024-09-28",
"week_desc": "六",
"time_interval": "08:00-08:30",
"status_desc": "就诊完成",
"hospital_name": "北京LY暴富",
"depart_name": "针灸科"
},
{
"id": "15",
"depart_id": "18",
"name": "刘老铁",
"date": "2024-09-28",
"week_desc": "六",
"time_interval": "08:30-09:00",
"status_desc": "候诊",
"hospital_name": "北京LY暴富",
"depart_name": "针灸科"
},
{
"id": "14",
"depart_id": "18",
"name": "首富哈",
"date": "2024-09-28",
"week_desc": "六",
"time_interval": "08:00-08:30",
"status_desc": "过号",
"hospital_name": "北京LY暴富",
"depart_name": "针灸科"
},
]
}
},
components:{
@ -120,7 +165,6 @@
uni.setNavigationBarTitle({
title:title
})
var token = uni.getStorageSync('token')
if(this.code && this.state && !token) {
var rebackPagePath = uni.getStorageSync('rebackPagePath')
@ -129,21 +173,29 @@
}
await this.getDoctorInfo()
},
// onReady() {
// // console.log(this.doctorInfo,'this.doctorInfo');
// uni.setNavigationBarTitle({
// title: + ''
// })
// },
// "navigationBarTitleText": ""
methods: {
toLocation(hospital){
var that = this
uni.showActionSheet({
itemList: ['腾讯地图', '百度地图', '高德地图'],
success: function (res) {
var lngLat = hospital.h_pos.toString().split(',')
var lngLat = hospital.hospital_pos.toString().split(',')
var lng = lngLat[0].toString()
, lat = lngLat[1].toString()
var baiduLngLat = that.qqMapTransBMap(lng, lat)
var mapList = [
'http://apis.map.qq.com/uri/v1/marker?marker=coord:'+ lat+','+lng+';addr:'+hospital.h_name,
'http://api.map.baidu.com/marker?location='+baiduLngLat.lat+','+baiduLngLat.lng+'&title='+hospital.h_name+'&content=即将前往目的地&output=html&src=webapp.baidu.openAPIdemo',
'https://m.amap.com/share/index/lnglat='+hospital.h_pos+'&name='+hospital.h_name+'&src=uriapi&innersrc=uriapi',
'http://apis.map.qq.com/uri/v1/marker?marker=coord:'+ lat+','+lng+';addr:'+hospital.hospital_name,
'http://api.map.baidu.com/marker?location='+baiduLngLat.lat+','+baiduLngLat.lng+'&title='+hospital.hospital_name+'&content=即将前往目的地&output=html&src=webapp.baidu.openAPIdemo',
'https://m.amap.com/share/index/lnglat='+hospital.hospital_pos+'&name='+hospital.hospital_name+'&src=uriapi&innersrc=uriapi',
]
// return;
location.href = mapList[res.tapIndex]
@ -172,21 +224,47 @@
},
async getDoctorInfo() {
await this.$http.req('user/get_user_info', {}, 'GET').then(data=>{
await this.$http.req('user/index_info', {}, 'GET').then(data=>{
if(data == -1) return
this.pageShow = true
this.doctorInfo = data
if(this.doctorInfo.doctor_info && this.doctorInfo.doctor_info.depart_name.length>0){
this.doctor_dept = this.doctorInfo.doctor_info.depart_name
this.pageShow = true;
let visitFlag = true;
this.doctorInfo = data;
if(this.doctorInfo.doctor_info && this.doctorInfo.doctor_info.depart_name && this.doctorInfo.doctor_info.depart_name.length>0){
this.doctor_dept = this.doctorInfo.doctor_info.depart_name;
}
if(this.doctorInfo.hospital_list && this.doctorInfo.hospital_list.length>0){
this.hospitals = this.doctorInfo.hospital_list
if(this.doctorInfo.hospital_departs && this.doctorInfo.hospital_departs.length>0){
this.hospitals = this.doctorInfo.hospital_departs;
this.doctor_dept = this.doctorInfo.hospital_departs[0]['depart_name'];
this.doctorInfo.doctor_info.depart_name = this.doctor_dept;
}else{
visitFlag = false;
}
if(this.doctorInfo.visit_list && this.doctorInfo.visit_list.length>0){
this.recentAppoint = this.doctorInfo.visit_list;
}
var docname = this.doctorInfo.doctor_info.name
if(this.doctorInfo.appoint_list && this.doctorInfo.appoint_list.length>0){
this.recentAppoint = this.doctorInfo.appoint_list
if(this.doctorInfo.workdate && Object.keys(this.doctorInfo.workdate).length > 0){
this.workdate = this.doctorInfo.workdate;
}else{
visitFlag = false;
}
// if(visitFlag){//
let workDatKeyArr = Object.keys(this.workdate);
let workDateValArr = Object.values(this.workdate);
let timeList = [];
this.hospital_departs = this.doctorInfo.hospital_departs.map((item,index)=>{
let indexofNum = workDatKeyArr.indexOf(item.depart_id);
if(indexofNum > -1){
let departCurItem = workDateValArr[indexofNum];
for(let key in departCurItem){
let dateItem = departCurItem[key];
if(Number(dateItem.plan) === 0)continue
timeList.push(dateItem.week_desc+this.workPlan[dateItem.plan])
item.visit_time = timeList.join('、')
}
}
return item
})
// }
});
},
enlargePicture(imgUrl) {
@ -295,7 +373,9 @@
font-size: 30rpx;
line-height: 50rpx;
.con{
height: auto;
// height: auto;
overflow-y: auto;
max-height: 200rpx;
}
}
.title-wrapper{
@ -384,7 +464,7 @@
img{
width: 20rpx;
height: 32rpx;
margin-top: 8rpx;
// margin-top: 8rpx;
margin-left: 8rpx;
}
}

72
pages/modify_visitor/modify_visitor.vue

@ -3,15 +3,21 @@
<view class="block">
<view class="title PfScMedium">就诊人信息</view>
<input-box class="inputcom-wrapper" v-model="name" holder="就诊人姓名" label="姓名" @blurEvent="nameBlurEvent"></input-box>
<input-box class="inputcom-wrapper" v-model="idcardExt" holder="请输入身份证后4位" label="身份证尾号" @blurEvent="idCardBlurEvent" rule="idcardext"></input-box>
<input-box class="inputcom-wrapper" v-model="idcard" holder="请输入身份证后4位" label="身份证尾号" @blurEvent="idCardBlurEvent" rule="idcardext"></input-box>
<input-box class="inputcom-wrapper" v-model="phone" holder="请输入就诊人手机号" label="常用手机号" @blurEvent="phoneBlurEvent" rule="phone"></input-box>
</view>
<view class="submit-wrapper btPadding">
<view class="submit-wrapper btPadding" v-if="!vid">
<view :class="'btn btn3 submit'+(canSubmit?' primary':' noclick')" :hover-class="(canSubmit?'hover':'')" @click="submit">
确认就诊人
</view>
</view>
<view class="fixedBot btPadding" v-if="vid">
<view class="submit">
<view class="btn cancel btn1" @click="reback">取消</view>
<view class="btn primary btn1" hover-class="hover" @click="submit">确认</view>
</view>
</view>
</view>
</template>
@ -24,13 +30,14 @@
canSubmit:false,
name:'',
nameRule:false,
idcardExt:'',
idcard:'',
idcardExtRule:false,
phone:'',
phoneRule:false,
type:1,
adding:false,
vid:false
vid:false,
visitor_info:{}
}
},
components:{
@ -49,41 +56,46 @@
this.adding = true
var param = new Object()
param.name = this.name
param.idcard_ext = this.idcardExt
param.idcard = this.idcard
param.phone = this.phone
var that = this
var addtimer = setTimeout(function() {
that.adding = false
}, 5000);
var req = 'setting_visitor/'
var req = 'user/add_visitor'
var method = 'POST'
if(this.vid){
param.id = this.vid
req = 'user/update_visitor'
}
this.$http.req(req, param, method, true).then(data=>{
clearTimeout(addtimer)
this.adding = false
if(data == -1) return
if(this.vid){
uni.removeStorageSync('visitor_info_'+ this.vid)
}
this.$func.toPage('/pages/visitors/visitors?type='+this.type)
});
},
getVisitorInfo() {
this.$http.req('get_visitor_info', {id:this.vid}, 'GET', true).then(data=>{
if(data == -1) {
this.$func.toPage('/pages/index/index')
return
}
this.name = data.name
this.idcardExt = data.idcard_ext
this.phone = data.phone
this.visitor_info = JSON.parse(uni.getStorageSync('visitor_info_'+ this.vid))
//
// this.$http.req('user/get_visitor_info', {id:this.vid}, 'GET', true).then(data=>{
// if(data == -1) {
// this.$func.toPage('/pages/index/index')
// return
// }
console.log(this.visitor_info,'visitor_info');
this.name = this.visitor_info.name
this.idcard = this.visitor_info.idcard
this.phone = this.visitor_info.phone
this.nameRule = true
this.idcardExtRule = true
this.phoneRule = true
this.checkSubmit()
});
// });
},
nameBlurEvent(value, res){
this.name = value
@ -91,7 +103,7 @@
this.checkSubmit()
},
idCardBlurEvent(value, res){
this.idcardExt = value
this.idcard = value
this.idcardExtRule = res
this.checkSubmit()
},
@ -105,6 +117,12 @@
if(!this.nameRule || !this.idcardExtRule || !this.phoneRule) return
this.canSubmit = true
},
reback(){
if(this.vid){
uni.removeStorageSync('visitor_info_'+ this.vid)
}
this.$func.toPage('/pages/visitors/visitors')
},
submit(){
this.checkSubmit()
if(!this.canSubmit) return
@ -149,6 +167,24 @@
.submit{
margin: 0 auto;
}
.fixedBot{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 124rpx;
background: #FFFFFF;
box-shadow: 0rpx -2rpx 6rpx 0rpx rgba(181,181,181,0.13);
backdrop-filter: blur(20rpx);
display: flex;
.submit{
width: 100%;
display: flex;
justify-content: center;
align-items: center;
column-gap: 50rpx;
}
}
}
</style>

216
pages/prebook/prebook.vue

@ -2,18 +2,18 @@
<view class="page-prebook">
<view class="title flex">
<img :src="cssUrl+'ten.svg'">
{{depart.h_name}} {{depart.depart_name}}
{{depart.hospital_name}} {{depart.depart_name}}
</view>
<book ref="book" @confirmSubmitEvent="showConfirm" :RegistrationTimeList="RegistrationTimeList" :visitorList="activeVisitors"/>
<book ref="book" @confirmSubmitEvent="showConfirm" @getAvailabletRegistrationTime = "getAvailabletRegistrationTime" :visitorList="activeVisitors"/>
<slider-box ref="sliderbox">
<view class="slider-title PfScMedium">预约信息确认</view>
<view class="members-box" v-if="needSelectMembers">
<view class="desc">当前时段余号不足只能预约{{times.remain_num}}</view>
<view class="desc">当前时段余号不足只能预约{{times.remain}}</view>
<view class="members">
<view :class="'memmbers-item'+(item.choose?' active':'')" v-for="(item,key) in activeVisitors" @click="chooseVisitor(key)">
<img :src="cssUrl+'checkbox_false.svg'">
<img :src="cssUrl+'checkbox_true.svg'">
{{item.visitor_name}}
{{item.name}}
</view>
</view>
</view>
@ -21,21 +21,21 @@
<view class="left">就诊人</view>
<view class="right over2 over5">
<text v-for="(item,key) in activeVisitors">
<text v-if="key<=9">{{nums[key]}}</text><text v-else>n.</text>{{item.visitor_name}}
<text v-if="key<=9">{{nums[key]}}</text><text v-else>n.</text>{{item.name}}
</text>
</view>
</view>
<view class="item" >
<view class="left">医生姓名</view>
<view class="right">{{doctorInfo.doctor_info.name}}</view>
<view class="right">{{doctorInfo.doctor_info.doctor_name}}</view>
</view>
<view class="item">
<view class="left">就诊医院</view>
<view class="right over2 over5">{{depart.h_name}} {{depart.depart_name}}</view>
<view class="right over2 over5">{{depart.hospital_name}} {{depart.depart_name}}</view>
</view>
<view class="item">
<view class="left">看诊时间</view>
<view class="right orange">{{times.date}} {{times.time_desc}} {{times.start_time}}-{{times.end_time}}</view>
<view class="right orange">{{times.date}} {{times.time_desc}} {{times.time_interval}}</view>
</view>
<view class="btns-box flex">
@ -66,7 +66,7 @@
chooseVisitorCount:0,
departId:false,
depart:false,
visit_nums_id:false
visitor_ids:false,
}
},
components:{
@ -129,107 +129,56 @@
}
})
},
getAvailabletRegistrationTime(refresh = true, chooseDay = '') {
this.$http.req('get_appoint_times',{depart_id:this.departId}, 'GET').then(data=>{
if(data == -1) return
// data.days = [
// {
// date: "2024-04-17", type: 2, type_text: "", weekday: "",
// am: [
// {
// "start": "12:00",
// "end": "12:30",
// "bed_count": 0
// },
// {
// "start": "13:00",
// "end": "14:30",
// "bed_count": 2
// }
// ],
// pm: []
// },
// {
// date: "2024-04-18", type: 5, type_text: "", weekday: "", am: [], pm: []
// },
// {
// date: "2024-04-19", type: 3, type_text: "", weekday: "", am: [
// {
// "start": "12:00",
// "end": "12:30",
// "bed_count": 0
// },
// {
// "start": "13:00",
// "end": "14:30",
// "bed_count": 2
// }
// ], pm: [
// {
// "start": "12:00",
// "end": "12:30",
// "bed_count": 0
// },
// {
// "start": "13:00",
// "end": "14:30",
// "bed_count": 8
// }
// ]
// },
// {
// date: "2024-04-20", type: 4, type_text: "", weekday: "", am: [], pm: [
// {
// "start": "12:00",
// "end": "12:30",
// "bed_count": 0
// },
// {
// "start": "13:00",
// "end": "14:30",
// "bed_count": 1
// }
// ]
// },
// {
// date: "2024-04-21", type: 1, type_text: "", weekday: "", am: [], pm: []
// },
// ]
// if(!refresh){
// // data.days[3].pm[1].bed_count=0
// // data.days[3].type=1
// data.days = [
// {
// date: "2024-04-17", type: 2, type_text: "", weekday: "",
// am: [
// {
// "start": "12:00",
// "end": "12:30",
// "bed_count": 0
// },
// {
// "start": "13:00",
// "end": "14:30",
// "bed_count": 2
// }
// ],
// pm: []
// },
// {
// date: "2024-04-18", type: 5, type_text: "", weekday: "", am: [], pm: []
// }
// ]
// }
this.RegistrationTimeList = data
if(this.RegistrationTimeList.length>0) {
if(refresh || chooseDay>=this.RegistrationTimeList.length) {
this.$refs.book.dataInit(this.RegistrationTimeList[0])
getAvailabletRegistrationTime(date) {
const param = {
depart_id:this.departId,
date:date?date:''
}
//
// const data1={"date2work":{"2024-09-25":{"date":"2024-09-25","week_desc":"","work_desc":""},"2024-09-26":{"date":"2024-09-26","week_desc":"","work_desc":""},"2024-09-27":{"date":"2024-09-27","week_desc":"","work_desc":""},"2024-09-30":{"date":"2024-09-30","week_desc":"","work_desc":""},"2024-10-01":{"date":"2024-10-01","week_desc":"","work_desc":""},"2024-10-02":{"date":"2024-10-02","week_desc":"","work_desc":""},"2024-10-03":{"date":"2024-10-03","week_desc":"","work_desc":""}},
// "date2time":{
// "am":[
// "8:00-08:30","08:30-09:00","09:00-09:30","09:30-10:00","10:00-10:30","10:30-11:00","11:00-11:30","11:30-12:00"
// ],"pm":[
// "13:00-13:30",
// "13:30-14:00",
// "14:00-14:30",
// "14:30-15:00",
// "15:00-15:30",
// "15:30-16:00",
// "14:00-14:30",
// "14:30-15:00",
// "15:00-15:30",
// "15:30-16:00",
// "16:00-16:30",
// "16:30-17:00",
// ]},
// "time2remain":{"8:00-08:30":1,"08:30-09:00":2,"09:00-09:30":20,"09:30-10:00":20,"10:00-10:30":20,"10:30-11:00":20,"11:00-11:30":20,"11:30-12:00":20}}
this.$http.req('/user/get_appoint_times',param, 'POST').then(data=>{
let date2work = data.date2work
// let date2work = data1.date2work;//
let regxp = /^0/;
for(let key in date2work){
let itemObj = date2work[key];
let month = itemObj.date.split('-')[1];
let day = itemObj.date.split('-')[2];
itemObj['day'] = day;
if(regxp.test(month)){
itemObj['month'] = month.replace('0','')
}else{
this.$refs.book.chooseDay(chooseDay, this.RegistrationTimeList[chooseDay])
itemObj['month'] = month
}
}
// this.RegistrationTimeList = date2work
// if(this.RegistrationTimeList.length>0) {
// if(refresh) {
// this.$refs.book.dataInit(data1['date2time'],data1['time2remain'])
this.$refs.book.dataInit(data1,date)
// this.$refs.book.dataInit(data['date2time'],data['time2remain'],date)
// }else{
// this.$refs.book.chooseDay(chooseDay, this.RegistrationTimeList[chooseDay])
// }
// }
});
},
closeConfirm() {
@ -238,7 +187,6 @@
appoint() {
var param = new Object()
param.depart_id = this.departId
param.visit_nums_id = this.visit_nums_id
var uids = new Array()
for (var i = 0; i < this.activeVisitors.length; i++) {
var visitor = this.activeVisitors[i]
@ -255,45 +203,41 @@
return
}
if(uids.length > this.times.remain_num){
this.$pop.modelShow('当前时段余号不足,只能预约'+this.times.remain_num+'人')
if(uids.length > this.times.remain){
this.$pop.modelShow('当前时段余号不足,只能预约'+this.times.remain+'人')
return
}
param.visitor_ids = uids.join(',')
param.visitor_ids = uids;
param.time_interval = this.times.time_interval;
param.date = this.times.date;
this.chooseVisitorCount = uids.length
this.$http.req('appoint', param).then(data=>{
this.$http.req('user/appoint', param,'POST').then(data=>{
if(data == -1) return
this.tips()
});
},
appointCheck(times, chooseDay='', visit_nums_id){
var param = new Object()
param.depart_id = this.departId
this.visit_nums_id = param.visit_nums_id = visit_nums_id
var visitor_ids = new Array();
appointCheck(times){
var param = {...times}
param.depart_id = this.departId;
let visitor_ids = new Array();
for (var i = 0; i < this.activeVisitors.length; i++) {
visitor_ids.push(this.activeVisitors[i].id)
}
param.visitor_ids = visitor_ids.join(',')
this.times = param
this.times.date = times.date.date
this.times.start_time = times.start
this.times.end_time = times.end
this.times.time_desc = '下午'
if(times.type == 1) this.times.time_desc = '上午'
this.$http.req('check_appoint_nums', param).then(data=>{
if(data == -1) {
this.getAvailabletRegistrationTime(false, chooseDay)
return
}
if(data.remain_num < this.activeVisitors.length){
param.visitor_ids = this.visitor_ids = visitor_ids;
this.times = param;
this.times.date = times.date;
this.times.time_desc = '下午';
if(times.type == 1) this.times.time_desc = '上午';
this.$http.req('user/check_appoint_nums', param,'POST').then(data=>{
// if(data == -1) {
// this.getAvailabletRegistrationTime(false, chooseDay)
// return
// }
let remain = 1
if(remain < this.activeVisitors.length){
this.needSelectMembers = true
this.$set(this.times, 'remain_num', data.remain_num)
this.$set(this.times, 'remain', remain)
this.$refs.sliderbox.showConfirm()
}else{
this.$refs.sliderbox.showConfirm()
@ -301,7 +245,7 @@
});
},
showConfirm(times) {
this.appointCheck(times, times.key, times.id)
this.appointCheck(times)
},
submitConfim(){
this.appoint()

218
pages/prebook_list/prebook_list.vue

@ -2,7 +2,7 @@
<view class="page-prebook-list">
<view class="nav">
<view :class="'item'+(userSelectIndex==0?' active':'')" @click="selectUser(0)">全部</view>
<view :class="'item'+(userSelectIndex==(key+1)?' active':'')" v-for="(item,key) in vistors" @click="selectUser(key+1)">{{item.visitor_name}}</view>
<view :class="'item'+(userSelectIndex==(key+1)?' active':'')" v-for="(item,key) in vistors" @click="selectUser(key+1)">{{item.name}}</view>
</view>
<pre-book-list class="preg-books" :dataList="bookList"></pre-book-list>
</view>
@ -22,7 +22,7 @@
preBookList
},
onShow(){
this.getVisitors()
this.getBookData()
},
methods: {
selectUser(key){
@ -34,8 +34,10 @@
param.page = 1
param.limit = 10000
if(this.userSelectIndex-1 >= 0){
param.visitor_id = this.vistors[this.userSelectIndex-1].id
param.visitor_id = this.vistors[this.userSelectIndex-1].visitor_id
console.log(this.vistors)
}else{
param.visitor_id = '0'
}
uni.showLoading({
title:'加载中',
@ -44,219 +46,21 @@
var timerobj = setTimeout(function(){
uni.hideLoading()
}, 3000)
this.$http.req('get_appoints', param, 'POST', true).then(data=>{
this.$http.req('user/get_appoints', param, 'POST', true).then(data=>{
clearTimeout(timerobj)
uni.hideLoading()
if(data == -1) return
this.bookList = data.data
// this.bookList = [
// {
// "id": 27,
// "user_ids": [],
// "user_infos": null,
// "doctor_id": 2,
// "date": "2024-04-03",
// "username": "",
// "create_datetime": "2024-04-03 15:44:26",
// "visit_hospital": {
// "id": 1,
// "visit_day_text": ",,",
// "hospital_name": "",
// "hospital_location": "34.5145141,25.6414014",
// "hospital_dept_name": "",
// "remind_text": ""
// },
// "wait_count": 10,
// "handler_type": 1,
// "start_time": "16:00",
// "end_time": "16:30",
// "status": 0
// },
// {
// "id": 26,
// "user_ids": [],
// "user_infos": null,
// "doctor_id": 2,
// "date": "2024-04-03",
// "username": "",
// "create_datetime": "2024-04-03 14:57:17",
// "visit_hospital": {
// "id": 1,
// "visit_day_text": ",,",
// "hospital_name": "",
// "hospital_location": "34.5145141,25.6414014",
// "hospital_dept_name": "",
// "remind_text": ""
// },
// "wait_count": 0,
// "handler_type": 1,
// "start_time": "15:00",
// "end_time": "15:30",
// "status": 2
// },
// {
// "id": 25,
// "user_ids": [],
// "user_infos": null,
// "doctor_id": 1,
// "date": "2024-03-30",
// "username": "",
// "create_datetime": "2024-03-30 08:48:17",
// "visit_hospital": {
// "id": 1,
// "visit_day_text": ",,",
// "hospital_name": "",
// "hospital_location": "34.5145141,25.6414014",
// "hospital_dept_name": "",
// "remind_text": ""
// },
// "wait_count": 0,
// "handler_type": 1,
// "start_time": "09:00",
// "end_time": "09:30",
// "status": 2
// },
// {
// "id": 24,
// "user_ids": [],
// "user_infos": null,
// "doctor_id": 2,
// "date": "2024-03-30",
// "username": "",
// "create_datetime": "2024-03-30 07:46:51",
// "visit_hospital": {
// "id": 1,
// "visit_day_text": ",,",
// "hospital_name": "",
// "hospital_location": "34.5145141,25.6414014",
// "hospital_dept_name": "",
// "remind_text": ""
// },
// "wait_count": 0,
// "handler_type": 2,
// "start_time": "14:00",
// "end_time": "14:30",
// "status": 1
// },
// {
// "id": 23,
// "user_ids": [],
// "user_infos": null,
// "doctor_id": 1,
// "date": "2024-03-31",
// "username": "",
// "create_datetime": "2024-03-30 06:50:52",
// "visit_hospital": {
// "id": 1,
// "visit_day_text": ",,",
// "hospital_name": "",
// "hospital_location": "34.5145141,25.6414014",
// "hospital_dept_name": "",
// "remind_text": ""
// },
// "wait_count": 0,
// "handler_type": 1,
// "start_time": "15:00",
// "end_time": "15:30",
// "status": 2
// },
// {
// "id": 22,
// "user_ids": [],
// "user_infos": null,
// "doctor_id": 1,
// "date": "2024-03-30",
// "username": "",
// "create_datetime": "2024-03-30 06:21:43",
// "visit_hospital": {
// "id": 1,
// "visit_day_text": ",,",
// "hospital_name": "",
// "hospital_location": "34.5145141,25.6414014",
// "hospital_dept_name": "",
// "remind_text": ""
// },
// "wait_count": 0,
// "handler_type": 1,
// "start_time": "07:00",
// "end_time": "07:30",
// "status": 2
// },
// {
// "id": 21,
// "user_ids": [],
// "user_infos": null,
// "doctor_id": 1,
// "date": "2024-03-30",
// "username": "",
// "create_datetime": "2024-03-30 06:20:40",
// "visit_hospital": {
// "id": 1,
// "visit_day_text": ",,",
// "hospital_name": "",
// "hospital_location": "34.5145141,25.6414014",
// "hospital_dept_name": "",
// "remind_text": ""
// },
// "wait_count": 0,
// "handler_type": 1,
// "start_time": "07:00",
// "end_time": "07:30",
// "status": 2
// },
// {
// "id": 20,
// "user_ids": [],
// "user_infos": null,
// "doctor_id": 1,
// "date": "2024-03-31",
// "username": "",
// "create_datetime": "2024-03-30 05:07:08",
// "visit_hospital": {
// "id": 1,
// "visit_day_text": ",,",
// "hospital_name": "",
// "hospital_location": "34.5145141,25.6414014",
// "hospital_dept_name": "",
// "remind_text": ""
// },
// "wait_count": 0,
// "handler_type": 1,
// "start_time": "15:00",
// "end_time": "15:30",
// "status": 2
// },
// {
// "id": 19,
// "user_ids": [],
// "user_infos": null,
// "doctor_id": 1,
// "date": "2024-03-31",
// "username": "",
// "create_datetime": "2024-03-30 05:02:29",
// "visit_hospital": {
// "id": 1,
// "visit_day_text": ",,",
// "hospital_name": "",
// "hospital_location": "34.5145141,25.6414014",
// "hospital_dept_name": "",
// "remind_text": ""
// },
// "wait_count": 0,
// "handler_type": 1,
// "start_time": "10:00",
// "end_time": "10:30",
// "status": 2
// }
// ]
// console.log(this.bookList)
this.bookList = data;
if(this.userSelectIndex === 0){
this.vistors = JSON.parse(JSON.stringify(data))
}
});
},
getVisitors() {
var param = new Object()
param.page = 1
param.limit = 10000
this.$http.req('get_visitor_names', param, 'GET').then(data=>{
this.$http.req('user/get_visitors', {}, 'GET').then(data=>{
if(data == -1) return
this.getBookData()
this.vistors = data

38
pages/user_modify/user_modify.vue

@ -5,8 +5,8 @@
<view class="item">
<view class="left PfScMedium">头像</view>
<view class="right" @click="upload">
<img :src="avator" class="avator" v-if="!uinfo.avator">
<img :src="uinfo.avator" class="avator" v-else>
<img :src="avator" class="avator" v-if="!uinfo.user_avatar">
<img :src="uinfo.user_avatar" class="avator" v-else>
<view class="avator_tips">点击上传照片</view>
</view>
</view>
@ -38,17 +38,20 @@
return {
cssUrl:this.cssUrl,
avator:this.cssUrl+'default_avator.svg',
uinfo:{},
uinfo:{
user_avatar:''
},
nick:'',
tempFilePaths:'',
tempFiles:''
}
},
onLoad() {
this.getUser()
// this.getUser()
},
methods: {
getUser(){
this.$http.req('get_userinfo', {}, 'GET').then(data=>{
this.$http.req('user/get_user_info', {}, 'GET').then(data=>{
if(data == -1) return
this.uinfo = data
this.nick = this.uinfo.nick
@ -56,18 +59,19 @@
},
save(){
var param = new Object()
param.nick = this.nick
var that = this
var token = uni.getStorageSync('token')
console.log(that.tempFilePaths)
var that = this;
param.nick = this.nick;
uni.uploadFile({
url: '/api/user/setting_user/',
filePath: that.tempFilePaths,
name: that.tempFilePaths ? 'avator':'empty',
url: '/api/user/setting_user',
filePath:that.tempFilePaths,
name: 'avatar_file',
header: {
'Authorization': token
'AUTH': token
},
formData:{nick:param.nick},
formData:{
nick:param.nick,
},
success: function(res){
try{
var data = JSON.parse(res.data)
@ -78,7 +82,7 @@
uni.showToast({
title:data.msg
})
if(that.tempFilePaths) that.uinfo.avator = that.tempFilePaths
if(that.tempFilePaths) that.uinfo.user_avatar = that.tempFilePaths
}catch(e){
that.$pop.modelShow('保存失败~'+e.message)
}
@ -101,9 +105,13 @@
uni.chooseImage({
count: 1,
success: function(res) {
console.log(res,'res---');
var tempFilePaths = res.tempFilePaths
let tempFiles = res.tempFiles;
that.tempFilePaths = tempFilePaths[0]
that.uinfo.avator = that.tempFilePaths
that.tempFiles = tempFiles[0]
that.uinfo.user_avatar = that.tempFilePaths
console.log(that.uinfo,'=uinfo');
}
});
}

6
pages/usercenter/usercenter.vue

@ -1,9 +1,9 @@
<template>
<view class="page-usercenter">
<view class="user-wrapper" @click="toUserModify">
<img :src="uinfo.avator" class="avator" v-if="uinfo.avator">
<img :src="uinfo.user_avatar" class="avator" v-if="uinfo.user_avatar">
<img :src="cssUrl+'user_grey.svg'" class="avator" v-else>
<view class="ucode PfScMedium over2">{{uinfo.uid}}</view>
<view class="ucode PfScMedium over2">{{uinfo.user_nick}}</view>
</view>
<view class="menu">
@ -39,7 +39,7 @@
},
methods: {
getUser(){
this.$http.req('get_userinfo', {}, 'GET').then(data=>{
this.$http.req('user/get_user_info', {}, 'POST').then(data=>{
if(data == -1) return
this.uinfo = data
});

127
pages/visitors/visitors.vue

@ -6,11 +6,11 @@
<view class="list-wrapper" v-if="type == 1">
<view :class="'item block'+(item.select?' active':'')" v-for="(item,key) in visitUsers" @click="chooseVisitor(item, key)">
<view class="top flex">
<view class="name PfScSemibold">{{item.visitor_name}}</view>
<view class="aam_times" v-if="item.remain_num">{{item.remain_desc}}</view>
<view class="name PfScSemibold">{{item.name}}</view>
<view class="aam_times" v-if="item.remain_num > 0">剩余{{item.remain_num}}</view>
</view>
<view class="bot line36">
身份证尾号{{item.idcard_ext}}
身份证尾号{{item.idcard}}
</view>
<img class="status" :src="cssUrl+'visitor_select_active.svg'">
<img class="bg" :src="cssUrl+'visitor_list__bg.svg'">
@ -26,19 +26,32 @@
<view class="list-wrapper2" v-if="type == 2">
<view class="item block" v-for="(item,key) in visitUsers">
<view class="top flex" @click="vistorOption(item)">
<view class="PfScSemibold">{{item.visitor_name}}</view>
<view>身份证尾号{{item.idcard_ext}}</view>
<view class="PfScSemibold">{{item.name}}</view>
<view>身份证尾号{{item.idcard}}</view>
</view>
<view class="bt" v-if="item.hospital_info.length>0">
<!-- <view class="bt-item flex" v-for="(item2,key2) in item.hospital_info" @click="showNotice(item2.popmsgIndex)"> -->
<!-- 暂时注释 多个医院信息渲染 -->
<!-- <view class="bt" v-if="item.hospital_info.length>0">
<view class="bt-item flex" v-for="(item2,key2) in item.hospital_info">
<view class="left flex">
<view class="over3">{{item2.hospital_name}} {{item2.hospital_dept}}</view>
<view class="status2" v-if="!item2.hospital_state">停诊</view>
<view class="status2" v-else-if="item2.is_expire">{{item2.expire_desc}}</view>
</view>
<view class="more right" v-if="item2.times>=0">剩余<text>{{item2.times}}</text></view>
<view class="owe right" v-else><text>{{-item2.times}}</text></view>
<view class="more right" v-if="item2.remain_num>=0">剩余<text>{{item2.remain_num}}</text></view>
<view class="owe right" v-else><text>{{-item2.remain_num}}</text></view>
</view>
</view> -->
<view class="bt" v-if="item.hospital">
<view class="bt-item flex">
<view class="left flex">
<view class="over">{{ item.hospital}}</view>
<!-- <view :class="(!item.doctor_status && !item.weeks)? 'over' : ''">{{ item.hospital}}</view> -->
<view class="over depart">{{item.depart }}</view>
<view class="status2" v-if="item.doctor_status !== '出诊'">{{ item.doctor_status }}</view>
<view class="status2" v-else-if="item.weeks">{{ item.weeks }}周未看病</view>
</view>
<view class="more right" v-if="item.remain_num>=0">剩余<text>{{item.remain_num}}</text></view>
<view class="owe right" v-else><text>{{-item.remain_num}}</text></view>
</view>
</view>
</view>
@ -117,11 +130,10 @@
var that = this
uni.showModal({
title:'删除',
content:'确认删除就诊人('+visitor.visitor_name+')?',
content:'删除'+visitor.name+'后,就诊记录还可以查到,确定删除吗?',
success(res) {
if(!res.confirm) return
that.$http.req('setting_visitor', {id:visitor.id,is_del:1}).then(data=>{
if(data == -1) return
that.$http.req('/user/del_visitor', {id:visitor.id},'POST').then(data=>{
that.getVisitors()
});
}
@ -155,13 +167,25 @@
}
},
getVisitors() {
var param = new Object()
param.page = 1
param.limit = 10000
this.$http.req('get_visitors', param, 'GET').then(data=>{
if(data == -1) return
this.visitUsers = data
console.log(this.visitUsers)
// var param = new Object()
// param.page = 1
// param.limit = 10000
this.$http.req('user/get_visitors', {}, 'POST').then(data=>{
this.visitUsers = data;
let arr =
//
{
'id':'32',
"name": "暴富喽",
"idcard": "6666",
"phone": "18816661888",
"hospital": "北京LY暴富",
"depart": "针灸科",
"doctor_status": "停诊",
"remain_num": "4",
"last_visit": "1970-01-01 00:00:01"
}
this.visitUsers = [...this.visitUsers,arr]
this.popMsgs = []
var popmsgIndex = 0
for (var i = 0; i < this.visitUsers.length; i++) {
@ -173,7 +197,9 @@
// "hospital_dept": "",
// "hospital_state": true,
// "is_expire":true,
// "last_visit_time": "2021-01-12 13:16:26"
// "last_visit_time": "2021-01-12 13:16:26",
// "expire_desc":''
// },
// {
@ -185,31 +211,30 @@
// "last_visit_time": "2021-01-12 13:16:26"
// }
// ]
// hospital_info
// try{
// var hospitalInfo = this.visitUsers[i].hospital_info
// for (var j = 0; j < hospitalInfo.length; j++) {
// if(!hospitalInfo[j].hospital_state || this.type == 1) continue
try{
var hospitalInfo = this.visitUsers[i].hospital_info
for (var j = 0; j < hospitalInfo.length; j++) {
if(!hospitalInfo[j].hospital_state || this.type == 1) continue
var popobj = new Object()
popobj.popShowCancel = false
if(hospitalInfo[j].is_expire){
popobj.popContent = this.visitUsers[i].real_name+'已<span style="color:red;">'+hospitalInfo[j].expire_day+'</span>没有来'+hospitalInfo[j].hospital_name+hospitalInfo[j].hospital_dept+'针灸。如还需要,请尽快安排'
popobj.popTitle = "提醒"
}
// var popobj = new Object()
// popobj.popShowCancel = false
// if(hospitalInfo[j].is_expire){
// popobj.popContent = this.visitUsers[i].real_name+'<span style="color:red;">'+hospitalInfo[j].expire_day+'</span>'+hospitalInfo[j].hospital_name+hospitalInfo[j].hospital_dept+''
// popobj.popTitle = ""
// }
if(hospitalInfo[j].times < 0){
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){
}
// if(hospitalInfo[j].remain_num < 0){
// 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){
// }
}
if(this.popMsgs.length > 0 && !uni.getStorageSync('has_noticed')){
this.popIndex = 0
var popinfo = this.popMsgs[this.popIndex]
@ -318,14 +343,14 @@
letter-spacing: 3rpx;
}
.aam_times{
min-width: 134rpx;
// min-width: 134rpx;
color: #79624A;
text-align: center;
font-size: 28rpx;
background: rgba(254, 232, 198, 0.66);
border-radius: 6rpx;
height: 44rpx;
padding: 0 10rpx;
padding: 0 17rpx;
line-height: 44rpx;
margin-left: 56rpx;
}
@ -417,7 +442,9 @@
max-width: 250rpx;
align-items: flex-end;
}
.depart{
margin-left: 10rpx;
}
.status2{
height: 38rpx;
background: #FFE9E9;
@ -430,28 +457,24 @@
}
.right{
flex-grow: 1;
&.more{
&.more,&.owe{
font-size: 28rpx;
color: #949699;
letter-spacing: 2rpx;
text-align: right;
line-height: 52rpx;
text{
font-size: 52rpx;
color: #000000;
line-height: 52rpx;
letter-spacing: 3rpx;
}
}
&.owe{
text-align: right;
font-size: 28rpx;
color: #FD0000;
letter-spacing: 2rpx;
line-height: 52rpx;
text{
font-size: 52rpx;
color: #FD0000;
line-height: 52rpx;
letter-spacing: 3rpx;
}
}
}

Loading…
Cancel
Save