This commit is contained in:
ChenQiuYu 2025-04-29 13:44:33 +08:00
parent 46447bf75d
commit 5caab6347d
2 changed files with 26 additions and 21 deletions

View File

@ -1,7 +1,7 @@
<template>
<Mask :is-show="isShow" width="800" :height="500" title="挂号" @close="close" :show-footer="true">
<div style="padding:0 24px 24px" v-loading="isShowCard">
<div style="padding:0 24px 24px">
<el-form
:model="edit_data"
label-width="auto"
@ -97,10 +97,11 @@
<template #footer>
<div class="bottom">
<el-dropdown placement="top-start">
<el-button type="primary">读卡</el-button>
<el-button type="primary" v-if="!isShowCard">读卡</el-button>
<el-button text v-else>已读卡</el-button>
<template #dropdown>
<CardDefault v-model="socialCard" @socialCardUpdate="socialCardUpdate"
@close="edit_data={}"/>
@close="deleteCard"/>
</template>
</el-dropdown>
<div class="bottom-right">
@ -129,14 +130,14 @@ interface Doctor {
// Props
const props = defineProps({
id: {
type: Number,
default: ''
},
doctorList: {
type: Array as () => Doctor[], //
default: () => []
},
id: {
type: [String, Number],
default: ''
},
doctorId: {
type: String,
default: ''
@ -180,7 +181,6 @@ const close = () => {
edit_data.value = {}
emit('close')
}
const id = ref<any>(props.id)
const form = ref()
const save = () => {
let data = {
@ -224,9 +224,11 @@ const socialCard: any = ref({
payInfo: {},
lastUse: null
})
const id = ref<any>(null)
const init = () => {
isShow.value = true
edit_data.value.organizationDoctorId = props.doctorId
id.value = props.id
if (id.value) {
post('registration/getById', {id: id.value}).then((res: any) => {
edit_data.value = res
@ -234,13 +236,9 @@ const init = () => {
}
}
const isShowCard = ref<any>(false)
const openCard = () => {
isShowCard.value = true
}
const socialCardUpdate = (e: any) => {
isShowCard.value = true
if (e) {
isShowCard.value = false
isShowCard.value = true
edit_data.value = e.data.baseinfo
edit_data.value.gender = e.data.baseinfo.gend
edit_data.value.name = e.data.baseinfo.psn_name
@ -250,6 +248,10 @@ const socialCardUpdate = (e: any) => {
}
}
const deleteCard = () => {
isShowCard.value = false
edit_data.value = {}
}
defineExpose({init})
</script>
<style scoped lang="scss">

View File

@ -49,7 +49,7 @@
</div>
</div>
</div>
<Edit :id="id" ref="editRef" :doctor-id="doctorId" :doctorList="roleList" @close=" getPatientList"></Edit>
<Edit ref="editRef" :id="id" :doctor-id="doctorId" :doctorList="roleList" @close="getPatientList"></Edit>
</div>
</template>
<script setup lang="ts">
@ -64,8 +64,6 @@ import {formatDate, getToday, formatDateArray} from "@/utils/dateUtils.ts";
const isShowNum = ref(0)
const roleList = ref<any>([])
const isShow = ref(false)
onMounted(() => {
initDoctor()
getPatientList()
@ -82,6 +80,7 @@ const handleDateChange = (date: any[]) => {
getPatientList()
}
const getPatientList = () => {
id.value = null
post('registration/list', {
page: page.value,
size: size.value,
@ -99,7 +98,7 @@ const changePage = (page: any) => {
page.value = page
getPatientList()
}
const id = ref('')
const id = ref<any>('')
const doctorId = ref<any>('')
const rowClick = (row: any) => {
id.value = row.id
@ -114,6 +113,10 @@ const openDialog = (item: any) => {
editRef.value?.init()
})
}
const close=()=>{
id.value = null
getPatientList()
}
</script>
<style scoped lang="scss">
.container-wrapper {