2021-08-19 06:40:59 +00:00
|
|
|
|
<template>
|
|
|
|
|
<view>
|
|
|
|
|
<!-- 状态栏 -->
|
|
|
|
|
<status-nav :titleVal="'医生'" :statusTitle="true"></status-nav>
|
|
|
|
|
<!-- 自定义二级分类 -->
|
|
|
|
|
<!-- 列表 -->
|
2022-04-11 02:12:11 +00:00
|
|
|
|
<view :style="{paddingTop: statusHeight+'px'}" class="pad-zy30">
|
2021-08-19 06:40:59 +00:00
|
|
|
|
<view class="radius20 fon28 col3 mar-s20">
|
|
|
|
|
<view class="disac">
|
2022-03-04 08:48:40 +00:00
|
|
|
|
<view class="disjbac width100 radius10 pad-zy20 xialak bacf posir">
|
|
|
|
|
<input @input="inputSearch" class="fon28 width100" @confirm="searchEv" type="text" v-model="keyword" placeholder="请输入问题/病种/医生姓名" placeholder-style="color: #B3B3B3;" />
|
|
|
|
|
<scroll-view scroll-y v-if="dataList.length && keyword!='' && isSearch" style="position: absolute; background-color: #FFFFFF;left: 0;top: 32px; max-height: 200rpx;border-radius: 10rpx;border: 1rpx solid #e0e0e0;">
|
|
|
|
|
<view class="pad-zy20" @tap="chooseName(item.name)" v-for="(item,index) in dataList" :key="index">{{item.name}}</view>
|
|
|
|
|
</scroll-view>
|
2021-08-19 06:40:59 +00:00
|
|
|
|
</view>
|
|
|
|
|
<view @tap="searchEv" class="flexs tc mar-z30 colf radius10 customer-btn" :style="{background:publicColor}">搜索</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2022-02-15 08:02:16 +00:00
|
|
|
|
<view class="pad-zy20 mar-sx30 pad-x180">
|
2021-08-19 06:40:59 +00:00
|
|
|
|
<!-- 列表 -->
|
|
|
|
|
<view class="fon28 col3 bold qdoctor disac">全部医生</view>
|
|
|
|
|
<view class="mar-s30" v-if="dataList.length!=0">
|
|
|
|
|
<!-- 医生列表 -->
|
|
|
|
|
<list-doctor :list="dataList"></list-doctor>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="dataList.length==0" class="disjcac fc" style="margin-top: 50%;">
|
|
|
|
|
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
|
2021-08-22 08:53:12 +00:00
|
|
|
|
<view v-if="keyword!=''" class="fon24 col3">您搜索的内容暂无结果,换个关键词试试吧</view>
|
|
|
|
|
<view v-if="keyword==''" class="fon24 col3">暂无医生列表</view>
|
2021-08-19 06:40:59 +00:00
|
|
|
|
</view>
|
|
|
|
|
<!-- 返回顶部 -->
|
|
|
|
|
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
|
|
|
|
|
</view>
|
2021-08-26 09:57:04 +00:00
|
|
|
|
<!-- 底部客服 -->
|
2022-02-15 08:02:16 +00:00
|
|
|
|
<!-- <public-customer :nbottom="120"></public-customer> -->
|
2022-03-04 08:48:40 +00:00
|
|
|
|
<!-- 用户信息授权,手机号授权 -->
|
|
|
|
|
<auth-userInfo-mobileInfo></auth-userInfo-mobileInfo>
|
2022-02-15 08:02:16 +00:00
|
|
|
|
<!-- 底部导航 -->
|
|
|
|
|
<view class="posixzy">
|
|
|
|
|
<bottom-tab></bottom-tab>
|
|
|
|
|
</view>
|
2021-08-19 06:40:59 +00:00
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import listDoctor from '@/components/list-doctor.vue';
|
2022-02-15 08:02:16 +00:00
|
|
|
|
import bottomTab from '@/components/bottom-tab.vue';
|
2021-08-19 06:40:59 +00:00
|
|
|
|
export default {
|
|
|
|
|
components:{
|
2022-02-15 08:02:16 +00:00
|
|
|
|
listDoctor,
|
|
|
|
|
bottomTab
|
2021-08-19 06:40:59 +00:00
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
dataList:[
|
|
|
|
|
// {imgSrc:'/static/public/doctor.png',name:'廖恒利医生',cyear:'16',bmen:'美容门诊部',zcheng:'主任医师',goodAt:'毛发种植'},
|
|
|
|
|
// {imgSrc:'/static/public/doctor.png',name:'廖恒利医生',cyear:'16',bmen:'美容门诊部',zcheng:'主任医师',goodAt:'毛发种植'},
|
|
|
|
|
// {imgSrc:'/static/public/doctor.png',name:'廖恒利医生',cyear:'16',bmen:'美容门诊部',zcheng:'主任医师',goodAt:'毛发种植'},
|
|
|
|
|
// {imgSrc:'/static/public/doctor.png',name:'廖恒利医生',cyear:'16',bmen:'美容门诊部',zcheng:'主任医师',goodAt:'毛发种植'},
|
|
|
|
|
// {imgSrc:'/static/public/doctor.png',name:'廖恒利医生',cyear:'16',bmen:'美容门诊部',zcheng:'主任医师',goodAt:'毛发种植'},
|
|
|
|
|
],
|
|
|
|
|
showTop:false,
|
|
|
|
|
page:1,
|
|
|
|
|
size:20,
|
|
|
|
|
total:'',//总数
|
|
|
|
|
isZanw:true,
|
2021-12-02 09:31:26 +00:00
|
|
|
|
keyword:'',
|
2022-03-04 08:48:40 +00:00
|
|
|
|
isSearch:false,
|
|
|
|
|
searchTime:null
|
2021-08-19 06:40:59 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
2022-04-02 09:56:53 +00:00
|
|
|
|
computed: {
|
|
|
|
|
// 主题颜色
|
|
|
|
|
publicColor() {
|
|
|
|
|
return this.$store.state.publicColor
|
2022-04-11 02:12:11 +00:00
|
|
|
|
},
|
|
|
|
|
statusHeight() {
|
|
|
|
|
return this.$store.state.statusHeight
|
2022-04-02 09:56:53 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
2021-08-19 06:40:59 +00:00
|
|
|
|
onPageScroll(e) {
|
|
|
|
|
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
|
|
|
|
|
},
|
|
|
|
|
onReachBottom() {//触底事件
|
|
|
|
|
if(this.total!=this.dataList.length){
|
|
|
|
|
this.page++
|
|
|
|
|
this.checkDor()//调用自主预约列表事件
|
|
|
|
|
} else {
|
|
|
|
|
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000)
|
|
|
|
|
this.isZanw = false
|
|
|
|
|
}
|
|
|
|
|
},
|
2022-04-21 06:13:17 +00:00
|
|
|
|
onShow() {
|
|
|
|
|
this.$toolAll.tools.isLogin();
|
|
|
|
|
},
|
2021-12-02 09:31:26 +00:00
|
|
|
|
onLoad(options) {
|
2022-03-04 08:48:40 +00:00
|
|
|
|
this.checkDor();
|
2021-08-19 06:40:59 +00:00
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
checkDor(){//查询医生列表事件
|
|
|
|
|
this.$requst.post('user/doctor-list',{page:this.page,size:this.size,keyword:this.keyword}).then(res=>{
|
|
|
|
|
// console.log('医生列表:',res);
|
|
|
|
|
if(res.code==0){
|
|
|
|
|
if(this.page==1) this.dataList = []
|
|
|
|
|
if(res.data.list.length!=0){
|
|
|
|
|
this.total = res.data.total
|
|
|
|
|
res.data.list.forEach(item=>{
|
|
|
|
|
let newG = item.diseases
|
2021-08-24 00:54:50 +00:00
|
|
|
|
let ndeptName = ''
|
|
|
|
|
if(item.doctor_extra.dept_name==undefined || item.doctor_extra.dept_name=='') ndeptName = item.dept_name
|
|
|
|
|
else ndeptName = item.doctor_extra.dept_name
|
2021-08-19 06:40:59 +00:00
|
|
|
|
let dObj = {
|
|
|
|
|
id:item.id,
|
2021-08-24 00:54:50 +00:00
|
|
|
|
imgSrc:item.doctor_extra.headimg,//医生头像
|
2021-08-26 01:50:19 +00:00
|
|
|
|
name:item.doctor_extra.name,//医生姓名
|
2021-08-24 00:54:50 +00:00
|
|
|
|
cyear:parseFloat(item.doctor_extra.work_time),//工作年限
|
|
|
|
|
bmen:ndeptName,//部门
|
2021-08-19 06:40:59 +00:00
|
|
|
|
zcheng:'主任医师',
|
|
|
|
|
goodAt:item.diseases,
|
2021-08-24 00:54:50 +00:00
|
|
|
|
show_detail:item.doctor_extra.show_detail//是否可查看详情1是,0否
|
2021-08-19 06:40:59 +00:00
|
|
|
|
}
|
|
|
|
|
this.dataList.push(dObj)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},error=>{})
|
|
|
|
|
},
|
|
|
|
|
backTop(){//回到顶部事件
|
|
|
|
|
uni.pageScrollTo({
|
|
|
|
|
scrollTop: 0,
|
|
|
|
|
duration: 300
|
|
|
|
|
});
|
|
|
|
|
},
|
2022-03-04 08:48:40 +00:00
|
|
|
|
chooseName(name){
|
|
|
|
|
this.keyword = name;
|
|
|
|
|
this.isSearch = false;
|
|
|
|
|
this.checkDor();
|
|
|
|
|
},
|
|
|
|
|
inputSearch(e){
|
|
|
|
|
let val = e.target.value;
|
|
|
|
|
this.dataList = [];
|
|
|
|
|
clearTimeout(this.searchTime);
|
|
|
|
|
if(val!=''){
|
|
|
|
|
this.isSearch = true;
|
|
|
|
|
this.searchTime = setTimeout(()=>{
|
|
|
|
|
this.checkDor()
|
|
|
|
|
},500)
|
|
|
|
|
} else {
|
|
|
|
|
this.isSearch = false;
|
|
|
|
|
this.checkDor();
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-08-19 06:40:59 +00:00
|
|
|
|
searchEv(){
|
2022-03-04 08:48:40 +00:00
|
|
|
|
this.dataList = [];
|
2021-08-19 06:40:59 +00:00
|
|
|
|
this.checkDor()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
</style>
|