xinelu-applet-ui/pagesB/consultationplatform/consultationplatform.vue

307 lines
7.1 KiB
Vue
Raw Normal View History

2023-09-26 16:42:18 +08:00
<template>
<view class="app">
2023-12-28 16:00:04 +08:00
<image :src="baseurl + '/profile/weChatPicture/consultation.png'" mode="" class="banner"></image>
2023-09-26 16:42:18 +08:00
<view class="card">
<view class="topbar">
2023-10-08 14:51:36 +08:00
<view class="item" @tap='goimagetextConsultation'>
2024-06-25 18:25:50 +08:00
<image :src="require('@/pagesC/images/tuwen.png')" mode=""></image>
2023-09-26 16:42:18 +08:00
<view class="text">
图文问诊
</view>
</view>
2023-09-26 17:06:57 +08:00
<view class="item" @tap='gomedicine'>
2024-06-25 18:25:50 +08:00
<image :src="require('@/pagesC/images/zhuanjia.png')" mode=""></image>
2023-09-26 16:42:18 +08:00
<view class="text">
专家问诊
</view>
</view>
</view>
<view class="title">
专家信息栏
</view>
2023-10-17 14:52:27 +08:00
<u-tabs :list="hospitalDepartmentList" :current="tabcurrent" @change="tabchange" active-color='#26A888'
2023-09-26 17:06:57 +08:00
:show-bar='false'></u-tabs>
2024-11-14 16:36:12 +08:00
<view class="list" v-if="HospitalPersonlist.length>0">
2023-10-17 14:52:27 +08:00
<view class="item" @tap="godoctordetails" v-for="item in HospitalPersonlist">
<image v-if="item.personPictureUrl" :src="baseurl+item.personPictureUrl" mode=""></image>
2024-06-25 18:25:50 +08:00
<image v-else :src="baseurl + '/profile/weChatPicture/docHead.png'" />
2023-09-26 17:06:57 +08:00
<view class="name">
2023-10-17 14:52:27 +08:00
{{item.personName}}
2023-09-26 17:06:57 +08:00
</view>
<view class="position">
2023-10-17 14:52:27 +08:00
{{ item.academicTitle=='CHIEF_PHYSICIAN'?'主任医师':''}}
{{ item.academicTitle=='DEPUTY_CHIEF_PHYSICIAN'?'副主任医师':''}}
{{ item.academicTitle=='ATTENDING_DOCTOR'?'主治医师':''}}
{{ item.academicTitle=='PHYSICIAN'?'医师':''}}
{{ item.academicTitle=='HEALER'?'医士':''}}
2023-11-14 15:14:40 +08:00
{{ item.academicTitle=='RESIDENT_PHYSICIAN'?'住院医师':''}}
2023-09-26 17:06:57 +08:00
</view>
<view class="text">
2023-10-17 14:52:27 +08:00
{{item.personIntroduce}}
2023-09-26 17:06:57 +08:00
</view>
</view>
2023-10-17 14:52:27 +08:00
<view style="width: 46%;" v-if="HospitalPersonlist.length%2!=0">
</view>
<view style="width: 46%;" v-if="HospitalPersonlist.length%2!=0">
2023-09-26 17:06:57 +08:00
</view>
</view>
2023-09-26 16:42:18 +08:00
</view>
2023-11-07 13:54:06 +08:00
<u-toast ref="uToast" />
2023-09-26 16:42:18 +08:00
</view>
</template>
<script>
2023-10-17 14:52:27 +08:00
import {
selectDepartmentNoPage,
selectHospitalPerson
} from '@/api/pagesB/medicine/index.js'
import {
checkSignApply
} from '@/api/pages/homepage/homepage.js'
2023-10-17 14:52:27 +08:00
import baseurl from '../../api/baseurl';
2023-09-26 16:42:18 +08:00
export default {
data() {
return {
2023-10-17 14:52:27 +08:00
baseurl: '',
2023-11-09 15:55:25 +08:00
region: '',
2023-09-26 16:42:18 +08:00
tabcurrent: 0,
2023-10-17 14:52:27 +08:00
pageNum: 1,
pageSize: 10,
departmentId: null,
2024-11-14 16:36:12 +08:00
HospitalPersonlist: [],
2023-10-17 14:52:27 +08:00
HospitalPersontotal: 0,
hospitalDepartmentList: null,
2024-01-24 10:03:11 +08:00
cardNo: '',
checkSign: '',
infotitle: '',
2023-09-26 16:42:18 +08:00
};
},
2023-10-17 14:52:27 +08:00
onLoad() {
2024-01-23 11:49:47 +08:00
this.region = Number(uni.getStorageSync('region'))
2023-10-17 14:52:27 +08:00
this.baseurl = baseurl
this.selectDepartmentinfo();
2024-01-24 10:03:11 +08:00
this.cardNo = uni.getStorageSync('userinfo').cardNo
2023-10-17 14:52:27 +08:00
},
2023-09-26 16:42:18 +08:00
methods: {
2023-11-09 15:55:25 +08:00
info() {
2023-12-28 16:00:04 +08:00
this.$refs.uToast.show({
title: '当前地区不支持,请重新选择区域',
type: 'error',
duration: '2000',
})
2023-11-09 15:55:25 +08:00
},
2023-10-17 14:52:27 +08:00
//人员
selectHospitalPersonInfo() {
2023-11-09 15:55:25 +08:00
var status = '1'
selectHospitalPerson(this.pageNum, this.pageSize, this.departmentId, status).then(res => {
2024-11-14 16:36:12 +08:00
this.HospitalPersonlist = [...this.HospitalPersonlist, ...res.rows]
2023-10-17 14:52:27 +08:00
this.HospitalPersontotal = res.total
})
},
//齐鲁名医科室
selectDepartmentinfo() {
selectDepartmentNoPage().then(res => {
if (res.data.length > 0) {
res.data.forEach(e => {
e.name = e.departmentName
})
this.hospitalDepartmentList = res.data
this.departmentId = this.hospitalDepartmentList[0].departmentId
this.selectHospitalPersonInfo();
}
})
},
tabchange(e) {
this.tabcurrent = e
this.departmentId = this.hospitalDepartmentList[e].departmentId
this.selectHospitalPersonInfo();
},
2023-10-08 14:51:36 +08:00
//专家问诊
2023-09-26 17:06:57 +08:00
gomedicine() {
uni.navigateTo({
url: '/pagesB/medicine/medicine'
})
},
2023-10-08 14:51:36 +08:00
//图文问诊
goimagetextConsultation() {
2023-12-28 16:00:04 +08:00
if (this.region != 3) {
checkSignApply(this.cardNo).then(res => {
if (res.data) {
this.checkSign = res.data.code
this.infotitle = res.data.info
if (this.checkSign == "0") {
uni.navigateTo({
2024-01-24 10:03:11 +08:00
url: `/pagesC/Onlinesigning/Onlinesigning?checkSign=${this.checkSign}`,
})
} else if (this.checkSign == "01") {
this.$refs.uToast.show({
title: this.infotitle,
type: 'error',
})
} else {
2024-01-24 10:03:11 +08:00
uni.navigateTo({
url: '/pagesB/imagetextConsultation/imagetextConsultation'
})
}
}
2023-11-15 10:47:50 +08:00
})
2023-12-28 16:00:04 +08:00
} else {
2023-11-15 10:47:50 +08:00
this.info()
}
2023-10-08 14:51:36 +08:00
},
//医生详情
2023-10-31 17:15:54 +08:00
// godoctordetails() {
// uni.navigateTo({
// url: '/pagesB/doctordetails/doctordetails'
// })
// },
2023-10-17 14:52:27 +08:00
},
onReachBottom() { //下滑加载
if (this.HospitalPersonlist.length >= this.HospitalPersontotal) {} else {
this.pageNum++
2024-11-14 16:36:12 +08:00
this.selectHospitalPersonInfo();
2023-10-17 14:52:27 +08:00
}
},
onPullDownRefresh() { //下拉刷新
this.pageNum = 1;
2024-11-14 16:36:12 +08:00
this.HospitalPersonlist = []
2023-10-17 14:52:27 +08:00
this.selectHospitalPersonInfo();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
2023-09-26 16:42:18 +08:00
}
</script>
<style lang="scss">
2023-10-17 14:52:27 +08:00
.app {
2023-09-26 16:42:18 +08:00
.card {
background-color: #fff;
width: 94%;
margin: 0 auto;
padding-top: 35rpx;
2023-09-26 17:06:57 +08:00
padding-bottom: 200rpx;
border-radius: 0 0 10rpx 10rpx;
.list {
margin-top: 20rpx;
width: 100%;
display: flex;
justify-content: space-around;
2023-10-17 14:52:27 +08:00
flex-wrap: wrap;
2023-09-26 17:06:57 +08:00
.item {
width: 46%;
height: 382rpx;
background: #FFFFFF;
border: 1px solid #26A888;
2023-10-17 14:52:27 +08:00
border-radius: 10rpx;
2023-09-26 17:06:57 +08:00
position: relative;
image {
position: absolute;
2023-10-17 14:52:27 +08:00
width: 120rpx;
2023-09-26 17:06:57 +08:00
top: 20rpx;
left: 20rpx;
2023-10-17 14:52:27 +08:00
height: 120rpx;
2023-09-26 17:06:57 +08:00
}
.name {
position: absolute;
top: 40rpx;
2023-10-17 14:52:27 +08:00
left: 160rpx;
font-size: 28rpx;
2023-09-26 17:06:57 +08:00
font-weight: 400;
color: #000000;
}
.position {
position: absolute;
top: 84rpx;
2023-10-17 14:52:27 +08:00
left: 160rpx;
font-size: 24rpx;
2023-09-26 17:06:57 +08:00
color: #666666;
}
.text {
word-break: break-all;
width: 90%;
2023-10-17 14:52:27 +08:00
margin: 170rpx auto 0;
font-size: 22rpx;
2023-09-26 17:06:57 +08:00
color: #666666;
line-height: 33rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
2023-10-17 14:52:27 +08:00
-webkit-line-clamp: 5; //行数需设置
line-clamp: 5;
2023-09-26 17:06:57 +08:00
-webkit-box-orient: vertical;
text-align: justify;
}
}
}
2023-09-26 16:42:18 +08:00
::v-deep .u-tabs {
padding-top: 30rpx;
}
.title {
width: 94%;
margin: 0 auto;
border-bottom: 2rpx solid #CDC9C9;
font-size: 34rpx;
font-weight: 500;
color: #000000;
margin-top: 40rpx;
padding-bottom: 30rpx;
}
.topbar {
width: 100%;
display: flex;
justify-content: space-around;
color: #fff;
.item {
width: 46%;
height: 180rpx;
background: #26A888;
border-radius: 5rpx;
position: relative;
.text {
position: absolute;
top: 50%;
left: 40%;
transform: translateY(-50%);
display: inline-block;
font-size: 34rpx;
font-weight: 500;
}
image {
position: absolute;
top: 50%;
left: 20%;
transform: translateY(-50%);
width: 48rpx;
height: 41rpx;
}
}
.item:nth-child(2) {
background: #FFA115;
}
}
}
.banner {
display: block;
width: 94%;
height: 350rpx;
margin: 20rpx auto 0;
}
}
2024-01-24 10:03:11 +08:00
</style>