dev
This commit is contained in:
parent
46447bf75d
commit
5caab6347d
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<Mask :is-show="isShow" width="800" :height="500" title="挂号" @close="close" :show-footer="true">
|
<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
|
<el-form
|
||||||
:model="edit_data"
|
:model="edit_data"
|
||||||
label-width="auto"
|
label-width="auto"
|
||||||
|
|
@ -97,10 +97,11 @@
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<el-dropdown placement="top-start">
|
<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>
|
<template #dropdown>
|
||||||
<CardDefault v-model="socialCard" @socialCardUpdate="socialCardUpdate"
|
<CardDefault v-model="socialCard" @socialCardUpdate="socialCardUpdate"
|
||||||
@close="edit_data={}"/>
|
@close="deleteCard"/>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<div class="bottom-right">
|
<div class="bottom-right">
|
||||||
|
|
@ -129,14 +130,14 @@ interface Doctor {
|
||||||
|
|
||||||
// 定义组件Props
|
// 定义组件Props
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
id: {
|
||||||
|
type: Number,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
doctorList: {
|
doctorList: {
|
||||||
type: Array as () => Doctor[], // 明确声明医生列表的类型
|
type: Array as () => Doctor[], // 明确声明医生列表的类型
|
||||||
default: () => []
|
default: () => []
|
||||||
},
|
},
|
||||||
id: {
|
|
||||||
type: [String, Number],
|
|
||||||
default: ''
|
|
||||||
},
|
|
||||||
doctorId: {
|
doctorId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
|
|
@ -180,7 +181,6 @@ const close = () => {
|
||||||
edit_data.value = {}
|
edit_data.value = {}
|
||||||
emit('close')
|
emit('close')
|
||||||
}
|
}
|
||||||
const id = ref<any>(props.id)
|
|
||||||
const form = ref()
|
const form = ref()
|
||||||
const save = () => {
|
const save = () => {
|
||||||
let data = {
|
let data = {
|
||||||
|
|
@ -224,9 +224,11 @@ const socialCard: any = ref({
|
||||||
payInfo: {},
|
payInfo: {},
|
||||||
lastUse: null
|
lastUse: null
|
||||||
})
|
})
|
||||||
|
const id = ref<any>(null)
|
||||||
const init = () => {
|
const init = () => {
|
||||||
isShow.value = true
|
isShow.value = true
|
||||||
edit_data.value.organizationDoctorId = props.doctorId
|
edit_data.value.organizationDoctorId = props.doctorId
|
||||||
|
id.value = props.id
|
||||||
if (id.value) {
|
if (id.value) {
|
||||||
post('registration/getById', {id: id.value}).then((res: any) => {
|
post('registration/getById', {id: id.value}).then((res: any) => {
|
||||||
edit_data.value = res
|
edit_data.value = res
|
||||||
|
|
@ -234,13 +236,9 @@ const init = () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const isShowCard = ref<any>(false)
|
const isShowCard = ref<any>(false)
|
||||||
const openCard = () => {
|
|
||||||
isShowCard.value = true
|
|
||||||
}
|
|
||||||
const socialCardUpdate = (e: any) => {
|
const socialCardUpdate = (e: any) => {
|
||||||
isShowCard.value = true
|
|
||||||
if (e) {
|
if (e) {
|
||||||
isShowCard.value = false
|
isShowCard.value = true
|
||||||
edit_data.value = e.data.baseinfo
|
edit_data.value = e.data.baseinfo
|
||||||
edit_data.value.gender = e.data.baseinfo.gend
|
edit_data.value.gender = e.data.baseinfo.gend
|
||||||
edit_data.value.name = e.data.baseinfo.psn_name
|
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})
|
defineExpose({init})
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
@ -64,8 +64,6 @@ import {formatDate, getToday, formatDateArray} from "@/utils/dateUtils.ts";
|
||||||
const isShowNum = ref(0)
|
const isShowNum = ref(0)
|
||||||
const roleList = ref<any>([])
|
const roleList = ref<any>([])
|
||||||
|
|
||||||
const isShow = ref(false)
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
initDoctor()
|
initDoctor()
|
||||||
getPatientList()
|
getPatientList()
|
||||||
|
|
@ -82,6 +80,7 @@ const handleDateChange = (date: any[]) => {
|
||||||
getPatientList()
|
getPatientList()
|
||||||
}
|
}
|
||||||
const getPatientList = () => {
|
const getPatientList = () => {
|
||||||
|
id.value = null
|
||||||
post('registration/list', {
|
post('registration/list', {
|
||||||
page: page.value,
|
page: page.value,
|
||||||
size: size.value,
|
size: size.value,
|
||||||
|
|
@ -99,7 +98,7 @@ const changePage = (page: any) => {
|
||||||
page.value = page
|
page.value = page
|
||||||
getPatientList()
|
getPatientList()
|
||||||
}
|
}
|
||||||
const id = ref('')
|
const id = ref<any>('')
|
||||||
const doctorId = ref<any>('')
|
const doctorId = ref<any>('')
|
||||||
const rowClick = (row: any) => {
|
const rowClick = (row: any) => {
|
||||||
id.value = row.id
|
id.value = row.id
|
||||||
|
|
@ -114,6 +113,10 @@ const openDialog = (item: any) => {
|
||||||
editRef.value?.init()
|
editRef.value?.init()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const close=()=>{
|
||||||
|
id.value = null
|
||||||
|
getPatientList()
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.container-wrapper {
|
.container-wrapper {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue