医路无忧
This commit is contained in:
parent
473abefad4
commit
4685ea3026
|
@ -30,6 +30,7 @@ declare module 'vue' {
|
|||
VanForm: typeof import('vant/es')['Form']
|
||||
VanIcon: typeof import('vant/es')['Icon']
|
||||
VanList: typeof import('vant/es')['List']
|
||||
VanLoading: typeof import('vant/es')['Loading']
|
||||
VanOverlay: typeof import('vant/es')['Overlay']
|
||||
VanPopup: typeof import('vant/es')['Popup']
|
||||
VanSearch: typeof import('vant/es')['Search']
|
||||
|
|
|
@ -26,12 +26,19 @@ export const getAppointmentDetail = ({ id, date }: AppointmentDetailType) =>
|
|||
}
|
||||
})
|
||||
|
||||
export const getAppointmentOrder = ({ id, date }: AppointmentDetailType) =>
|
||||
export const getAppointmentOrder = ({ id, date, name }: any) =>
|
||||
instance({
|
||||
url: '/appointment/getAppointmentOrderByIdAndTime',
|
||||
method: 'post',
|
||||
params: {
|
||||
id,
|
||||
date
|
||||
date,
|
||||
name
|
||||
}
|
||||
})
|
||||
|
||||
export const getAppointmentHistory = (data: any) => instance({
|
||||
url: '/appointment/setAppointmentOrder',
|
||||
method: 'post',
|
||||
data: {data}
|
||||
})
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import instance from '@/util/request'
|
||||
|
||||
export const getArticle = () => instance.post('/article/getArticleByContent')
|
||||
export const getArticle = () => instance.post('/article/getArticleByTitle')
|
||||
|
||||
export const getArticleByType = (navNum: number) => instance.post('/article/getArticleByType?type=' + navNum)
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import instance from '@/util/request'
|
||||
|
||||
export const searchDoctorByName = (name: any) =>
|
||||
instance.post('/doctor/getDoctorByName', { params: { name } })
|
||||
instance.post('/doctor/getDoctorByName?name=' + name )
|
||||
|
||||
export const searchHospitalByName = (hospitalName: string) =>
|
||||
instance.post('/hospital/getHospitalByName?name=' + hospitalName)
|
||||
|
||||
export const searchArticleByName = (articleByName: string) =>
|
||||
instance.post('/hospital/getArticleByName?name=' + articleByName)
|
||||
export const searchArticleByName = (title: string) =>
|
||||
instance.post('/article/getArticleByTitle?title=' + title)
|
|
@ -1,9 +1,8 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, defineProps, defineModel } from 'vue'
|
||||
import { defineProps, defineModel } from 'vue'
|
||||
|
||||
const prop = defineProps(['info'])
|
||||
const show = defineModel('show')
|
||||
const src = ref(prop.info.url)
|
||||
|
||||
const loading = show
|
||||
</script>
|
||||
|
@ -49,7 +48,7 @@ const loading = show
|
|||
<span style="float: right">{{ prop.info.publishTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<img :src="src || '/article.png'" alt="" />
|
||||
<img :src="prop.info.url || '/article.png'" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, defineModel, defineProps } from 'vue'
|
||||
import { defineModel, defineProps } from 'vue'
|
||||
|
||||
const show = defineModel('show')
|
||||
const prop = defineProps(['info', 'appoint'])
|
||||
const src = ref(prop.info.url)
|
||||
|
||||
const loading = show
|
||||
</script>
|
||||
|
@ -36,7 +35,7 @@ const loading = show
|
|||
</van-skeleton>
|
||||
|
||||
<div style="display: flex; height: 100%; width: 100%" v-else>
|
||||
<img :src="src || '/doctor.png'" alt="" />
|
||||
<img :src="prop.info.url || '/doctor.png'" alt="" />
|
||||
<div class="info">
|
||||
<div>
|
||||
<span style="font-size: 15px; margin-right: 8px">{{ prop.info.doctorName}}</span>
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, defineModel, defineProps } from 'vue'
|
||||
import { defineModel, defineProps } from 'vue'
|
||||
|
||||
const show = defineModel('show')
|
||||
const prop = defineProps(['info'])
|
||||
const src = ref(prop.info.url)
|
||||
|
||||
const loading = show
|
||||
</script>
|
||||
|
@ -36,7 +35,7 @@ const loading = show
|
|||
</van-skeleton>
|
||||
|
||||
<div style="display: flex; height: 100%; width: 100%" v-else>
|
||||
<img :src="src || '/hospital.png'" alt="" />
|
||||
<img :src="prop.info.url || '/hospital.png'" alt="" />
|
||||
<div class="info">
|
||||
<span style="font-size: 15px; font-weight: 600">{{
|
||||
prop.info.hospitalName
|
||||
|
@ -46,7 +45,6 @@ const loading = show
|
|||
<van-icon name="location" size="12px"/>
|
||||
{{ prop.info.address }}
|
||||
</span>
|
||||
<span>2km</span>
|
||||
</div>
|
||||
<ul style="display: flex">
|
||||
<li class="tag">{{ prop.info.labelList[0] }}</li>
|
||||
|
|
|
@ -12,8 +12,8 @@ export const useUserStore = defineStore('user', () => {
|
|||
}
|
||||
|
||||
const userInfo = ref({
|
||||
user: '',
|
||||
avatar: ''
|
||||
nickname: '',
|
||||
avatarUrl: ''
|
||||
})
|
||||
const getUserInfo = async () => {
|
||||
const res = await getUserInfoApi()
|
||||
|
@ -24,4 +24,8 @@ export const useUserStore = defineStore('user', () => {
|
|||
}
|
||||
|
||||
return { token, setToken, userInfo, getUserInfo, setUserInfo }
|
||||
})
|
||||
},
|
||||
{
|
||||
persist: true
|
||||
}
|
||||
)
|
||||
|
|
|
@ -5,7 +5,6 @@ import { useUserStore } from '@/stores'
|
|||
const baseURL = '/app'
|
||||
const instance = axios.create({
|
||||
baseURL,
|
||||
timeout: 5000,
|
||||
headers: {
|
||||
token: ''
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onUpdated, onMounted, watch } from 'vue'
|
||||
import { ref, onUpdated, onMounted } from 'vue'
|
||||
import { getAiConsultApi } from '@/api/aiConsult'
|
||||
import { useRouter, onBeforeRouteLeave, useRoute } from 'vue-router'
|
||||
const router = useRouter()
|
||||
|
@ -39,28 +39,28 @@ const getAiConsult = async () => {
|
|||
textarea.value = ''
|
||||
input.value = true
|
||||
loading.value = true
|
||||
const requst = setTimeout(() => {
|
||||
input.value = false
|
||||
loading.value = false
|
||||
result.value = '请求超时,请稍后再试'
|
||||
let j = 0
|
||||
list.value.push('')
|
||||
// 逐字输出
|
||||
function play() {
|
||||
if (j <= result.value.length) {
|
||||
list.value[list.value.length - 1] += result.value.charAt(j)
|
||||
j++
|
||||
setTimeout(play, 20)
|
||||
}
|
||||
if (j === result.value.length) {
|
||||
sessionStorage.setItem('list', JSON.stringify(list.value))
|
||||
}
|
||||
}
|
||||
play()
|
||||
}, 5000)
|
||||
// const requst = setTimeout(() => {
|
||||
// input.value = false
|
||||
// loading.value = false
|
||||
// result.value = '请求超时,请稍后再试'
|
||||
// let j = 0
|
||||
// list.value.push('')
|
||||
// // 逐字输出
|
||||
// function play() {
|
||||
// if (j <= result.value.length) {
|
||||
// list.value[list.value.length - 1] += result.value.charAt(j)
|
||||
// j++
|
||||
// setTimeout(play, 20)
|
||||
// }
|
||||
// if (j === result.value.length) {
|
||||
// sessionStorage.setItem('list', JSON.stringify(list.value))
|
||||
// }
|
||||
// }
|
||||
// play()
|
||||
// }, 5000)
|
||||
// 获取答案并存入本地
|
||||
const res = await getAiConsultApi(temp)
|
||||
clearTimeout(requst)
|
||||
const res = await getAiConsultApi(temp)
|
||||
// clearTimeout(requst)
|
||||
input.value = false
|
||||
loading.value = false
|
||||
result.value = res.data.data
|
||||
|
@ -85,7 +85,7 @@ const scroll = () => {
|
|||
const container = document.querySelector('.content')
|
||||
if (container) {
|
||||
container.scrollTo({ top: container.scrollHeight, behavior: 'smooth' })
|
||||
console.log(container.scrollTop === container.scrollHeight)
|
||||
container.scrollTop === container.scrollHeight
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
|
@ -110,29 +110,31 @@ onBeforeRouteLeave((to, from, next) => {
|
|||
<div class="main" style="background-color: transparent">
|
||||
<Header>AI 咨询</Header>
|
||||
<div class="content">
|
||||
<span
|
||||
style="position: fixed; top: 22px; right: 20px; z-index: 999"
|
||||
@click="$router.push('/MyselfConsult')"
|
||||
>历史记录
|
||||
</span>
|
||||
<div class="dialog">
|
||||
<div
|
||||
v-html="
|
||||
(introduce || content)
|
||||
.replace(/\n/g, '<br>')
|
||||
.replace(/\t/g, '  ')
|
||||
"
|
||||
></div>
|
||||
<ul class="dialog-item" v-for="(item, index) in list" :key="index">
|
||||
<li :class="index % 2 === 0 ? 'problem' : 'result'">
|
||||
<p
|
||||
v-html="item.replace(/\n/g, '<br>').replace(/\t/g, '  ')"
|
||||
></p>
|
||||
</li>
|
||||
</ul>
|
||||
<span
|
||||
style="position: fixed; top: 22px; right: 20px; z-index: 999"
|
||||
@click="$router.push('/MyselfConsult')"
|
||||
>历史记录
|
||||
</span>
|
||||
<div class="dialog">
|
||||
<div
|
||||
v-html="
|
||||
(introduce || content)
|
||||
.replace(/\n/g, '<br>')
|
||||
.replace(/\t/g, '  ')
|
||||
"
|
||||
></div>
|
||||
<ul class="dialog-item" v-for="(item, index) in list" :key="index">
|
||||
<li :class="index % 2 === 0 ? 'problem' : 'result'">
|
||||
<p
|
||||
v-html="
|
||||
item.replace(/\n/g, '<br>').replace(/\t/g, '  ')
|
||||
"
|
||||
></p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search" ref="search">
|
||||
<van-field
|
||||
:disabled="input"
|
||||
|
|
|
@ -6,33 +6,6 @@ import HomeHospital from './components/HomeHospital.vue'
|
|||
import { getHomeApi } from '@/api/homePage'
|
||||
|
||||
const hospitalVoList = ref([
|
||||
{
|
||||
id: 1,
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
address: '湖南省长沙市开福区湘雅路87号',
|
||||
url: '',
|
||||
level: '三甲',
|
||||
appointmentNumber: 18888,
|
||||
labelList: ['综合医院', '公立医院', '医保定点']
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
address: '湖南省长沙市开福区湘雅路87号',
|
||||
url: '',
|
||||
level: '三甲',
|
||||
appointmentNumber: 18888,
|
||||
labelList: ['综合医院', '公立医院', '医保定点']
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
address: '湖南省长沙市开福区湘雅路87号',
|
||||
url: '',
|
||||
level: '三甲',
|
||||
appointmentNumber: 18888,
|
||||
labelList: ['综合医院', '公立医院', '医保定点']
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
|
@ -55,73 +28,9 @@ const doctorVoList = ref([
|
|||
url: '',
|
||||
appointmentNumber: null,
|
||||
expertise: '呼吸内科专家'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
doctorName: '刘帅',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
name: '呼吸内科',
|
||||
briefly:
|
||||
'著名呼吸病学专家,中华医学会呼吸系病分会第四届主任委员,擅长各种呼吸系统疾病,特别是弥漫性间质性肺病及呼吸生理心理疾病',
|
||||
url: '',
|
||||
appointmentNumber: null,
|
||||
expertise: '呼吸内科专家'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
doctorName: '刘帅',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
name: '呼吸内科',
|
||||
briefly:
|
||||
'著名呼吸病学专家,中华医学会呼吸系病分会第四届主任委员,擅长各种呼吸系统疾病,特别是弥漫性间质性肺病及呼吸生理心理疾病',
|
||||
url: '',
|
||||
appointmentNumber: null,
|
||||
expertise: '呼吸内科专家'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
doctorName: '刘帅',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
name: '呼吸内科',
|
||||
briefly:
|
||||
'著名呼吸病学专家,中华医学会呼吸系病分会第四届主任委员,擅长各种呼吸系统疾病,特别是弥漫性间质性肺病及呼吸生理心理疾病',
|
||||
url: '',
|
||||
appointmentNumber: null,
|
||||
expertise: '心内科专家'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
doctorName: '刘帅',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
name: '呼吸内科',
|
||||
briefly:
|
||||
'著名呼吸病学专家,中华医学会呼吸系病分会第四届主任委员,擅长各种呼吸系统疾病,特别是弥漫性间质性肺病及呼吸生理心理疾病',
|
||||
url: '',
|
||||
appointmentNumber: null,
|
||||
expertise: '内分泌科专家'
|
||||
}
|
||||
])
|
||||
const articleVoList = ref([
|
||||
{
|
||||
id: 1,
|
||||
url: '',
|
||||
titleBig: '空腹能不能吃汤圆?无糖汤圆不“胖人”吗?',
|
||||
titleSmall: '元宵吃汤圆,有什么禁忌吗?',
|
||||
number: 8088,
|
||||
publishTime: '2024-10-31'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
url: '',
|
||||
titleBig: '空腹能不能吃汤圆?无糖汤圆不“胖人”吗?',
|
||||
titleSmall: '元宵吃汤圆,有什么禁忌吗?',
|
||||
number: 8088,
|
||||
publishTime: '2024-10-31'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
url: '',
|
||||
|
@ -138,25 +47,24 @@ const districtId = ref('430105')
|
|||
districtId.value = localStorage.getItem('districtId') as string
|
||||
const getHomePageInfo = async (cityId: string) => {
|
||||
localStorage.setItem('districtId', cityId)
|
||||
showLoadingToast({
|
||||
message: '加载中...',
|
||||
duration: 0,
|
||||
overlay: true,
|
||||
overlayStyle: {
|
||||
backgroundColor: 'rgba(255, 255, 255, 1)'
|
||||
}
|
||||
})
|
||||
const res = await getHomeApi(+cityId)
|
||||
hospitalVoList.value = res.data.data.hospitalVoList
|
||||
doctorVoList.value = res.data.data.doctorVoList
|
||||
articleVoList.value = res.data.data.articleVoList
|
||||
closeToast()
|
||||
hospitalVoList.value = res.data.data?.hospitalVoList
|
||||
doctorVoList.value = res.data.data?.doctorVoList
|
||||
articleVoList.value = res.data.data?.articleVoList
|
||||
}
|
||||
onMounted(async () => {
|
||||
await getHomePageInfo(districtId.value)
|
||||
closeToast()
|
||||
show.value = true
|
||||
})
|
||||
|
||||
// showLoadingToast({
|
||||
// message: '加载中...',
|
||||
// overlay: true,
|
||||
// duration: 500,
|
||||
// overlayStyle: {
|
||||
// backgroundColor: 'rgba(255, 255, 255)'
|
||||
// }
|
||||
// })
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<script setup lang="ts">
|
||||
|
||||
const prop = defineProps(['list'])
|
||||
</script>
|
||||
|
||||
|
@ -7,14 +6,16 @@ const prop = defineProps(['list'])
|
|||
<div class="hospital">
|
||||
<div class="img">
|
||||
<img :src="prop.list.url || '/hospital.png'" alt="" />
|
||||
<span style="left: 4px;">{{ prop.list.labelList[0] }}</span>
|
||||
<span style="right: 4px; background-color: #ff984a;">{{ prop.list.level }}</span>
|
||||
<span style="left: 4px">{{ prop.list.labelList[0] }}</span>
|
||||
<span style="right: 4px; background-color: #ff984a">{{
|
||||
prop.list.level
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="title">
|
||||
<van-text-ellipsis :content="prop.list.hospitalName" />
|
||||
<div style="color: #4AA5FF; margin-top: 3px; font-size: 12px;">
|
||||
<span >{{ prop.list.appointmentNumber }}</span>
|
||||
<span style="color: #aaa;">次预约</span>
|
||||
<van-text-ellipsis :content="prop.list.hospitalName" />
|
||||
<div style="color: #4aa5ff; margin-top: 3px; font-size: 12px">
|
||||
<span>{{ prop.list.appointmentNumber }}</span>
|
||||
<span style="color: #aaa">次预约</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -37,7 +38,7 @@ const prop = defineProps(['list'])
|
|||
height: 100%;
|
||||
border-radius: 8px 8px 0 0;
|
||||
}
|
||||
span{
|
||||
span {
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
font-size: 12px;
|
||||
|
@ -45,7 +46,7 @@ const prop = defineProps(['list'])
|
|||
padding: 2px 5px;
|
||||
font-weight: 100;
|
||||
opacity: 0.9;
|
||||
background-color: #4AA5FF;
|
||||
background-color: #4aa5ff;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,29 +1,31 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { ref, watchEffect } from 'vue'
|
||||
|
||||
const active = ref(0)
|
||||
const props = defineProps(['more', 'doctorVoList'])
|
||||
const list = ref(['严选专家'])
|
||||
|
||||
// 根据expertise进行分组
|
||||
const doctorVoList = ref(props.doctorVoList)
|
||||
if (props.doctorVoList) {
|
||||
const groupedData = doctorVoList.value.reduce((acc: any, item: any) => {
|
||||
const expertise = item.expertise
|
||||
if (!acc[expertise]) {
|
||||
acc[expertise] = [item]
|
||||
} else {
|
||||
acc[expertise].push(item)
|
||||
watchEffect(() => {
|
||||
const doctorVoList = ref(props.doctorVoList)
|
||||
if (props.doctorVoList) {
|
||||
const groupedData = doctorVoList.value.reduce((acc: any, item: any) => {
|
||||
const expertise = item.expertise
|
||||
if (!acc[expertise]) {
|
||||
acc[expertise] = [item]
|
||||
} else {
|
||||
acc[expertise].push(item)
|
||||
}
|
||||
return acc
|
||||
}, {})
|
||||
const consultList = Object.values(groupedData).map((group: any) => {
|
||||
return group.sort((a: any, b: any) => a.id - b.id)
|
||||
})
|
||||
for (let i = 0; i < consultList.length; i++) {
|
||||
list.value.push(consultList[i][0].expertise)
|
||||
}
|
||||
return acc
|
||||
}, {})
|
||||
const consultList = Object.values(groupedData).map((group: any) => {
|
||||
return group.sort((a: any, b: any) => a.id - b.id)
|
||||
})
|
||||
for (let i = 0; i < consultList.length; i++) {
|
||||
list.value.push(consultList[i][0].expertise)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -39,11 +41,19 @@ if (props.doctorVoList) {
|
|||
swipe-threshold="0"
|
||||
>
|
||||
<van-tab ref="tab" v-for="item in list" :key="item" :title="item">
|
||||
<li v-for="(item, index) in doctorVoList" :key="item.id" style="margin: 0 6px">
|
||||
<li
|
||||
v-for="(item, index) in doctorVoList"
|
||||
:key="item.id"
|
||||
style="margin: 0 6px"
|
||||
>
|
||||
<!-- 只展示3条数据 -->
|
||||
<DoctorComponents
|
||||
:info="item"
|
||||
v-if="(item.expertise === list[active] || list[active] === '严选专家') && index < 3"
|
||||
v-if="
|
||||
(item.expertise === list[active] ||
|
||||
list[active] === '严选专家') &&
|
||||
index < 3
|
||||
"
|
||||
@click="$router.push('/doctorDetail/' + item.id)"
|
||||
/>
|
||||
</li>
|
||||
|
|
|
@ -5,41 +5,40 @@ import HospitalDoctor from './components/HospitalDoctor.vue'
|
|||
import { getHospitalDetail } from '@/api/hospital'
|
||||
|
||||
const hospitalDetail = ref({
|
||||
id: 1,
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
districtId: 430105,
|
||||
districtName: '开福区',
|
||||
cityId: 4301,
|
||||
cityName: '长沙市',
|
||||
provinceId: 43,
|
||||
provinceName: '湖南省',
|
||||
address: '湖南省长沙市开福区湘雅路87号',
|
||||
introduction:
|
||||
'中南大学湘雅医院(Xiangya Hospital Central South University)创建于1906年,坐落在人文荟萃的楚汉名城长沙,是中国最早的西医医院之一,是国家卫生健康委员会直管的三级甲等综合医院、教育部直属高校中南大学的附属医院。\n建院伊始,即将欧美医学最高标准融入办医理念,从长沙西牌楼一幢旧房起步,筚路蓝缕、精勤进取,书写了我国西医发展史的重要篇章。\n新中国成立后,在中国共产党的领导下,经过几代湘雅人的不懈努力,各项事业取得长足发展,现已发展成为我国重要的临床诊疗、医学教育与科技创新中心。\n现有编制床位3500张,总建筑面积51万平方米。开设临床医疗医技科室和亚专科111个,病区76个,护理单元101个。拥有国家重点学科7个,国家临床重点专科25个。神经内科、神经外科、皮肤科、骨科、呼吸内科、老年病学等专科的诊疗水平和科技影响力位居全国前列,是国家老年疾病临床医学研究中心。具备医学本科生、研究生、进修生、住院医师规范化培训等完整的学位教育和继续教育教学体系。2020年6月,入选湖南省开展新冠病毒核酸检测的医疗卫生机构名单。2021年8月,中南大学湘雅医院骨科被评选为第20届全国青年文明号。',
|
||||
appointmentNumber: 18888,
|
||||
phone: '0746-4356788',
|
||||
level: '三甲',
|
||||
id: 0,
|
||||
hospitalName: '',
|
||||
districtId: 0,
|
||||
districtName: '',
|
||||
cityId: 0,
|
||||
cityName: '',
|
||||
provinceId: 0,
|
||||
provinceName: '',
|
||||
address: '',
|
||||
introduction: '',
|
||||
appointmentNumber: 0,
|
||||
phone: '',
|
||||
level: '',
|
||||
url: '',
|
||||
isCollection: true,
|
||||
doctorInfoList: [
|
||||
{
|
||||
id: 1,
|
||||
url: '',
|
||||
doctorName: '王强'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
url: '',
|
||||
doctorName: '刘帅'
|
||||
doctorName: ''
|
||||
}
|
||||
],
|
||||
departmentList: ['内分泌科', '呼吸内科']
|
||||
departmentList: ['']
|
||||
})
|
||||
|
||||
const show = ref(false)
|
||||
const route = useRoute()
|
||||
const department = ref([])
|
||||
const getHospitalDetailList = async () => {
|
||||
const res = await getHospitalDetail(+route.params.id)
|
||||
hospitalDetail.value = res.data.data
|
||||
// 最多显示10个科室
|
||||
department.value = res.data.data.departmentList.slice(0, 10)
|
||||
show.value = true
|
||||
}
|
||||
onMounted(() => {
|
||||
getHospitalDetailList()
|
||||
|
@ -58,12 +57,22 @@ const goToAppointmentSource = (department: string) => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div class="main">
|
||||
<van-loading
|
||||
v-if="!show"
|
||||
style="
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
"
|
||||
size="60"
|
||||
/>
|
||||
<div class="main" v-else>
|
||||
<div class="header">
|
||||
<Header :color="'white'" style="position: absolute">
|
||||
{{ hospitalDetail.hospitalName }}
|
||||
</Header>
|
||||
<img :src="hospitalDetail.url || '/hospital.png'" alt="" />
|
||||
<img :src="hospitalDetail.url" alt="" />
|
||||
<div class="bg"></div>
|
||||
<div class="introduce">
|
||||
<div>
|
||||
|
@ -75,8 +84,12 @@ const goToAppointmentSource = (department: string) => {
|
|||
<span>{{ hospitalDetail.appointmentNumber }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<van-button type="primary" size="small" plain
|
||||
@click="$router.push('/hospitalRegistration/' + hospitalDetail.id)">
|
||||
<van-button
|
||||
type="primary"
|
||||
size="small"
|
||||
plain
|
||||
@click="$router.push('/hospitalRegistration/' + hospitalDetail.id)"
|
||||
>
|
||||
立即挂号
|
||||
</van-button>
|
||||
</div>
|
||||
|
@ -101,8 +114,11 @@ const goToAppointmentSource = (department: string) => {
|
|||
<template #title>预约指南</template>
|
||||
<template #content>
|
||||
<div class="doc">
|
||||
<li v-for="item in hospitalDetail.doctorInfoList" :key="item.id"
|
||||
@click="$router.push('/doctorDetail/' + item.id)">
|
||||
<li
|
||||
v-for="item in hospitalDetail.doctorInfoList"
|
||||
:key="item.id"
|
||||
@click="$router.push('/doctorDetail/' + item.id)"
|
||||
>
|
||||
<HospitalDoctor :info="item" />
|
||||
</li>
|
||||
</div>
|
||||
|
@ -113,9 +129,12 @@ const goToAppointmentSource = (department: string) => {
|
|||
<template #title>特色科室</template>
|
||||
<template #content>
|
||||
<div class="department">
|
||||
<li v-for="item in hospitalDetail.departmentList" :key="item"
|
||||
@click="goToAppointmentSource(item)">
|
||||
{{ item }}
|
||||
<li
|
||||
v-for="item in department"
|
||||
:key="item"
|
||||
@click="goToAppointmentSource(item)"
|
||||
>
|
||||
<span>{{ item }}</span>
|
||||
</li>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -3,79 +3,28 @@ import { ref, onMounted } from 'vue'
|
|||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { getRegisteredById } from '@/api/hospital'
|
||||
|
||||
const registered = ref({
|
||||
内科: [
|
||||
'呼吸内科',
|
||||
'内分泌科',
|
||||
'消化内科',
|
||||
'心血管内科',
|
||||
'神经内科',
|
||||
'血液内科',
|
||||
'肾内科',
|
||||
'感染内科',
|
||||
'老年病内科',
|
||||
'风湿免疫内科',
|
||||
'普通内科'
|
||||
],
|
||||
外科: [
|
||||
'普通外科',
|
||||
'泌尿外科',
|
||||
'胸外科',
|
||||
'心脏外科',
|
||||
'神经外科',
|
||||
'整形外科',
|
||||
'肛肠外科',
|
||||
'肝胆外科',
|
||||
'乳腺外科',
|
||||
'心血管外科',
|
||||
'烧伤外科',
|
||||
'儿科'
|
||||
],
|
||||
妇产科: ['妇科', '产科', '计划生育科', '生殖医学科', '新生儿科'],
|
||||
儿科: [
|
||||
'小儿内科',
|
||||
'小儿外科',
|
||||
'小儿骨科',
|
||||
'小儿神经外科',
|
||||
'小儿泌尿外科',
|
||||
'小儿胸外科',
|
||||
'小儿心脏外科'
|
||||
],
|
||||
中医科: [
|
||||
'中医内科',
|
||||
'中医外科',
|
||||
'中医妇产科',
|
||||
'中医儿科',
|
||||
'中医皮肤科',
|
||||
'中医五官科',
|
||||
'中医肿瘤科',
|
||||
'中医肿瘤科',
|
||||
'中医肿瘤科',
|
||||
'中医肿瘤科',
|
||||
'中医肿瘤科'
|
||||
],
|
||||
五官科: ['耳鼻喉科', '口腔科', '眼科', '口腔科']
|
||||
})
|
||||
const registered = ref({})
|
||||
|
||||
// 获取医院挂号信息
|
||||
const show = ref(false)
|
||||
const route = useRoute()
|
||||
const items = ref([]) as any
|
||||
const list = ref([]) as any
|
||||
const getRegistered = async () => {
|
||||
const res = await getRegisteredById(+route.params.id)
|
||||
registered.value = res.data.data.stringListMap
|
||||
const keys = Object.keys(registered.value)
|
||||
items.value = keys.map((item) => {
|
||||
return { text: item }
|
||||
})
|
||||
list.value = Object.values(registered.value)
|
||||
show.value = true
|
||||
}
|
||||
onMounted(() => {
|
||||
getRegistered()
|
||||
})
|
||||
|
||||
const activeIndex = ref(0)
|
||||
const items = ref([]) as any
|
||||
const keys = Object.keys(registered.value)
|
||||
items.value = keys.map((item) => {
|
||||
return { text: item }
|
||||
})
|
||||
|
||||
const list = ref([]) as any
|
||||
list.value = Object.values(registered.value)
|
||||
|
||||
const router = useRouter()
|
||||
const goToAppointmentSource = (department: string) => {
|
||||
|
@ -90,7 +39,17 @@ const goToAppointmentSource = (department: string) => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div class="main">
|
||||
<van-loading
|
||||
v-if="!show"
|
||||
style="
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
"
|
||||
size="60"
|
||||
/>
|
||||
<div class="main" v-else>
|
||||
<Header>预约挂号</Header>
|
||||
<div class="introduce">
|
||||
<div class="title">
|
||||
|
|
|
@ -1,63 +1,15 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, onUnmounted, ref } from 'vue'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { getHospital, getHospitalByTerms } from '@/api/hospital'
|
||||
|
||||
const show = ref(true)
|
||||
const list = ref([
|
||||
{
|
||||
id: 1,
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
address: '湖南省长沙市开福区湘雅路87号',
|
||||
url: '',
|
||||
level: null,
|
||||
appointmentNumber: null,
|
||||
labelList: ['综合医院', '公立医院', '医保定点']
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
address: '湖南省长沙市开福区湘雅路87号',
|
||||
url: '',
|
||||
level: null,
|
||||
appointmentNumber: null,
|
||||
labelList: ['综合医院', '公立医院', '医保定点']
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
address: '湖南省长沙市开福区湘雅路87号',
|
||||
url: '',
|
||||
level: null,
|
||||
appointmentNumber: null,
|
||||
labelList: ['综合医院', '公立医院', '医保定点']
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
address: '湖南省长沙市开福区湘雅路87号',
|
||||
url: '',
|
||||
level: null,
|
||||
appointmentNumber: null,
|
||||
labelList: ['综合医院', '公立医院', '医保定点']
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
address: '湖南省长沙市开福区湘雅路87号',
|
||||
url: '',
|
||||
level: null,
|
||||
appointmentNumber: null,
|
||||
labelList: ['综合医院', '公立医院', '医保定点']
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
address: '湖南省长沙市开福区湘雅路87号',
|
||||
url: '',
|
||||
level: null,
|
||||
appointmentNumber: null,
|
||||
labelList: ['综合医院', '公立医院', '医保定点']
|
||||
}
|
||||
{ id: 1 },
|
||||
{ id: 2 },
|
||||
{ id: 3 },
|
||||
{ id: 4 },
|
||||
{ id: 5 },
|
||||
{ id: 6 }
|
||||
])
|
||||
|
||||
// 获取医院列表
|
||||
|
@ -72,20 +24,40 @@ onMounted(async () => {
|
|||
|
||||
// 筛选
|
||||
const value1 = ref(0)
|
||||
const city = 4301050
|
||||
const option1 = [
|
||||
{ text: '全部城市', value: 0, name: null },
|
||||
{ text: '天心区', value: 1, name: city }
|
||||
{ text: '芙蓉区', value: 1, name: 430102 },
|
||||
{ text: '天心区', value: 2, name: 430103 },
|
||||
{ text: '岳麓区', value: 3, name: 430104 },
|
||||
{ text: '开福区', value: 4, name: 430105 },
|
||||
{ text: '雨花区', value: 5, name: 430111 },
|
||||
{ text: '望城区', value: 6, name: 430112 },
|
||||
{ text: '长沙县', value: 7, name: 430121 },
|
||||
{ text: '浏阳市', value: 8, name: 430181 },
|
||||
{ text: '宁乡市', value: 9, name: 430182 }
|
||||
]
|
||||
const value2 = ref(0)
|
||||
const option2 = [
|
||||
{ text: '全部等级', value: 0, name: null },
|
||||
{ text: '三甲', value: 1, name: '三甲' }
|
||||
{ text: '三级甲等', value: 1, name: '三甲' },
|
||||
{ text: '三级乙等', value: 2, name: '三乙' },
|
||||
{ text: '三级丙等', value: 3, name: '三丙' },
|
||||
{ text: '二级甲等', value: 3, name: '二甲' },
|
||||
{ text: '二级乙等', value: 4, name: '二乙' },
|
||||
{ text: '二级丙等', value: 5, name: '二丙' },
|
||||
{ text: '一级甲等', value: 5, name: '一甲' },
|
||||
{ text: '一级乙等', value: 6, name: '一乙' },
|
||||
{ text: '一级丙等', value: 7, name: '一丙' }
|
||||
]
|
||||
const value3 = ref(0)
|
||||
const option3 = [
|
||||
{ text: '全部科室', value: 0, name: null },
|
||||
{ text: '内分泌科', value: 1, name: '内分泌科' }
|
||||
{ text: '内分泌科', value: 1, name: '内分泌科' },
|
||||
{ text: '消化内科', value: 2, name: '消化内科' },
|
||||
{ text: '呼吸内科', value: 3, name: '呼吸内科' },
|
||||
{ text: '神经内科', value: 4, name: '神经内科' },
|
||||
{ text: '心血管内科', value: 5, name: '心血管内科' },
|
||||
{ text: '血液内科', value: 6, name: '血液内科' }
|
||||
]
|
||||
const page = ref({
|
||||
districtId: option1[value1.value].name,
|
||||
|
@ -93,6 +65,14 @@ const page = ref({
|
|||
name: option3[value3.value].name
|
||||
})
|
||||
const filter = async () => {
|
||||
list.value = [
|
||||
{ id: 1 },
|
||||
{ id: 2 },
|
||||
{ id: 3 },
|
||||
{ id: 4 },
|
||||
{ id: 5 },
|
||||
{ id: 6 }
|
||||
]
|
||||
show.value = true
|
||||
page.value = {
|
||||
districtId: option1[value1.value].name,
|
||||
|
@ -134,7 +114,7 @@ const searchList = (val: any) => {
|
|||
<van-empty
|
||||
image="search"
|
||||
description="搜索内容为空"
|
||||
v-if="noSearch.length !== 0"
|
||||
v-if="noSearch.length === 0 && list.length === 0"
|
||||
/>
|
||||
<ul v-else>
|
||||
<li v-for="item in list" :key="item.id">
|
||||
|
|
|
@ -3,25 +3,26 @@ import { ref, onMounted } from 'vue'
|
|||
import type { AppointmentDetailType } from '@/types/index'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useAiDetailStore } from '@/stores'
|
||||
import { getAppointmentDetail, getAppointmentOrder } from '@/api/appointment'
|
||||
import { getAppointmentDetail, getAppointmentHistory } from '@/api/appointment'
|
||||
|
||||
const appointmentInfo = ref({
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
hospitalPhone: '0731-84567890',
|
||||
doctorName: '王强',
|
||||
address: '湖南省长沙市开福区湘雅路87号',
|
||||
department: '内分泌科',
|
||||
fees: 55
|
||||
hospitalName: '',
|
||||
userPhone: '',
|
||||
doctorName: '',
|
||||
address: '',
|
||||
department: '',
|
||||
fees: 0
|
||||
})
|
||||
const date = ref('')
|
||||
const name = ref('张三')
|
||||
const phone = ref('13888888888')
|
||||
const name = ref('')
|
||||
const userPhone = ref('')
|
||||
const remark = ref('')
|
||||
|
||||
// 获取预约信息
|
||||
const show = ref(false)
|
||||
const aiDetailStore = useAiDetailStore()
|
||||
const route = useRoute()
|
||||
const hospitailId = route.query.hospitalId as string
|
||||
// const hospitailId = route.query.hospitalId as string
|
||||
date.value = route.query.date as string
|
||||
const params = ref<AppointmentDetailType>({
|
||||
id: +route.query.doctorId!,
|
||||
|
@ -30,6 +31,7 @@ const params = ref<AppointmentDetailType>({
|
|||
const getAppointmentInfo = async () => {
|
||||
const res = await getAppointmentDetail(params.value)
|
||||
appointmentInfo.value = res.data.data
|
||||
show.value = true
|
||||
}
|
||||
onMounted(() => {
|
||||
getAppointmentInfo()
|
||||
|
@ -37,25 +39,33 @@ onMounted(() => {
|
|||
|
||||
// 跳转预约成功页面
|
||||
const router = useRouter()
|
||||
const params2 = ref<AppointmentDetailType>({
|
||||
const params2 = ref<any>({
|
||||
id: +route.query.doctorId!,
|
||||
date: route.query.date as string
|
||||
appointmentDate: route.query.date as string,
|
||||
fees: 0,
|
||||
name: '',
|
||||
phone: '',
|
||||
memo: ''
|
||||
})
|
||||
const goAppointSucceed = async () => {
|
||||
await getAppointmentOrder(params2.value)
|
||||
// 校验表单
|
||||
if (!name.value || !phone.value) {
|
||||
if (!name.value || !userPhone.value) {
|
||||
showToast('请输入姓名和手机号')
|
||||
return
|
||||
}
|
||||
if (!/^1[3456789]\d{9}$/.test(phone.value)) {
|
||||
if (!/^1[3456789]\d{9}$/.test(userPhone.value)) {
|
||||
showToast('请输入正确的手机号')
|
||||
return
|
||||
}
|
||||
params2.value.name = name.value
|
||||
params2.value.phone = userPhone.value
|
||||
params2.value.memo = remark.value
|
||||
console.log(params2.value)
|
||||
await getAppointmentHistory(params2.value)
|
||||
// 提交预约信息
|
||||
aiDetailStore.setDetail(appointmentInfo.value)
|
||||
aiDetailStore.detail.name = name.value
|
||||
aiDetailStore.detail.phone = phone.value
|
||||
aiDetailStore.detail.userPhone = userPhone.value
|
||||
aiDetailStore.detail.memo = remark.value
|
||||
aiDetailStore.detail.date = date.value
|
||||
// 跳转预约成功页面
|
||||
|
@ -66,23 +76,31 @@ const goAppointSucceed = async () => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div class="main">
|
||||
<van-loading
|
||||
v-if="!show"
|
||||
style="
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 999;
|
||||
"
|
||||
size="60"
|
||||
/>
|
||||
<div class="main" v-else>
|
||||
<Header>预约详情</Header>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<span>
|
||||
就诊医院 -
|
||||
<em
|
||||
style="color: #888"
|
||||
@click="$router.push('/hospitalDetail/' + hospitailId)"
|
||||
>
|
||||
<em style="color: #888">
|
||||
{{ appointmentInfo.hospitalName }}
|
||||
</em>
|
||||
<van-icon name="arrow" size="16px" color="#888" />
|
||||
</span>
|
||||
<span>
|
||||
预约医生 -
|
||||
<em style="color: #888" @click="$router.push('/doctorDetail/1')">
|
||||
<em style="color: #888">
|
||||
{{ appointmentInfo.doctorName }}
|
||||
</em>
|
||||
<van-icon name="arrow" size="16px" color="#888" />
|
||||
|
@ -115,7 +133,7 @@ const goAppointSucceed = async () => {
|
|||
autocomplete="off"
|
||||
:rows="3"
|
||||
placeholder="请输入手机号"
|
||||
v-model="phone"
|
||||
v-model="userPhone"
|
||||
></el-input>
|
||||
</template>
|
||||
</van-cell>
|
||||
|
@ -147,6 +165,14 @@ const goAppointSucceed = async () => {
|
|||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.van-loading {
|
||||
z-index: 999;
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #f5f6f7;
|
||||
}
|
||||
|
||||
.container {
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
@ -215,7 +241,7 @@ const goAppointSucceed = async () => {
|
|||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
padding: 0 24px;
|
||||
font-weight: 600;
|
||||
|
|
|
@ -13,78 +13,12 @@ const params = ref<AppointmentType>({
|
|||
})
|
||||
|
||||
const appointSourceList = ref([
|
||||
{
|
||||
id: 1,
|
||||
doctorName: '王强',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
name: '内分泌科',
|
||||
briefly:
|
||||
'内分泌专家,甲状腺综合手术治疗专家,省级内分泌科委员会委员,独创中医疗法,内分泌科疑难杂症综合治疗',
|
||||
url: '',
|
||||
appointmentNumber: null,
|
||||
expertise: null
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
doctorName: '王强',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
name: '内分泌科',
|
||||
briefly:
|
||||
'内分泌专家,甲状腺综合手术治疗专家,省级内分泌科委员会委员,独创中医疗法,内分泌科疑难杂症综合治疗',
|
||||
url: '',
|
||||
appointmentNumber: null,
|
||||
expertise: null
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
doctorName: '王强',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
name: '内分泌科',
|
||||
briefly:
|
||||
'内分泌专家,甲状腺综合手术治疗专家,省级内分泌科委员会委员,独创中医疗法,内分泌科疑难杂症综合治疗',
|
||||
url: '',
|
||||
appointmentNumber: null,
|
||||
expertise: null
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
doctorName: '王强',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
name: '内分泌科',
|
||||
briefly:
|
||||
'内分泌专家,甲状腺综合手术治疗专家,省级内分泌科委员会委员,独创中医疗法,内分泌科疑难杂症综合治疗',
|
||||
url: '',
|
||||
appointmentNumber: null,
|
||||
expertise: null
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
doctorName: '王强',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
name: '内分泌科',
|
||||
briefly:
|
||||
'内分泌专家,甲状腺综合手术治疗专家,省级内分泌科委员会委员,独创中医疗法,内分泌科疑难杂症综合治疗',
|
||||
url: '',
|
||||
appointmentNumber: null,
|
||||
expertise: null
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
doctorName: '王强',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
name: '内分泌科',
|
||||
briefly:
|
||||
'内分泌专家,甲状腺综合手术治疗专家,省级内分泌科委员会委员,独创中医疗法,内分泌科疑难杂症综合治疗',
|
||||
url: '',
|
||||
appointmentNumber: null,
|
||||
expertise: null
|
||||
}
|
||||
{ id: 1 },
|
||||
{ id: 2 },
|
||||
{ id: 3 },
|
||||
{ id: 4 },
|
||||
{ id: 5 },
|
||||
{ id: 6 }
|
||||
])
|
||||
|
||||
// 获取医生列表
|
||||
|
@ -95,10 +29,11 @@ const getAppointmentList = async () => {
|
|||
res.data.data === null
|
||||
? (appointSourceList.value = [])
|
||||
: (appointSourceList.value = res.data.data)
|
||||
}
|
||||
onMounted(async () => {
|
||||
await getAppointmentList()
|
||||
|
||||
show.value = false
|
||||
}
|
||||
onMounted(() => {
|
||||
getAppointmentList()
|
||||
})
|
||||
|
||||
// 选择日期
|
||||
|
@ -109,6 +44,14 @@ function formatDate(date: any) {
|
|||
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`
|
||||
}
|
||||
const onConfirm = (value: any) => {
|
||||
appointSourceList.value = [
|
||||
{ id: 1 },
|
||||
{ id: 2 },
|
||||
{ id: 3 },
|
||||
{ id: 4 },
|
||||
{ id: 5 },
|
||||
{ id: 6 }
|
||||
]
|
||||
showCalendar.value = false
|
||||
dates.value = formatDate(value)
|
||||
dateId.value = formatDate(value)
|
||||
|
@ -119,6 +62,8 @@ const onConfirm = (value: any) => {
|
|||
) {
|
||||
dates.value = '明天'
|
||||
}
|
||||
params.value.date = formatDate(value)
|
||||
getAppointmentList()
|
||||
}
|
||||
|
||||
// 跳转预约详情页
|
||||
|
@ -137,7 +82,7 @@ const goAppointDetail = (item: any) => {
|
|||
|
||||
<template>
|
||||
<div class="main">
|
||||
<Header>内科科室</Header>
|
||||
<Header>{{ params.department }}</Header>
|
||||
<div class="calendar-box">
|
||||
<div class="calendar" @click="showCalendar = true">
|
||||
<span>选择预约日期</span>
|
||||
|
@ -167,6 +112,14 @@ const goAppointDetail = (item: any) => {
|
|||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.van-loading {
|
||||
z-index: 999;
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #F5F6F7;
|
||||
}
|
||||
|
||||
.calendar-box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
|
|
@ -3,26 +3,41 @@ import { ref } from 'vue'
|
|||
import { useAiDetailStore } from '@/stores'
|
||||
|
||||
const appointmentOrder = ref({
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
doctorName: '王强',
|
||||
address: '湖南省长沙市开福区湘雅路87号',
|
||||
hospitalPhone: '0746-4356788',
|
||||
department: '内分泌科',
|
||||
fees: 55,
|
||||
name: '张三',
|
||||
date: '2024-12-21',
|
||||
phone: '13712345678',
|
||||
memo: '携带上次心电图检查结果及近期血液检测报告。'
|
||||
hospitalName: '',
|
||||
doctorName: '',
|
||||
address: '',
|
||||
phone: '',
|
||||
department: '',
|
||||
fees: 0,
|
||||
name: '',
|
||||
date: '',
|
||||
userPhone: '',
|
||||
memo: ''
|
||||
}) as any
|
||||
|
||||
// 获取预约订单信息
|
||||
const aiDetailStore = useAiDetailStore()
|
||||
appointmentOrder.value = aiDetailStore.detail
|
||||
|
||||
const show = ref(false)
|
||||
setTimeout(() => {
|
||||
show.value = true
|
||||
}, 1000)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="main">
|
||||
<van-loading
|
||||
v-if="!show"
|
||||
style="
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 9999;
|
||||
"
|
||||
size="60"
|
||||
/>
|
||||
<div class="main" v-else>
|
||||
<div class="header">
|
||||
<h2><van-icon name="certificate" /> 预约成功</h2>
|
||||
<span style="margin-top: 4px">请按时就诊,祝您身体健康</span>
|
||||
|
@ -33,10 +48,14 @@ appointmentOrder.value = aiDetailStore.detail
|
|||
<template #title>预约信息</template>
|
||||
<template #content>
|
||||
<div class="info">
|
||||
<span>医院:{{appointmentOrder.hospitalName}}</span>
|
||||
<span style="margin: 8px 0">科室:{{appointmentOrder.department}}</span>
|
||||
<span style="margin-bottom: 8px">医生:{{appointmentOrder.doctorName}}</span>
|
||||
<span>时间:{{appointmentOrder.date}}</span>
|
||||
<span>医院:{{ appointmentOrder.hospitalName }}</span>
|
||||
<span style="margin: 8px 0"
|
||||
>科室:{{ appointmentOrder.department }}</span
|
||||
>
|
||||
<span style="margin-bottom: 8px"
|
||||
>医生:{{ appointmentOrder.doctorName }}</span
|
||||
>
|
||||
<span>时间:{{ appointmentOrder.date }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</AppointmentTitle>
|
||||
|
@ -44,8 +63,10 @@ appointmentOrder.value = aiDetailStore.detail
|
|||
<template #title>就诊人信息</template>
|
||||
<template #content>
|
||||
<div class="info">
|
||||
<span style="margin-bottom: 8px">姓名:{{appointmentOrder.name}}</span>
|
||||
<span>联系方式:{{appointmentOrder.phone}}</span>
|
||||
<span style="margin-bottom: 8px"
|
||||
>姓名:{{ appointmentOrder.name }}</span
|
||||
>
|
||||
<span>联系方式:{{ appointmentOrder.userPhone }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</AppointmentTitle>
|
||||
|
@ -59,8 +80,10 @@ appointmentOrder.value = aiDetailStore.detail
|
|||
<template #title>其他信息</template>
|
||||
<template #content>
|
||||
<div class="info">
|
||||
<span>医院电话:{{appointmentOrder.hospitalPhone}}</span>
|
||||
<span style="margin: 8px 0">医院地址:{{appointmentOrder.address}}</span>
|
||||
<span>医院电话:{{ appointmentOrder.phone }}</span>
|
||||
<span style="margin: 8px 0"
|
||||
>医院地址:{{ appointmentOrder.address }}</span
|
||||
>
|
||||
<div class="price">
|
||||
<span>挂号费</span>
|
||||
<span style="color: #ff5c83">¥{{ appointmentOrder.fees }}</span>
|
||||
|
@ -139,9 +162,8 @@ appointmentOrder.value = aiDetailStore.detail
|
|||
height: auto;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
position: fixed;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
z-index: 999;
|
||||
background-color: #f5f5f5;
|
||||
.btn {
|
||||
width: 90vw;
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
const props = defineProps(['info'])
|
||||
const info = ref(props.info)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="hospital">
|
||||
<div class="img">
|
||||
<img :src="info.url || '/hospital.png'" alt="" />
|
||||
<img :src="props.info || '/hospital.png'" alt="" />
|
||||
</div>
|
||||
<div class="name">
|
||||
{{ info.doctorName }}
|
||||
|
|
|
@ -10,82 +10,19 @@ const active = ref(1)
|
|||
|
||||
const doctorDetail = ref({
|
||||
id: 1,
|
||||
doctorName: '王强',
|
||||
doctorName: '',
|
||||
hospitalId: 1,
|
||||
level: '主任医师',
|
||||
expertise: '内分泌科专家',
|
||||
source: '中南大学湘雅医院博士生导师',
|
||||
appointmentNumber: 3688,
|
||||
departmentId: '1',
|
||||
briefly:
|
||||
'内分泌专家,甲状腺综合手术治疗专家,省级内分泌科委员会委员,独创中医疗法,内分泌科疑难杂症综合治疗',
|
||||
level: '',
|
||||
expertise: '',
|
||||
source: '',
|
||||
appointmentNumber: 0,
|
||||
departmentId: 1,
|
||||
briefly:'',
|
||||
url: '',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
hospitalName: '',
|
||||
isCollection: true,
|
||||
appointmentTimeList: [
|
||||
{
|
||||
appointmentDate: '2024-12-22'
|
||||
},
|
||||
{
|
||||
appointmentDate: '2024-12-23'
|
||||
},
|
||||
{
|
||||
appointmentDate: '2024-12-24'
|
||||
},
|
||||
{
|
||||
appointmentDate: '2024-12-25'
|
||||
}
|
||||
],
|
||||
articleVoList: [
|
||||
{
|
||||
id: 1,
|
||||
url: '',
|
||||
titleBig: '空腹能不能吃汤圆?无糖汤圆不“胖人”吗?',
|
||||
titleSmall: '元宵吃汤圆,有什么禁忌吗?',
|
||||
number: 8088,
|
||||
publishTime: '2024-10-31'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
url: '',
|
||||
titleBig: '空腹能不能吃汤圆?无糖汤圆不“胖人”吗?',
|
||||
titleSmall: '元宵吃汤圆,有什么禁忌吗?',
|
||||
number: 8088,
|
||||
publishTime: '2024-10-31'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
url: '',
|
||||
titleBig: '空腹能不能吃汤圆?无糖汤圆不“胖人”吗?',
|
||||
titleSmall: '元宵吃汤圆,有什么禁忌吗?',
|
||||
number: 8088,
|
||||
publishTime: '2024-10-31'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
url: '',
|
||||
titleBig: '空腹能不能吃汤圆?无糖汤圆不“胖人”吗?',
|
||||
titleSmall: '元宵吃汤圆,有什么禁忌吗?',
|
||||
number: 8088,
|
||||
publishTime: '2024-10-31'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
url: '',
|
||||
titleBig: '空腹能不能吃汤圆?无糖汤圆不“胖人”吗?',
|
||||
titleSmall: '元宵吃汤圆,有什么禁忌吗?',
|
||||
number: 8088,
|
||||
publishTime: '2024-10-31'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
url: '',
|
||||
titleBig: '空腹能不能吃汤圆?无糖汤圆不“胖人”吗?',
|
||||
titleSmall: '元宵吃汤圆,有什么禁忌吗?',
|
||||
number: 8088,
|
||||
publishTime: '2024-10-31'
|
||||
},
|
||||
]
|
||||
appointmentTimeList: [],
|
||||
articleVoList: []
|
||||
})
|
||||
const articleList = ref<any>([])
|
||||
articleList.value = doctorDetail.value.articleVoList
|
||||
|
@ -93,12 +30,15 @@ const appointList = ref<any>([])
|
|||
appointList.value = doctorDetail.value.appointmentTimeList
|
||||
|
||||
// 获取医生详情
|
||||
const show = ref(false)
|
||||
const route = useRoute()
|
||||
const getDoctorDetailList = async ()=> {
|
||||
const res = await getDoctorDetail(+route.params.id)
|
||||
doctorDetail.value = res.data.data
|
||||
articleList.value = res.data.data.articleVoList
|
||||
appointList.value = res.data.data.appointmentTimeList
|
||||
|
||||
show.value = true
|
||||
}
|
||||
onMounted(() => {
|
||||
getDoctorDetailList()
|
||||
|
@ -112,7 +52,7 @@ const goAppointDetail = (date: any) => {
|
|||
query: {
|
||||
doctorId: doctorDetail.value.id,
|
||||
hospitalId: doctorDetail.value.hospitalId,
|
||||
date
|
||||
date: date
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -123,7 +63,17 @@ const collectFn = () => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div class="main">
|
||||
<van-loading
|
||||
v-if="!show"
|
||||
style="
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
"
|
||||
size="60"
|
||||
/>
|
||||
<div class="main" v-else>
|
||||
<div>
|
||||
<Header
|
||||
:color="'blue'"
|
||||
|
@ -187,8 +137,8 @@ const collectFn = () => {
|
|||
<template #right>医院详情<van-icon name="arrow" /></template>
|
||||
</DoctorTitle>
|
||||
<ul>
|
||||
<li v-for="item in appointList" :key="item.appointmentDate">
|
||||
<DoctorAppointment :info="item" @click="goAppointDetail(item.appointmentDate)" />
|
||||
<li v-for="item in appointList" :key="item">
|
||||
<DoctorAppointment :info="item" @click="goAppointDetail(item)" />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -4,90 +4,12 @@ import { getDoctor, getDoctorByTerms } from '@/api/doctor'
|
|||
|
||||
const show = ref(true)
|
||||
const list = ref([
|
||||
{
|
||||
id: 2,
|
||||
doctorName: '刘帅',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
name: '呼吸内科',
|
||||
briefly:
|
||||
'著名呼吸病学专家,中华医学会呼吸系病分会第四届主任委员,擅长各种呼吸系统疾病,特别是弥漫性间质性肺病及呼吸生理心理疾病',
|
||||
url: '',
|
||||
appointmentNumber: null,
|
||||
expertise: '呼吸内科专家'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
doctorName: '刘帅',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
name: '呼吸内科',
|
||||
briefly:
|
||||
'著名呼吸病学专家,中华医学会呼吸系病分会第四届主任委员,擅长各种呼吸系统疾病,特别是弥漫性间质性肺病及呼吸生理心理疾病',
|
||||
url: '',
|
||||
appointmentNumber: null,
|
||||
expertise: '呼吸内科专家'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
doctorName: '刘帅',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
name: '呼吸内科',
|
||||
briefly:
|
||||
'著名呼吸病学专家,中华医学会呼吸系病分会第四届主任委员,擅长各种呼吸系统疾病,特别是弥漫性间质性肺病及呼吸生理心理疾病',
|
||||
url: '',
|
||||
appointmentNumber: null,
|
||||
expertise: '呼吸内科专家'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
doctorName: '王强',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
name: '内分泌科',
|
||||
briefly:
|
||||
'内分泌专家,甲状腺综合手术治疗专家,省级内分泌科委员会委员,独创中医疗法,内分泌科疑难杂症综合治疗',
|
||||
url: '',
|
||||
appointmentNumber: null,
|
||||
expertise: null
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
doctorName: '王强',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
name: '内分泌科',
|
||||
briefly:
|
||||
'内分泌专家,甲状腺综合手术治疗专家,省级内分泌科委员会委员,独创中医疗法,内分泌科疑难杂症综合治疗',
|
||||
url: '',
|
||||
appointmentNumber: null,
|
||||
expertise: null
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
doctorName: '王强',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
name: '内分泌科',
|
||||
briefly:
|
||||
'内分泌专家,甲状腺综合手术治疗专家,省级内分泌科委员会委员,独创中医疗法,内分泌科疑难杂症综合治疗',
|
||||
url: '',
|
||||
appointmentNumber: null,
|
||||
expertise: null
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
doctorName: '王强',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
name: '内分泌科',
|
||||
briefly:
|
||||
'内分泌专家,甲状腺综合手术治疗专家,省级内分泌科委员会委员,独创中医疗法,内分泌科疑难杂症综合治疗',
|
||||
url: '',
|
||||
appointmentNumber: null,
|
||||
expertise: null
|
||||
}
|
||||
{ id: 1 },
|
||||
{ id: 2 },
|
||||
{ id: 3 },
|
||||
{ id: 4 },
|
||||
{ id: 5 },
|
||||
{ id: 6 }
|
||||
])
|
||||
|
||||
// 获取医生列表
|
||||
|
@ -110,12 +32,20 @@ const option1 = [
|
|||
const value2 = ref(0)
|
||||
const option2 = [
|
||||
{ text: '全部科室', value: 0, name: null },
|
||||
{ text: '内分泌科', value: 1, name: '内分泌科' }
|
||||
{ text: '内分泌科', value: 1, name: '内分泌科' },
|
||||
{ text: '消化内科', value: 2, name: '消化内科' },
|
||||
{ text: '呼吸内科', value: 3, name: '呼吸内科' },
|
||||
{ text: '神经内科', value: 4, name: '神经内科' },
|
||||
{ text: '心血管内科', value: 5, name: '心血管内科' },
|
||||
{ text: '血液内科', value: 6, name: '血液内科' }
|
||||
]
|
||||
const value3 = ref(0)
|
||||
const option3 = [
|
||||
{ text: '全部职称', value: 0, name: null },
|
||||
{ text: '主任医师', value: 1, name: '主任医师' }
|
||||
{ text: '主任医师', value: 1, name: '主任医师' },
|
||||
{ text: '副主任医师', value: 2, name: '副主任医师' },
|
||||
{ text: '主治医师', value: 3, name: '主治医师' },
|
||||
{ text: '住院医师', value: 4, name: '住院医师' }
|
||||
]
|
||||
const page = ref({
|
||||
orderType: option1[value1.value].name,
|
||||
|
@ -123,6 +53,14 @@ const page = ref({
|
|||
level: option3[value3.value].name
|
||||
})
|
||||
const filter = async () => {
|
||||
list.value = [
|
||||
{ id: 1 },
|
||||
{ id: 2 },
|
||||
{ id: 3 },
|
||||
{ id: 4 },
|
||||
{ id: 5 },
|
||||
{ id: 6 }
|
||||
]
|
||||
show.value = true
|
||||
page.value = {
|
||||
orderType: option1[value1.value].name,
|
||||
|
@ -164,7 +102,7 @@ const searchList = (val: any) => {
|
|||
<van-empty
|
||||
image="search"
|
||||
description="搜索内容为空"
|
||||
v-if="noSearch.length !== 0"
|
||||
v-if="noSearch.length === 0 && list.length === 0"
|
||||
/>
|
||||
<ul v-else>
|
||||
<li v-for="item in list" :key="item.id">
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
<script setup lang="ts">
|
||||
const prop = defineProps(['info'])
|
||||
const info = prop.info
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="appointment">
|
||||
<div>
|
||||
<span>{{ info.appointmentDate.slice(0, 4) }}</span>
|
||||
<span>{{ info.appointmentDate.slice(5) }}</span>
|
||||
<span>{{ prop.info.slice(0, 4) }}</span>
|
||||
<span>{{ prop.info.slice(5) }}</span>
|
||||
</div>
|
||||
<div style="background-color: #4AA5FF; flex: 3; width: 100%; color: #fff">
|
||||
{{ '预约' }}
|
||||
|
|
|
@ -5,24 +5,22 @@ import { getArticleDetail } from '@/api/article'
|
|||
|
||||
const articleDetail = ref({
|
||||
id: 1,
|
||||
titleBig: '空腹能不能吃汤圆?无糖汤圆不“胖人”吗?',
|
||||
titleSmall: '元宵吃汤圆,有什么禁忌吗?',
|
||||
number: 8088,
|
||||
titleBig: '',
|
||||
titleSmall: '',
|
||||
number: 0,
|
||||
doctorId: 1,
|
||||
content:
|
||||
'\t空腹不建议吃汤圆,因为汤圆主要成分是糯米,糯米较难消化,空腹食用可能会刺激胃酸分泌,导致胃部不适。另外,汤圆通常含有较多的糖分和油脂,空腹食用可能会引起血糖快速上升,对糖尿病患者或血糖控制不佳的人尤其不利。\r\n\r\n\t至于无糖汤圆,虽然去掉了糖分,但糯米本身和其他配料(如豆沙、芝麻等)仍含有较高的热量和脂肪。因此,无糖汤圆并不能完全做到“不胖人”。如果担心体重问题,即使是无糖汤圆也应适量食用,不宜过量。同时,要注意汤圆的整体热量摄入,合理安排饮食,配合适当的运动,才能更好地控制体重。\r\n\r\n\t元宵节吃汤圆是中国传统习俗,但在享受这一美食时,也需要注意以下禁忌:\r\n\r\n\t糖尿病患者和血糖控制不佳者:汤圆含有较多糖分和淀粉,即使是无糖汤圆,也含有较高的碳水化合物,可能会引起血糖快速升高,应尽量少吃或不吃。\r\n消化系统疾病患者:汤圆的外皮主要由糯米制成,糯米较难消化,患有胃病、胃溃疡、胃炎、消化不良等疾病的人应谨慎食用。\r\n\r\n\t1、老年人:老年人的消化功能相对较弱,应适量食用,避免过量导致消化不良。\r\n\t2、婴幼儿:婴幼儿的消化系统尚未完全成熟,汤圆不易咀嚼和消化,且含有较多的糖和油脂,不适合婴幼儿食用。\r\n\t3、肥胖和正在减肥的人:汤圆热量较高,应适量食用,以免影响减肥效果。\r\n\t4、食用时不宜过快:汤圆应慢慢咀嚼,以免噎到。\r\n\t5、不宜空腹食用:空腹吃汤圆可能会刺激胃酸分泌,导致胃部不适。\r\n\t6、注意汤圆的食用温度:汤圆应煮熟后食用,不宜过热,以免烫伤口腔和食道。\r\n\t7、不宜与油腻食物同食:汤圆本身较油腻,不宜与其他油腻食物同食,以免加重消化负担。\r\n\t8、注意食品卫生:自制汤圆时应确保食材新鲜,煮熟煮透;购买现成的汤圆时应选择信誉良好的品牌和商家。\r\n\r\n\t遵循以上禁忌,可以更健康地享受汤圆带来的节日氛围。',
|
||||
type: 2,
|
||||
content: '',
|
||||
type: 0,
|
||||
doctorInfo: {
|
||||
id: 1,
|
||||
doctorName: '王强',
|
||||
doctorName: '',
|
||||
hospitalId: 1,
|
||||
level: '主任医师',
|
||||
expertise: '内分泌科专家',
|
||||
source: '中南大学湘雅医院博士生导师',
|
||||
appointmentNumber: 3688,
|
||||
departmentId: '1',
|
||||
briefly:
|
||||
'内分泌专家,甲状腺综合手术治疗专家,省级内分泌科委员会委员,独创中医疗法,内分泌科疑难杂症综合治疗'
|
||||
level: '',
|
||||
expertise: '',
|
||||
source: '',
|
||||
appointmentNumber: '',
|
||||
departmentId: '',
|
||||
briefly: ''
|
||||
},
|
||||
url: '',
|
||||
doctorUrl: '',
|
||||
|
@ -32,6 +30,7 @@ const doctorInfo = articleDetail.value.doctorInfo
|
|||
|
||||
// 获取文章详情
|
||||
const content = ref('')
|
||||
const show = ref(false)
|
||||
// 转化文章内容,首行缩进,\t替换为 ,换行符替换为<br>
|
||||
content.value = articleDetail.value.content
|
||||
.replace(/\n/g, '<br>')
|
||||
|
@ -43,11 +42,12 @@ const articleDetailList = async () => {
|
|||
collect.value!.style.color = 'orange'
|
||||
thumbs.value!.style.color = 'rgb(240, 119, 117)'
|
||||
}
|
||||
console.log(articleDetail.value)
|
||||
|
||||
content.value = articleDetail.value.content
|
||||
.replace(/\n/g, '<br>')
|
||||
.replace(/\t/g, '  ')
|
||||
|
||||
console.log(articleDetail.value.doctorInfo.doctorName)
|
||||
show.value = true
|
||||
}
|
||||
const route = useRoute()
|
||||
onMounted(() => {
|
||||
|
@ -78,20 +78,30 @@ const collectFn = () => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div class="main">
|
||||
<van-loading
|
||||
v-if="!show"
|
||||
style="
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
"
|
||||
size="60"
|
||||
/>
|
||||
<div class="main" v-else>
|
||||
<Header>文章详情</Header>
|
||||
<div class="articleDoctor">
|
||||
<img :src="articleDetail.doctorUrl || '/doctor.png'" alt="" />
|
||||
<img :src="articleDetail.doctorUrl" alt="" />
|
||||
<div class="articleDoctorInfo">
|
||||
<div>
|
||||
<span style="font-size: 18px">{{ doctorInfo.doctorName }}</span>
|
||||
<span style="font-size: 14px; margin-left: 8px">{{
|
||||
doctorInfo.level
|
||||
}}</span>
|
||||
<span style="font-size: 18px">{{ articleDetail.doctorInfo.doctorName }}</span>
|
||||
<span style="font-size: 14px; margin-left: 8px">
|
||||
{{ articleDetail.doctorInfo.level }}
|
||||
</span>
|
||||
</div>
|
||||
<span style="color: #555; font-size: 14px">{{
|
||||
doctorInfo.source
|
||||
}}</span>
|
||||
<span style="color: #555; font-size: 14px">
|
||||
{{ articleDetail.doctorInfo.source }}
|
||||
</span>
|
||||
</div>
|
||||
<el-button
|
||||
type="primary"
|
||||
|
@ -116,6 +126,7 @@ const collectFn = () => {
|
|||
</div>
|
||||
</div>
|
||||
<p class="articleTitle" v-html="content"></p>
|
||||
<img :src="articleDetail.url" alt="" />
|
||||
</div>
|
||||
<div class="articleOperation">
|
||||
<span ref="thumbs" @click="thumbsFn">
|
||||
|
@ -131,6 +142,14 @@ const collectFn = () => {
|
|||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.van-loading {
|
||||
z-index: 999;
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #F5F6F7;
|
||||
}
|
||||
|
||||
.main {
|
||||
min-width: calc(100vw - 60px);
|
||||
margin-bottom: 60px;
|
||||
|
@ -187,6 +206,12 @@ const collectFn = () => {
|
|||
color: #0379ff;
|
||||
background-color: #d9e9ff;
|
||||
}
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 16px 16px 0 16px;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
|
||||
.articleOperation {
|
||||
|
|
|
@ -3,78 +3,12 @@ import { onMounted, ref, onUnmounted } from 'vue'
|
|||
import { getArticle, getArticleByType } from '@/api/article'
|
||||
|
||||
const articlelist = ref([
|
||||
{
|
||||
id: 1,
|
||||
url: '',
|
||||
titleBig: '空腹能不能吃汤圆?无糖汤圆不“胖人”吗?',
|
||||
titleSmall: '元宵吃汤圆,有什么禁忌吗?',
|
||||
number: 8088,
|
||||
publishTime: '2024-10-31'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
url: '',
|
||||
titleBig: '空腹能不能吃汤圆?无糖汤圆不“胖人”吗?',
|
||||
titleSmall: '元宵吃汤圆,有什么禁忌吗?',
|
||||
number: 8088,
|
||||
publishTime: '2024-10-31'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
url: '',
|
||||
titleBig: '空腹能不能吃汤圆?无糖汤圆不“胖人”吗?',
|
||||
titleSmall: '元宵吃汤圆,有什么禁忌吗?',
|
||||
number: 8088,
|
||||
publishTime: '2024-10-31'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
url: '',
|
||||
titleBig: '空腹能不能吃汤圆?无糖汤圆不“胖人”吗?',
|
||||
titleSmall: '元宵吃汤圆,有什么禁忌吗?',
|
||||
number: 8088,
|
||||
publishTime: '2024-10-31'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
url: '',
|
||||
titleBig: '空腹能不能吃汤圆?无糖汤圆不“胖人”吗?',
|
||||
titleSmall: '元宵吃汤圆,有什么禁忌吗?',
|
||||
number: 8088,
|
||||
publishTime: '2024-10-31'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
url: '',
|
||||
titleBig: '空腹能不能吃汤圆?无糖汤圆不“胖人”吗?',
|
||||
titleSmall: '元宵吃汤圆,有什么禁忌吗?',
|
||||
number: 8088,
|
||||
publishTime: '2024-10-31'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
url: '',
|
||||
titleBig: '空腹能不能吃汤圆?无糖汤圆不“胖人”吗?',
|
||||
titleSmall: '元宵吃汤圆,有什么禁忌吗?',
|
||||
number: 8088,
|
||||
publishTime: '2024-10-31'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
url: '',
|
||||
titleBig: '空腹能不能吃汤圆?无糖汤圆不“胖人”吗?',
|
||||
titleSmall: '元宵吃汤圆,有什么禁忌吗?',
|
||||
number: 8088,
|
||||
publishTime: '2024-10-31'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
url: '',
|
||||
titleBig: '空腹能不能吃汤圆?无糖汤圆不“胖人”吗?',
|
||||
titleSmall: '元宵吃汤圆,有什么禁忌吗?',
|
||||
number: 8088,
|
||||
publishTime: '2024-10-31'
|
||||
}
|
||||
{ id: 1 },
|
||||
{ id: 2 },
|
||||
{ id: 3 },
|
||||
{ id: 4 },
|
||||
{ id: 5 },
|
||||
{ id: 6 }
|
||||
])
|
||||
const show = ref(true)
|
||||
|
||||
|
@ -92,7 +26,6 @@ onMounted(async () => {
|
|||
|
||||
// 导航栏
|
||||
const active = ref('1')
|
||||
active.value = sessionStorage.getItem('active') || '1'
|
||||
const nav = ref([
|
||||
{
|
||||
value: '全部',
|
||||
|
@ -118,9 +51,16 @@ const nav = ref([
|
|||
|
||||
// 切换导航栏
|
||||
const activeList = async (page: string) => {
|
||||
articlelist.value = [
|
||||
{ id: 1 },
|
||||
{ id: 2 },
|
||||
{ id: 3 },
|
||||
{ id: 4 },
|
||||
{ id: 5 },
|
||||
{ id: 6 }
|
||||
]
|
||||
show.value = true
|
||||
active.value = page
|
||||
sessionStorage.setItem('active', active.value.toString())
|
||||
if (page === '1') {
|
||||
const res = await getArticle()
|
||||
articlelist.value = res.data.data
|
||||
|
@ -137,6 +77,7 @@ const noSearch = ref([])
|
|||
const searchList = (val: any) => {
|
||||
noSearch.value = val
|
||||
articlelist.value = val
|
||||
active.value = '1'
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
|
@ -147,7 +88,6 @@ onUnmounted(() => {
|
|||
<template>
|
||||
<div class="main">
|
||||
<Search :search="'文章标题'" v-model:value="search" @search="searchList" />
|
||||
|
||||
<van-tabs
|
||||
line-width="30px"
|
||||
v-model:active="active"
|
||||
|
@ -168,7 +108,7 @@ onUnmounted(() => {
|
|||
<van-empty
|
||||
image="search"
|
||||
description="搜索内容为空"
|
||||
v-if="noSearch.length !== 0"
|
||||
v-if="noSearch.length === 0 && articlelist.length === 0"
|
||||
/>
|
||||
|
||||
<li v-else v-for="item in articlelist" :key="item.id">
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import type { AppointmentDetailType } from '@/types/index'
|
||||
import { getAppointmentOrder } from '@/api/appointment'
|
||||
|
||||
const appointmentOrder = ref({
|
||||
|
@ -16,14 +15,17 @@ const appointmentOrder = ref({
|
|||
memo: '携带上次心电图检查结果及近期血液检测报告。'
|
||||
})
|
||||
|
||||
const show = ref(false)
|
||||
const route = useRoute()
|
||||
const params = ref<AppointmentDetailType>({
|
||||
const params = ref<any>({
|
||||
id: +route.query.doctorId!,
|
||||
date: route.query.date as string
|
||||
date: route.query.date as string,
|
||||
name: route.query.name as string
|
||||
})
|
||||
const getAppointmentOrderInfo = async () => {
|
||||
const res = await getAppointmentOrder(params.value)
|
||||
appointmentOrder.value = res.data.data
|
||||
show.value = true
|
||||
}
|
||||
onMounted(() => {
|
||||
getAppointmentOrderInfo()
|
||||
|
@ -31,17 +33,31 @@ onMounted(() => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div class="main">
|
||||
<van-loading
|
||||
v-if="!show"
|
||||
style="
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
"
|
||||
size="60"
|
||||
/>
|
||||
<div class="main" v-else>
|
||||
<Header>我的预约订单</Header>
|
||||
<div class="content">
|
||||
<AppointmentTitle>
|
||||
<template #title>预约信息</template>
|
||||
<template #content>
|
||||
<div class="info">
|
||||
<span>医院:{{appointmentOrder.hospitalName}}</span>
|
||||
<span style="margin: 8px 0">科室:{{appointmentOrder.department}}</span>
|
||||
<span style="margin-bottom: 8px">医生:{{appointmentOrder.doctorName}}</span>
|
||||
<span>时间:{{params.date}}</span>
|
||||
<span>医院:{{ appointmentOrder.hospitalName }}</span>
|
||||
<span style="margin: 8px 0"
|
||||
>科室:{{ appointmentOrder.department }}</span
|
||||
>
|
||||
<span style="margin-bottom: 8px"
|
||||
>医生:{{ appointmentOrder.doctorName }}</span
|
||||
>
|
||||
<span>时间:{{ params.date }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</AppointmentTitle>
|
||||
|
@ -49,8 +65,10 @@ onMounted(() => {
|
|||
<template #title>就诊人信息</template>
|
||||
<template #content>
|
||||
<div class="info">
|
||||
<span style="margin-bottom: 8px">姓名:{{appointmentOrder.name}}</span>
|
||||
<span>联系方式:{{appointmentOrder.phone}}</span>
|
||||
<span style="margin-bottom: 8px"
|
||||
>姓名:{{ appointmentOrder.name }}</span
|
||||
>
|
||||
<span>联系方式:{{ appointmentOrder.phone }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</AppointmentTitle>
|
||||
|
@ -64,8 +82,10 @@ onMounted(() => {
|
|||
<template #title>其他信息</template>
|
||||
<template #content>
|
||||
<div class="info">
|
||||
<span>医院电话:{{appointmentOrder.hospitalPhone}}</span>
|
||||
<span style="margin: 8px 0">医院地址:{{appointmentOrder.address}}</span>
|
||||
<span>医院电话:{{ appointmentOrder.hospitalPhone }}</span>
|
||||
<span style="margin: 8px 0"
|
||||
>医院地址:{{ appointmentOrder.address }}</span
|
||||
>
|
||||
<div class="price">
|
||||
<span>挂号费</span>
|
||||
<span style="color: #ff5c83">¥{{ appointmentOrder.fees }}</span>
|
||||
|
@ -78,6 +98,14 @@ onMounted(() => {
|
|||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.van-loading {
|
||||
z-index: 999;
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #f5f6f7;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 90%;
|
||||
overflow-y: auto;
|
||||
|
|
|
@ -5,124 +5,22 @@ import MyAppointment from './components/MyAppointment.vue'
|
|||
import { getAllDiagnosis } from '@/api/myself'
|
||||
|
||||
const appointmentList = ref([
|
||||
{
|
||||
id: 1,
|
||||
doctorName: '王强',
|
||||
url: '',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
department: '内分泌科',
|
||||
state: 2,
|
||||
briefly:
|
||||
'内分泌专家,甲状腺综合手术治疗专家,省级内分泌科委员会委员,独创中医疗法,内分泌科疑难杂症综合治疗',
|
||||
fees: '52',
|
||||
appointmentDate: '2024-12-22',
|
||||
name: '李四'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
doctorName: '王强',
|
||||
url: '',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
department: '内分泌科',
|
||||
state: 1,
|
||||
briefly:
|
||||
'内分泌专家,甲状腺综合手术治疗专家,省级内分泌科委员会委员,独创中医疗法,内分泌科疑难杂症综合治疗',
|
||||
fees: '55',
|
||||
appointmentDate: '2024-12-23',
|
||||
name: '李四'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
doctorName: '王强',
|
||||
url: '',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
department: '内分泌科',
|
||||
state: 2,
|
||||
briefly:
|
||||
'内分泌专家,甲状腺综合手术治疗专家,省级内分泌科委员会委员,独创中医疗法,内分泌科疑难杂症综合治疗',
|
||||
fees: '52',
|
||||
appointmentDate: '2024-12-22',
|
||||
name: '李四'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
doctorName: '王强',
|
||||
url: '',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
department: '内分泌科',
|
||||
state: 1,
|
||||
briefly:
|
||||
'内分泌专家,甲状腺综合手术治疗专家,省级内分泌科委员会委员,独创中医疗法,内分泌科疑难杂症综合治疗',
|
||||
fees: '55',
|
||||
appointmentDate: '2024-12-23',
|
||||
name: '李四'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
doctorName: '王强',
|
||||
url: '',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
department: '内分泌科',
|
||||
state: 2,
|
||||
briefly:
|
||||
'内分泌专家,甲状腺综合手术治疗专家,省级内分泌科委员会委员,独创中医疗法,内分泌科疑难杂症综合治疗',
|
||||
fees: '52',
|
||||
appointmentDate: '2024-12-22',
|
||||
name: '李四'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
doctorName: '王强',
|
||||
url: '',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
department: '内分泌科',
|
||||
state: 1,
|
||||
briefly:
|
||||
'内分泌专家,甲状腺综合手术治疗专家,省级内分泌科委员会委员,独创中医疗法,内分泌科疑难杂症综合治疗',
|
||||
fees: '55',
|
||||
appointmentDate: '2024-12-23',
|
||||
name: '李四'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
doctorName: '王强',
|
||||
url: '',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
department: '内分泌科',
|
||||
state: 2,
|
||||
briefly:
|
||||
'内分泌专家,甲状腺综合手术治疗专家,省级内分泌科委员会委员,独创中医疗法,内分泌科疑难杂症综合治疗',
|
||||
fees: '52',
|
||||
appointmentDate: '2024-12-22',
|
||||
name: '李四'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
doctorName: '王强',
|
||||
url: '',
|
||||
level: '主任医师',
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
department: '内分泌科',
|
||||
state: 1,
|
||||
briefly:
|
||||
'内分泌专家,甲状腺综合手术治疗专家,省级内分泌科委员会委员,独创中医疗法,内分泌科疑难杂症综合治疗',
|
||||
fees: '55',
|
||||
appointmentDate: '2024-12-23',
|
||||
name: '李四'
|
||||
},
|
||||
{ id: 1, state: 1 },
|
||||
{ id: 2, state: 2 },
|
||||
{ id: 3, state: 3 },
|
||||
{ id: 4, state: 4 },
|
||||
{ id: 5, state: 5 },
|
||||
{ id: 6, state: 6 }
|
||||
])
|
||||
|
||||
// 获取预约列表
|
||||
const show = ref(false)
|
||||
const getAppointmentList = async () => {
|
||||
const res = await getAllDiagnosis()
|
||||
appointmentList.value = res.data.data
|
||||
console.log(res.data.data)
|
||||
|
||||
show.value = true
|
||||
}
|
||||
onMounted(() => {
|
||||
getAppointmentList()
|
||||
|
@ -146,6 +44,7 @@ const toAppointmentOrder = (item: any) => {
|
|||
query: {
|
||||
doctorId: item.id,
|
||||
date: item.appointmentDate,
|
||||
name: item.name
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -161,7 +60,17 @@ onBeforeRouteLeave((to, from, next) => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div class="main">
|
||||
<van-loading
|
||||
v-if="!show"
|
||||
style="
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
"
|
||||
size="60"
|
||||
/>
|
||||
<div class="main" v-else>
|
||||
<Header>我的预约</Header>
|
||||
<van-tabs
|
||||
swipeable
|
||||
|
@ -189,7 +98,7 @@ onBeforeRouteLeave((to, from, next) => {
|
|||
description="无预约记录"
|
||||
v-if="appointmentList.length === 0"
|
||||
/>
|
||||
<li v-else v-for="item in appointmentList" :key="item.id">
|
||||
<li v-else v-for="(item, index) in appointmentList" :key="index">
|
||||
<MyAppointment
|
||||
v-if="item.state === 2"
|
||||
:info="item"
|
||||
|
@ -206,7 +115,7 @@ onBeforeRouteLeave((to, from, next) => {
|
|||
description="无预约记录"
|
||||
v-if="appointmentList.length === 0"
|
||||
/>
|
||||
<li v-else v-for="item in appointmentList" :key="item.id">
|
||||
<li v-else v-for="(item, index) in appointmentList" :key="index">
|
||||
<MyAppointment
|
||||
v-if="item.state === 1"
|
||||
:info="item"
|
||||
|
@ -219,6 +128,14 @@ onBeforeRouteLeave((to, from, next) => {
|
|||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.van-loading {
|
||||
z-index: 999;
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #f5f6f7;
|
||||
}
|
||||
|
||||
:deep(.van-tabs) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
|
@ -1,39 +1,30 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import avatar from '@/assets/default.png'
|
||||
|
||||
const prop = defineProps(['info'])
|
||||
const info = prop.info
|
||||
const src = ref(info.url)
|
||||
const state = ref()
|
||||
if (info.state == 1) {
|
||||
state.value = '待就诊'
|
||||
} else {
|
||||
state.value = '已就诊'
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="main1">
|
||||
<div class="info">
|
||||
<img :src="src || avatar" alt="logo" />
|
||||
<img :src="prop.info.url" alt="logo" />
|
||||
<div class="content">
|
||||
<div>
|
||||
<span style="font-size: 20px">{{ info.doctorName }}</span>
|
||||
<span style="margin-left: 6px">{{ info.level }}</span>
|
||||
<span class="status">{{ state }}</span>
|
||||
<span style="font-size: 20px">{{ prop.info.doctorName }}</span>
|
||||
<span style="margin-left: 6px">{{ prop.info.level }}</span>
|
||||
<span class="status">{{
|
||||
prop.info.state == 2 ? '待就诊' : '已就诊'
|
||||
}}</span>
|
||||
</div>
|
||||
<div style="color: #777; font-size: 14px">
|
||||
<span style="margin-right: 8px">{{ info.hospitalName }}</span>
|
||||
<span>{{ info.department }}</span>
|
||||
<div style="display: flex; color: #777; font-size: 14px">
|
||||
<span class="c1">{{ prop.info.hospitalName }}</span>
|
||||
<span>{{ prop.info.department }}</span>
|
||||
</div>
|
||||
<div class="c3">擅长:{{ info.briefly }}</div>
|
||||
<div class="c3">擅长:{{ prop.info.briefly }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="time">
|
||||
<span class="name"><span>就诊人:</span>{{ info.name }}</span>
|
||||
<span>{{ info.appointmentDate }}</span>
|
||||
<span class="price">¥{{ info.fees }}</span>
|
||||
<span class="name"><span>就诊人:</span>{{ prop.info.name }}</span>
|
||||
<span>{{ prop.info.appointmentDate }}</span>
|
||||
<span class="price">¥{{ prop.info.fees }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -78,6 +69,13 @@ if (info.state == 1) {
|
|||
right: 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
.c1 {
|
||||
margin-right: 8px;
|
||||
max-width: 150px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.c3 {
|
||||
color: #aaa;
|
||||
font-size: 14px;
|
||||
|
|
|
@ -11,160 +11,28 @@ import {
|
|||
} from '@/api/myself'
|
||||
|
||||
const hospitalList = ref([
|
||||
{
|
||||
id: 1,
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
address: '湖南省长沙市开福区湘雅路87号',
|
||||
url: '',
|
||||
level: null,
|
||||
appointmentNumber: null,
|
||||
labelList: ['综合医院', '公立医院', '医保定点']
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
address: '湖南省长沙市开福区湘雅路87号',
|
||||
url: '',
|
||||
level: null,
|
||||
appointmentNumber: null,
|
||||
labelList: ['综合医院', '公立医院', '医保定点']
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
hospitalName: '中南大学湘雅医院',
|
||||
address: '湖南省长沙市开福区湘雅路87号',
|
||||
url: '',
|
||||
level: null,
|
||||
appointmentNumber: null,
|
||||
labelList: ['综合医院', '公立医院', '医保定点']
|
||||
}
|
||||
{ id: 1 },
|
||||
{ id: 2 },
|
||||
{ id: 3 },
|
||||
{ id: 4 },
|
||||
{ id: 5 },
|
||||
{ id: 6 }
|
||||
])
|
||||
const doctorList = ref([
|
||||
{
|
||||
"id": 2,
|
||||
"doctorName": "刘帅",
|
||||
"level": "主任医师",
|
||||
"hospitalName": "中南大学湘雅医院",
|
||||
"name": "呼吸内科",
|
||||
"briefly": "著名呼吸病学专家,中华医学会呼吸系病分会第四届主任委员,擅长各种呼吸系统疾病,特别是弥漫性间质性肺病及呼吸生理心理疾病",
|
||||
"url": "",
|
||||
"appointmentNumber": null,
|
||||
"expertise": "呼吸内科专家"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"doctorName": "刘帅",
|
||||
"level": "主任医师",
|
||||
"hospitalName": "中南大学湘雅医院",
|
||||
"name": "呼吸内科",
|
||||
"briefly": "著名呼吸病学专家,中华医学会呼吸系病分会第四届主任委员,擅长各种呼吸系统疾病,特别是弥漫性间质性肺病及呼吸生理心理疾病",
|
||||
"url": "",
|
||||
"appointmentNumber": null,
|
||||
"expertise": "呼吸内科专家"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"doctorName": "刘帅",
|
||||
"level": "主任医师",
|
||||
"hospitalName": "中南大学湘雅医院",
|
||||
"name": "呼吸内科",
|
||||
"briefly": "著名呼吸病学专家,中华医学会呼吸系病分会第四届主任委员,擅长各种呼吸系统疾病,特别是弥漫性间质性肺病及呼吸生理心理疾病",
|
||||
"url": "",
|
||||
"appointmentNumber": null,
|
||||
"expertise": "呼吸内科专家"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"doctorName": "刘帅",
|
||||
"level": "主任医师",
|
||||
"hospitalName": "中南大学湘雅医院",
|
||||
"name": "呼吸内科",
|
||||
"briefly": "著名呼吸病学专家,中华医学会呼吸系病分会第四届主任委员,擅长各种呼吸系统疾病,特别是弥漫性间质性肺病及呼吸生理心理疾病",
|
||||
"url": "",
|
||||
"appointmentNumber": null,
|
||||
"expertise": "呼吸内科专家"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"doctorName": "刘帅",
|
||||
"level": "主任医师",
|
||||
"hospitalName": "中南大学湘雅医院",
|
||||
"name": "呼吸内科",
|
||||
"briefly": "著名呼吸病学专家,中华医学会呼吸系病分会第四届主任委员,擅长各种呼吸系统疾病,特别是弥漫性间质性肺病及呼吸生理心理疾病",
|
||||
"url": "",
|
||||
"appointmentNumber": null,
|
||||
"expertise": "呼吸内科专家"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"doctorName": "刘帅",
|
||||
"level": "主任医师",
|
||||
"hospitalName": "中南大学湘雅医院",
|
||||
"name": "呼吸内科",
|
||||
"briefly": "著名呼吸病学专家,中华医学会呼吸系病分会第四届主任委员,擅长各种呼吸系统疾病,特别是弥漫性间质性肺病及呼吸生理心理疾病",
|
||||
"url": "",
|
||||
"appointmentNumber": null,
|
||||
"expertise": "呼吸内科专家"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"doctorName": "刘帅",
|
||||
"level": "主任医师",
|
||||
"hospitalName": "中南大学湘雅医院",
|
||||
"name": "呼吸内科",
|
||||
"briefly": "著名呼吸病学专家,中华医学会呼吸系病分会第四届主任委员,擅长各种呼吸系统疾病,特别是弥漫性间质性肺病及呼吸生理心理疾病",
|
||||
"url": "",
|
||||
"appointmentNumber": null,
|
||||
"expertise": "呼吸内科专家"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"doctorName": "刘帅",
|
||||
"level": "主任医师",
|
||||
"hospitalName": "中南大学湘雅医院",
|
||||
"name": "呼吸内科",
|
||||
"briefly": "著名呼吸病学专家,中华医学会呼吸系病分会第四届主任委员,擅长各种呼吸系统疾病,特别是弥漫性间质性肺病及呼吸生理心理疾病",
|
||||
"url": "",
|
||||
"appointmentNumber": null,
|
||||
"expertise": "呼吸内科专家"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"doctorName": "刘帅",
|
||||
"level": "主任医师",
|
||||
"hospitalName": "中南大学湘雅医院",
|
||||
"name": "呼吸内科",
|
||||
"briefly": "著名呼吸病学专家,中华医学会呼吸系病分会第四届主任委员,擅长各种呼吸系统疾病,特别是弥漫性间质性肺病及呼吸生理心理疾病",
|
||||
"url": "",
|
||||
"appointmentNumber": null,
|
||||
"expertise": "呼吸内科专家"
|
||||
},
|
||||
{ id: 1 },
|
||||
{ id: 2 },
|
||||
{ id: 3 },
|
||||
{ id: 4 },
|
||||
{ id: 5 },
|
||||
{ id: 6 }
|
||||
])
|
||||
const articleList = ref([
|
||||
{
|
||||
"id": 1,
|
||||
"url": "",
|
||||
"titleBig": "空腹能不能吃汤圆?无糖汤圆不“胖人”吗?",
|
||||
"titleSmall": "元宵吃汤圆,有什么禁忌吗?",
|
||||
"number": 8088,
|
||||
"publishTime": "2024-10-31"
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"url": "",
|
||||
"titleBig": "空腹能不能吃汤圆?无糖汤圆不“胖人”吗?",
|
||||
"titleSmall": "元宵吃汤圆,有什么禁忌吗?",
|
||||
"number": 8088,
|
||||
"publishTime": "2024-10-31"
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"url": "",
|
||||
"titleBig": "空腹能不能吃汤圆?无糖汤圆不“胖人”吗?",
|
||||
"titleSmall": "元宵吃汤圆,有什么禁忌吗?",
|
||||
"number": 8088,
|
||||
"publishTime": "2024-10-31"
|
||||
},
|
||||
{ id: 1 },
|
||||
{ id: 2 },
|
||||
{ id: 3 },
|
||||
{ id: 4 },
|
||||
{ id: 5 },
|
||||
{ id: 6 }
|
||||
])
|
||||
const show = ref(true)
|
||||
|
||||
|
@ -174,12 +42,12 @@ const getCollectorList = async () => {
|
|||
const res = await getHospitalCollector()
|
||||
const res1 = await getDoctorCollector()
|
||||
const res2 = await getArticleCollector()
|
||||
|
||||
|
||||
hospitalList.value = res.data.data
|
||||
doctorList.value = res1.data.data
|
||||
articleList.value = res2.data.data
|
||||
}
|
||||
onMounted(async() => {
|
||||
onMounted(async () => {
|
||||
await getCollectorList()
|
||||
show.value = false
|
||||
})
|
||||
|
@ -189,7 +57,7 @@ const active = ref('1')
|
|||
active.value = localStorage.getItem('active') || '1'
|
||||
|
||||
// 切换导航栏
|
||||
const activeList = () => {
|
||||
const activeList = () => {
|
||||
localStorage.setItem('active', active.value.toString())
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { ref } from 'vue'
|
||||
import { useAiDetailStore } from '@/stores'
|
||||
|
||||
const aiDetailStore = useAiDetailStore()
|
||||
const consultDetailList = ref([]) as any
|
||||
|
||||
consultDetailList.value = aiDetailStore.detail
|
||||
console.log(consultDetailList.value);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
@ -4,95 +4,30 @@ import { useRouter } from 'vue-router'
|
|||
import { useAiDetailStore } from '@/stores'
|
||||
import { getMyConsultation } from '@/api/myself'
|
||||
|
||||
const data = ref([
|
||||
{
|
||||
id: 3,
|
||||
problem: '你好',
|
||||
answer: '你好!有什么我能为你效劳的吗?',
|
||||
number: 3,
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
problem: '我有点头痛',
|
||||
answer:
|
||||
'很遗憾听到你不舒服。如果您的头痛情况不严重,可能是因为压力或疲劳引起的。建议您先休息一下,喝些水,尝试放松一下身心。如果头痛持续或者加剧,建议您咨询医生或专业医疗人员的意见,以便获得适当的治疗。需要我帮您查找附近的医院或诊所吗?',
|
||||
number: 3,
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
problem: '有什么药可以缓解吗',
|
||||
answer:
|
||||
'对于轻微的头痛,一些非处方药物可能会有所帮助。以下是一些常见的缓解头痛的药物:\n\n1. **布洛芬(Ibuprofen)**:这是一种非甾体抗炎药(NSAID),可以帮助减轻疼痛和炎症。\n2. **对乙酰氨基酚(Paracetamol / Acetaminophen)**:这种药物常用于缓解轻至中度疼痛和退烧。\n3. **阿司匹林(Aspirin)**:虽然主要用于心脏健康,但小剂量的阿司匹林也可以缓解某些类型的头痛。\n\n在使用这些药物之前,请注意以下几点:\n- **阅读说明书**:确保按照推荐剂量服用。\n- **过敏反应**:如果你对任何成分过敏,请不要使用。\n- **健康状况**:如果你有胃溃疡、出血倾向或其他健康问题,应谨慎使用。\n- **咨询医生**:特别是孕妇、哺乳期妇女或正在服用其他药物的人群,在使用前最好咨询医生。\n\n如果头痛非常严重或伴有其他症状(如恶心、呕吐、视觉问题等),请尽快就医。希望你早日康复!如果需要进一步的帮助,请随时告诉我。',
|
||||
number: 3
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
problem: '最近有点腰酸背痛',
|
||||
answer:
|
||||
'腰酸背痛是一个常见的问题,可能由多种因素引起,比如长时间保持不良姿势、肌肉劳损、过度使用某些肌肉群或身体条件不佳等。以下是一些建议,帮助缓解腰酸背痛的问题:\n\n1. **改善坐姿**:确保你的椅子和桌子高度合适,尽量保持脊柱的自然曲线。每工作45分钟至1小时后站起来活动一下。\n\n2. **适量运动**:定期进行一些有助于加强背部肌肉的运动,如游泳、瑜伽或普拉提等。这些运动能够增强核心肌群,从而更好地支撑脊椎。\n\n3. **热敷或冷敷**:对于急性疼痛,可以尝试先用冰袋冷敷以减少炎症,之后再使用热水袋或暖宝宝热敷来促进血液循环。\n\n4. **睡眠质量**:选择一个适合自己的硬度适中的床垫,并尝试侧睡时在两腿之间放置枕头以维持脊椎的正常曲度。\n\n5. **体重管理**:过重会增加脊椎负担,因此通过健康饮食与规律锻炼控制好体重也很重要。\n\n如果上述方法不能有效缓解症状,或者疼痛持续加重,请及时就医咨询专业医生的意见,以便获得针对性的治疗方案。请记住,在采取任何新的锻炼计划之前,最好先咨询医生或物理治疗师,确保所选活动适合您的具体情况。',
|
||||
number: 4
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
problem: '喉咙不太舒服',
|
||||
answer:
|
||||
'如果您的喉咙不太舒服,这里有一些建议可能对您有所帮助:\n\n1. 多喝水:保持身体水分可以帮助缓解喉咙干燥和不适。\n2. 喉咙糖或含片:这些可以提供一些舒缓作用,并帮助保持喉咙湿润。\n3. 温水盐漱口:将半茶匙的盐溶解在一杯温水中,用此水漱口可以帮助减轻喉咙疼痛和炎症。\n4. 避免刺激性食物和饮料:如辛辣食品、酒精和咖啡等可能会刺激喉咙的食物和饮料应该避免。\n5. 休息:给身体充足的休息时间有助于加速恢复。\n\n然而,如果症状持续数天或者伴有高烧、呼吸困难或其他严重症状,请及时就医。',
|
||||
number: 5
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
problem: '我有点头痛',
|
||||
answer:
|
||||
'我很抱歉听到你不舒服。以下是一些建议,但请记得,如果症状持续或加重,最好咨询医生或医疗专业人员:\n\n1. 休息:找一个安静的地方放松一下。有时候,头痛是因为压力过大或疲劳引起的。\n\n2. 水分:确保你喝足够的水,有时候脱水也会引起头痛。\n\n3. 避免过度用眼:如果你长时间盯着屏幕工作,试着让眼睛休息一下。\n\n4. 轻微的头部按摩:轻轻按摩头部和颈部有时可以缓解紧张性头痛。\n\n5. 适当运动:轻度到中度的运动可以帮助减轻压力,从而减轻头痛。\n\n6. 避免过度用药:除非是医生建议,否则不要频繁使用止痛药。\n\n希望你能尽快感觉好起来!',
|
||||
number: 6
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
problem: '肚子疼是怎么回事',
|
||||
answer:
|
||||
'肚子疼是一个常见的症状,可能由多种原因引起。以下是一些可能导致肚子疼的原因:\n\n1. 消化不良:饮食不当、过量进食或食用油腻食物可能导致消化系统不适。\n\n2. 胃肠道感染:细菌、病毒或其他微生物感染胃肠道,引发腹泻、呕吐等症状。\n\n3. 肠胃炎:肠胃炎是指胃黏膜和小肠黏膜发炎,常常伴随腹痛、恶心、呕吐等症状。\n\n4. 肠道气体:肠道气体积聚可能导致腹部胀气和疼痛。\n\n5. 便秘:排便不畅可能导致腹部不适和疼痛。\n\n6. 肠易激综合症:肠易激综合症是一种功能性肠道疾病,常表现为腹痛、腹泻或便秘等症状。\n\n7. 腹部器官疾病:如胆囊炎、胆石症、胰腺炎等疾病也可能导致腹痛。\n\n如果您的肚子疼持续时间较长或伴有其他严重症状(如高烧、剧烈呕吐、血便等),建议尽快就医以获得正确的诊断和治疗。',
|
||||
number: 6
|
||||
},
|
||||
{
|
||||
id: 32,
|
||||
problem: '你好',
|
||||
answer: '你好!有什么我能为你效劳的吗?',
|
||||
number: 7
|
||||
},
|
||||
{
|
||||
id: 34,
|
||||
problem: '最近有点腹泻,怎么回事',
|
||||
answer:
|
||||
'腹泻可能由多种原因引起,包括但不限于食物中毒、病毒感染(如诺如病毒)、细菌感染、过敏反应或消化系统疾病等。如果你近期有食用不洁食物或者有旅行史,这些都可能是导致腹泻的因素。\n\n以下是一些常见的处理方法:\n1. **保持水分**:腹泻会导致脱水,因此补充足够的水分非常重要。可以饮用清水、口服补液盐溶液等。\n2. **饮食调整**:避免油腻、辛辣和难以消化的食物,建议食用易消化的食物如米粥、馒头等。\n3. **休息**:适当休息有助于身体恢复。\n4. **观察症状**:如果腹泻持续时间较长(成人超过3天,儿童超过24小时),伴有高烧、剧烈腹痛、血便等症状时,应及时就医。\n\n请根据自身情况判断是否需要寻求医生的帮助。如果症状严重或持续,请尽快联系医疗专业人士进行诊断与治疗。希望你早日康复!',
|
||||
number: 7
|
||||
},
|
||||
{
|
||||
id: 38,
|
||||
problem: '你好',
|
||||
answer: '你好!有什么可以帮助你的吗?',
|
||||
number: 6
|
||||
}
|
||||
])
|
||||
|
||||
// 根据number字段进行分组
|
||||
const consultList = ref([]) as any
|
||||
const groupedData = data.value.reduce((acc: any, item: any) => {
|
||||
const number = item.number
|
||||
if (!acc[number]) {
|
||||
acc[number] = [item]
|
||||
} else {
|
||||
acc[number].push(item)
|
||||
}
|
||||
return acc
|
||||
}, {})
|
||||
consultList.value = Object.values(groupedData).map((group: any) => {
|
||||
return group.sort((a: any, b: any) => a.id - b.id)
|
||||
})
|
||||
const data = ref([])
|
||||
|
||||
// 获取我的咨询列表
|
||||
const show = ref(false)
|
||||
const consultList = ref([]) as any
|
||||
const getMyConsultList = async () => {
|
||||
const res = await getMyConsultation()
|
||||
consultList.value = res.data.data
|
||||
data.value = res.data.data
|
||||
|
||||
// 根据number字段进行分组
|
||||
const groupedData = data.value.reduce((acc: any, item: any) => {
|
||||
const number = item.number
|
||||
if (!acc[number]) {
|
||||
acc[number] = [item]
|
||||
} else {
|
||||
acc[number].push(item)
|
||||
}
|
||||
return acc
|
||||
}, {})
|
||||
consultList.value = Object.values(groupedData).map((group: any) => {
|
||||
return group.sort((a: any, b: any) => a.id - b.id)
|
||||
})
|
||||
|
||||
show.value = true
|
||||
}
|
||||
onMounted(() => {
|
||||
getMyConsultList()
|
||||
|
@ -102,16 +37,23 @@ onMounted(() => {
|
|||
const router = useRouter()
|
||||
const aiDetail = useAiDetailStore()
|
||||
const toConsultDetail = (id: number) => {
|
||||
router.push('/ConsultDetail/' + (id+1))
|
||||
aiDetail.setDetail(consultList.value[id])
|
||||
console.log(consultList.value[id]);
|
||||
|
||||
router.push('/ConsultDetail/' + (id + 1))
|
||||
aiDetail.setDetail(consultList.value[id])
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="main">
|
||||
<van-loading
|
||||
v-if="!show"
|
||||
style="
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
"
|
||||
size="60"
|
||||
/>
|
||||
<div class="main" v-else>
|
||||
<Header>我的咨询</Header>
|
||||
<van-empty description="空空如也" v-if="consultList.length === 0">
|
||||
<van-button
|
||||
|
@ -137,6 +79,14 @@ console.log(consultList.value[id]);
|
|||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.van-loading {
|
||||
z-index: 999;
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #F5F6F7;
|
||||
}
|
||||
|
||||
.van-list {
|
||||
width: 85vw;
|
||||
scrollbar-width: none;
|
||||
|
|
|
@ -2,17 +2,10 @@
|
|||
import { onMounted, ref } from 'vue'
|
||||
import avatar from '@/assets/default.png'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { getUserInfoApi } from '@/api/login'
|
||||
import { useUserStore } from '@/stores';
|
||||
|
||||
// 获取用户信息
|
||||
const userInfo = ref({})
|
||||
const getUserInfo = async () => {
|
||||
const res = await getUserInfoApi()
|
||||
userInfo.value = res.data.data
|
||||
}
|
||||
onMounted(() => {
|
||||
getUserInfo()
|
||||
})
|
||||
const userInfo = useUserStore().userInfo
|
||||
|
||||
// 跳转到我的预约-全部页面
|
||||
const toAppointment = (num) => {
|
||||
|
|
Loading…
Reference in New Issue