门诊挂号-》【档案】档管理的【新增患者】-患者界面(图1)的内容要与图2的内容一致(门诊挂号-》【新建】-》新增患者界面)

This commit is contained in:
2025-11-06 13:34:59 +08:00
parent 9ce967002a
commit 88a516d1be

View File

@@ -1,5 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 患者添加对话框组件 -->
<patient-add-dialog ref="patientAddRef" @submit="handlePatientAdded" />
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch"> <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
<el-form-item label="病人名称" prop="searchKey"> <el-form-item label="病人名称" prop="searchKey">
<el-input <el-input
@@ -356,14 +358,17 @@
<script setup name="patientManagement"> <script setup name="patientManagement">
import pcas from 'china-division/dist/pcas-code.json'; import pcas from 'china-division/dist/pcas-code.json';
import { ref, computed } from 'vue'; import { ref, computed, onMounted, toRefs, getCurrentInstance, reactive, watch } from 'vue';
import { addPatient, listPatient, updatePatient, lists } from './component/api'; import { addPatient, listPatient, updatePatient, lists } from './component/api';
import PatientAddDialog from '@/views/charge/outpatientregistration/components/patientAddDialog';
const showSearch = ref(true); const showSearch = ref(true);
const open = ref(false); const open = ref(false);
const title = ref(''); const title = ref('');
const total = ref(); const total = ref();
const patientList = ref([]); const patientList = ref([]);
// 患者添加对话框组件的引用
const patientAddRef = ref(null);
const maritalstatusList = ref([]); //婚姻 const maritalstatusList = ref([]); //婚姻
const occupationtypeList = ref([]); //职业 const occupationtypeList = ref([]); //职业
const administrativegenderList = ref([]); //性别 const administrativegenderList = ref([]); //性别
@@ -407,7 +412,7 @@ const data = reactive({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
searchKey: undefined, searchKey: undefined,
name: undefined, name: undefined
}, },
rules: { rules: {
name: [{ required: true, message: '姓名不能为空', trigger: 'blur' }], name: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
@@ -522,6 +527,12 @@ function reset() {
}; };
proxy.resetForm('patientRef'); proxy.resetForm('patientRef');
} }
/** 处理患者添加后的回调 */
function handlePatientAdded(patientData) {
// 患者添加成功后刷新列表
getList();
}
/** 搜索按钮操作 */ /** 搜索按钮操作 */
function handleQuery() { function handleQuery() {
queryParams.value.pageNo = 1; queryParams.value.pageNo = 1;
@@ -529,7 +540,6 @@ function handleQuery() {
dateRange.value && dateRange.value.length == 2 ? dateRange.value[0] : ''; dateRange.value && dateRange.value.length == 2 ? dateRange.value[0] : '';
queryParams.value.createTimeETime = queryParams.value.createTimeETime =
dateRange.value && dateRange.value.length == 2 ? dateRange.value[1] : ''; dateRange.value && dateRange.value.length == 2 ? dateRange.value[1] : '';
getList();
} }
/** 重置按钮操作 */ /** 重置按钮操作 */
function resetQuery() { function resetQuery() {
@@ -539,11 +549,7 @@ function resetQuery() {
} }
/** 新增按钮操作 */ /** 新增按钮操作 */
function handleAdd() { function handleAdd() {
reset(); patientAddRef.value.show(); // 使用与门诊挂号一致的方式显示新增患者组件
selectedOptions.value = [];
isViewMode.value = false;
open.value = true;
title.value = '新增患者';
} }
//查看按钮 //查看按钮
function handleSee(row) { function handleSee(row) {
@@ -651,7 +657,10 @@ function submitForm() {
} }
}); });
} }
onMounted(() => {
getList(); getList();
});
</script> </script>
<style> <style>