13 changed files with 832 additions and 902 deletions
@ -1,311 +1,115 @@ |
|||||
<template> |
<template> |
||||
<view class="page-prebook-list"> |
<view class="page-prebook-list"> |
||||
<view class="nav"> |
<view class="nav"> |
||||
<view :class="'item'+(userSelectIndex==0?' active':'')" @click="selectUser(0)">全部</view> |
<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> |
</view> |
||||
<pre-book-list class="preg-books" :dataList="bookList"></pre-book-list> |
<pre-book-list class="preg-books" :dataList="bookList"></pre-book-list> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import preBookList from '@/components/preBookList.vue' |
import preBookList from '@/components/preBookList.vue' |
||||
export default { |
export default { |
||||
data() { |
data() { |
||||
return { |
return { |
||||
userSelectIndex:0, |
userSelectIndex:0, |
||||
vistors:false, |
vistors:false, |
||||
bookList:[] |
bookList:[] |
||||
} |
} |
||||
}, |
|
||||
components:{ |
|
||||
preBookList |
|
||||
}, |
|
||||
onShow(){ |
|
||||
this.getVisitors() |
|
||||
}, |
}, |
||||
methods: { |
components:{ |
||||
selectUser(key){ |
preBookList |
||||
this.userSelectIndex = key |
}, |
||||
this.getBookData() |
onShow(){ |
||||
}, |
this.getBookData() |
||||
getBookData() { |
}, |
||||
var param = new Object() |
methods: { |
||||
param.page = 1 |
selectUser(key){ |
||||
param.limit = 10000 |
this.userSelectIndex = key |
||||
if(this.userSelectIndex-1 >= 0){ |
this.getBookData() |
||||
param.visitor_id = this.vistors[this.userSelectIndex-1].id |
}, |
||||
console.log(this.vistors) |
getBookData() { |
||||
} |
var param = new Object() |
||||
uni.showLoading({ |
param.page = 1 |
||||
title:'加载中', |
param.limit = 10000 |
||||
mask:true |
if(this.userSelectIndex-1 >= 0){ |
||||
}) |
param.visitor_id = this.vistors[this.userSelectIndex-1].visitor_id |
||||
var timerobj = setTimeout(function(){ |
console.log(this.vistors) |
||||
uni.hideLoading() |
}else{ |
||||
}, 3000) |
param.visitor_id = '0' |
||||
this.$http.req('get_appoints', param, 'POST', true).then(data=>{ |
} |
||||
clearTimeout(timerobj) |
uni.showLoading({ |
||||
uni.hideLoading() |
title:'加载中', |
||||
if(data == -1) return |
mask:true |
||||
this.bookList = data.data |
}) |
||||
// this.bookList = [ |
var timerobj = setTimeout(function(){ |
||||
// { |
uni.hideLoading() |
||||
// "id": 27, |
}, 3000) |
||||
// "user_ids": [], |
this.$http.req('user/get_appoints', param, 'POST', true).then(data=>{ |
||||
// "user_infos": null, |
clearTimeout(timerobj) |
||||
// "doctor_id": 2, |
uni.hideLoading() |
||||
// "date": "2024-04-03", |
if(data == -1) return |
||||
// "username": "阿兰", |
this.bookList = data; |
||||
// "create_datetime": "2024-04-03 15:44:26", |
if(this.userSelectIndex === 0){ |
||||
// "visit_hospital": { |
this.vistors = JSON.parse(JSON.stringify(data)) |
||||
// "id": 1, |
} |
||||
// "visit_day_text": "周一下午,周二上午,周三下午", |
}); |
||||
// "hospital_name": "测试医院", |
}, |
||||
// "hospital_location": "34.5145141,25.6414014", |
getVisitors() { |
||||
// "hospital_dept_name": "呼吸科", |
var param = new Object() |
||||
// "remind_text": "你好" |
param.page = 1 |
||||
// }, |
param.limit = 10000 |
||||
// "wait_count": 10, |
this.$http.req('user/get_visitors', {}, 'GET').then(data=>{ |
||||
// "handler_type": 1, |
if(data == -1) return |
||||
// "start_time": "16:00", |
this.getBookData() |
||||
// "end_time": "16:30", |
this.vistors = data |
||||
// "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) |
|
||||
}); |
|
||||
}, |
|
||||
getVisitors() { |
|
||||
var param = new Object() |
|
||||
param.page = 1 |
|
||||
param.limit = 10000 |
|
||||
this.$http.req('get_visitor_names', param, 'GET').then(data=>{ |
|
||||
if(data == -1) return |
|
||||
this.getBookData() |
|
||||
this.vistors = data |
|
||||
}); |
|
||||
}, |
}, |
||||
pageInit() { |
pageInit() { |
||||
|
|
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss" scoped> |
<style lang="scss" scoped> |
||||
.page-prebook-list{ |
.page-prebook-list{ |
||||
width: 100%; |
width: 100%; |
||||
height: 100vh; |
height: 100vh; |
||||
box-sizing: border-box; |
box-sizing: border-box; |
||||
overflow-y: auto; |
overflow-y: auto; |
||||
background: #F8F8F8; |
background: #F8F8F8; |
||||
.nav{ |
.nav{ |
||||
width: 100%; |
width: 100%; |
||||
display: flex; |
display: flex; |
||||
height: 132rpx; |
height: 132rpx; |
||||
display: flex; |
display: flex; |
||||
box-sizing: border-box; |
box-sizing: border-box; |
||||
overflow-x: auto; |
overflow-x: auto; |
||||
align-items: center; |
align-items: center; |
||||
padding: 0 18rpx; |
padding: 0 18rpx; |
||||
column-gap: 20rpx; |
column-gap: 20rpx; |
||||
.item{ |
.item{ |
||||
width: auto; |
width: auto; |
||||
flex-shrink: 0; |
flex-shrink: 0; |
||||
padding: 0 20rpx; |
padding: 0 20rpx; |
||||
height: 60rpx; |
height: 60rpx; |
||||
line-height: 60rpx; |
line-height: 60rpx; |
||||
background: rgba(201,203,209,0.25); |
background: rgba(201,203,209,0.25); |
||||
border-radius: 30rpx; |
border-radius: 30rpx; |
||||
box-sizing: border-box; |
box-sizing: border-box; |
||||
font-size: 24rpx; |
font-size: 24rpx; |
||||
color: #616266; |
color: #616266; |
||||
&.active{ |
&.active{ |
||||
border: 1rpx solid #5BD07A; |
border: 1rpx solid #5BD07A; |
||||
color: #58CA7F; |
color: #58CA7F; |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
.preg-books{ |
.preg-books{ |
||||
width: 714rpx; |
width: 714rpx; |
||||
margin: 0 auto; |
margin: 0 auto; |
||||
} |
} |
||||
} |
} |
||||
</style> |
</style> |
||||
|
|||||
Loading…
Reference in new issue