This commit is contained in:
ChenQiuYu 2025-05-22 15:16:23 +08:00
parent df82f8d26d
commit bd542a6cb4
1 changed files with 29 additions and 17 deletions

View File

@ -10,9 +10,10 @@
<div class="left-bottom"> <div class="left-bottom">
<Panel title="医生列表"> <Panel title="医生列表">
<div class="panel-content" style="display: flex;flex-direction: column;height: 100%"> <div class="panel-content" style="display: flex;flex-direction: column;height: 100%">
<div class="search"> <div class="search" style="display: flex">
<el-input style="height: 100%" v-model="keyword" placeholder="搜索医生姓名" <el-input style="height: 100%" v-model="keyword" placeholder="搜索医生姓名"
@keydown.enter="initDoctor" :prefix-icon="Search"></el-input> @keydown.enter="initDoctor" :prefix-icon="Search"></el-input>
<span class="default-btn" @click="allList">全部</span>
</div> </div>
<div class="content_list" style="padding: 0 24px"> <div class="content_list" style="padding: 0 24px">
<ul class="role_list"> <ul class="role_list">
@ -22,9 +23,9 @@
<span class="name">{{ item.name }}</span> <span class="name">{{ item.name }}</span>
<span class="section_name">{{ item.sectionNames }}</span> <span class="section_name">{{ item.sectionNames }}</span>
<span v-if="dateName" class="btn" @click="openDialog(item,index)" <span v-if="dateName" class="btn" @click="openDialog(item,index)"
@mouseover="isShowNum = index" @mouseover="isShow = index"
@mouseleave="isShowNum = -1"> @mouseleave="isShow = -1">
<img v-if="isShowNum==index" src="/static/images/registration/3-active.png" <img v-if="isShow==index" src="/static/images/registration/3-active.png"
style="width: 15px;height: 14px;margin-right: 8px" alt=""> style="width: 15px;height: 14px;margin-right: 8px" alt="">
<img v-else src="/static/images/registration/3.png" alt="" <img v-else src="/static/images/registration/3.png" alt=""
style="width: 15px;height: 14px;margin-right: 8px"> style="width: 15px;height: 14px;margin-right: 8px">
@ -102,8 +103,7 @@ const getActionText = (date: string) => {
selectedDate.getFullYear() < today.getFullYear() || selectedDate.getFullYear() < today.getFullYear() ||
selectedDate.getMonth() < today.getMonth() || selectedDate.getMonth() < today.getMonth() ||
selectedDate.getDate() < today.getDate() selectedDate.getDate() < today.getDate()
) ) {
{
return '' return ''
} else if ( } else if (
selectedDate.getFullYear() === today.getFullYear() && selectedDate.getFullYear() === today.getFullYear() &&
@ -122,6 +122,7 @@ onMounted(() => {
selectedDate.value = [getPrevious30Days(), getToday().end] selectedDate.value = [getPrevious30Days(), getToday().end]
initDoctor() initDoctor()
getPatientList() getPatientList()
doctorId.value = null
}) })
const keyword = ref<any>(''); const keyword = ref<any>('');
@ -144,13 +145,13 @@ const handleDateChange = (date: any[]) => {
getPatientList() getPatientList()
} }
const getPatientList = () => { const getPatientList = () => {
isShowNum.value = -1
id.value = null id.value = null
post('registration/list', { post('registration/list', {
page: page.value, page: page.value,
size: size.value, size: size.value,
startDate: selectedDate.value[0], startDate: selectedDate.value[0],
endDate: selectedDate.value[1] endDate: selectedDate.value[1],
doctorId: doctorId.value,
}).then((res: any) => { }).then((res: any) => {
patientList.value = res.list patientList.value = res.list
total.value = res.total_count total.value = res.total_count
@ -170,9 +171,10 @@ const rowClick = (row: any) => {
editRef.value?.init(row.organizationDoctorId, row.id) editRef.value?.init(row.organizationDoctorId, row.id)
}) })
} }
const isShow = ref(-1)
const editRef = ref<any>('') const editRef = ref<any>('')
const openDialog = (item: any, index: any) => { const openDialog = (item: any, index: any) => {
isShowNum.value = index isShow.value = index
nextTick(() => { nextTick(() => {
editRef.value?.init(item.id) editRef.value?.init(item.id)
}) })
@ -185,7 +187,16 @@ const reset = () => {
keyword.value = '' keyword.value = ''
getPatientList() getPatientList()
} }
const changeRole=(item: any) => { const doctorId = ref(null)
const changeRole = (item: any, index: any) => {
isShowNum.value = index
doctorId.value = item.id
getPatientList()
}
const allList = () => {
selectedDate.value = [getPrevious30Days(), getToday().end]
isShowNum.value = -1
doctorId.value = null
getPatientList() getPatientList()
} }
</script> </script>
@ -242,6 +253,7 @@ const changeRole=(item: any) => {
padding: 0 10px; padding: 0 10px;
border-radius: 5px; border-radius: 5px;
align-items: center; align-items: center;
cursor: pointer;
&:hover { &:hover {
background: rgba(#4D6DE4, 0.3); background: rgba(#4D6DE4, 0.3);
@ -283,6 +295,7 @@ const changeRole=(item: any) => {
&:hover { &:hover {
background: #4D6DE4; background: #4D6DE4;
color: #FFF; color: #FFF;
border: 1px solid #fff;
} }
} }
@ -290,18 +303,14 @@ const changeRole=(item: any) => {
} }
.active { .active {
background: #4D6DE4; background: #4D6DE4 !important;
.name { .name {
color: #fff; color: #fff !important;
} }
.section_name { .section_name {
color: #fff; color: #fff !important;
}
.btn {
color: #fff;
} }
} }
} }
@ -364,5 +373,8 @@ const changeRole=(item: any) => {
} }
} }
.default-btn {
margin-left: 24px;
}
</style> </style>