dev
This commit is contained in:
parent
46447bf75d
commit
5caab6347d
|
|
@ -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
|
||||
if (e) {
|
||||
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">
|
||||
|
|
|
|||
|
|
@ -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,21 +98,25 @@ const changePage = (page: any) => {
|
|||
page.value = page
|
||||
getPatientList()
|
||||
}
|
||||
const id = ref('')
|
||||
const doctorId= ref<any>('')
|
||||
const id = ref<any>('')
|
||||
const doctorId = ref<any>('')
|
||||
const rowClick = (row: any) => {
|
||||
id.value = row.id
|
||||
nextTick(()=>{
|
||||
nextTick(() => {
|
||||
editRef.value?.init()
|
||||
})
|
||||
}
|
||||
const editRef = ref<any>('')
|
||||
const openDialog = (item: any) => {
|
||||
doctorId.value = item.id
|
||||
nextTick(()=>{
|
||||
nextTick(() => {
|
||||
editRef.value?.init()
|
||||
})
|
||||
}
|
||||
const close=()=>{
|
||||
id.value = null
|
||||
getPatientList()
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.container-wrapper {
|
||||
|
|
|
|||
Loading…
Reference in New Issue