提交merge1.3

This commit is contained in:
2025-12-27 15:30:25 +08:00
parent 8c607c8749
commit 088861f66e
1245 changed files with 220442 additions and 77616 deletions

View File

@@ -6,7 +6,7 @@
<el-form-item label="病人名称" prop="searchKey">
<el-input
v-model="queryParams.searchKey"
placeholder="请输入病人名称/缩写/病人ID"
placeholder="请输入病人名称/拼音码/病人ID"
clearable
style="width: 200px"
@keyup.enter="handleQuery"
@@ -30,13 +30,7 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
>新增患者</el-button
>
<el-button type="primary" plain icon="Plus" @click="handleAdd">新增患者</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@@ -51,7 +45,11 @@
label="婚姻状况"
width="180"
/><!--:formatter="formatMaritalStatus"-->
<el-table-column prop="nationalityCode" label="民族" width="180" />
<el-table-column prop="nationalityCode" label="民族" width="180">
<template #default="scope">
{{ nationalityDict(scope.row.nationalityCode) }}
</template>
</el-table-column>
<el-table-column prop="birthDate" label="生日" width="160" />
<el-table-column prop="phone" label="电话" width="140" />
<el-table-column prop="bloodAbo_enumText" label="血型ABO" width="140" />
@@ -73,20 +71,10 @@
class-name="small-padding fixed-width"
>
<template #default="scope">
<el-button
link
type="primary"
icon="Edit"
@click="handleUpdate(scope.row)"
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
>修改</el-button
>
<el-button
link
type="primary"
icon="View"
@click="handleSee(scope.row)"
>查看</el-button
>
<el-button link type="primary" icon="View" @click="handleSee(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
@@ -132,9 +120,15 @@
</el-radio-group>
</el-form-item>
</el-col>
<<<<<<< HEAD
<el-col :span="6">
<el-form-item label="" prop="tempFlag">
<el-radio-group v-model="form.tempFlag" :disabled="isViewMode" size="small">
=======
<el-col :span="7">
<el-form-item label="活动标识" prop="activeFlag">
<el-radio-group v-model="form.activeFlag" :disabled="isViewMode">
>>>>>>> v1.3
<el-radio v-for="item in tempFlagList" :key="item.value" :label="item.value">
{{ item.info }}
</el-radio>
@@ -147,7 +141,7 @@
<el-col :span="6">
<el-form-item label="证件类别" prop="typeCode">
<el-select
v-model="form.typeCode"
v-model="form.patientIdInfoList[0].typeCode"
placeholder="证件类别"
clearable
:disabled="isViewMode"
@@ -169,22 +163,33 @@
<el-input v-model="form.birthDate" v-show="false" />
</el-form-item>
</el-col>
<<<<<<< HEAD
<el-col :span="6">
=======
<el-col :span="8">
>>>>>>> v1.3
<el-form-item label="年龄" prop="age">
<el-input
v-model="form.age"
:disabled="isViewMode"
@input="(value) => (form.age = value.replace(/[^0-9]/g, ''))"
<<<<<<< HEAD
>
<template #suffix></template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="4">
=======
/>
</el-form-item>
</el-col>
<!-- <el-col :span="6">
>>>>>>> v1.3
<el-form-item label="国家编码" prop="countryCode">
<el-input v-model="form.countryCode" clearable :disabled="isViewMode" />
</el-form-item>
</el-col>
</el-col> -->
</el-row>
<el-row :gutter="10">
@@ -346,9 +351,13 @@
</div>
</template>
<script setup name="patientManagement">
<script setup name="patientManagement">
import pcas from 'china-division/dist/pcas-code.json';
<<<<<<< HEAD
import { ref, computed, onMounted, toRefs, getCurrentInstance, reactive, watch } from 'vue';
=======
import { ref, computed, nextTick } from 'vue';
>>>>>>> v1.3
import { addPatient, listPatient, updatePatient, lists } from './component/api';
import PatientAddDialog from '@/views/charge/outpatientregistration/components/patientAddDialog';
@@ -397,7 +406,14 @@ const {
const data = reactive({
isViewMode: false,
form: {},
form: {
activeFlag: 1,
patientIdInfoList: [
{
typeCode: undefined,
},
],
},
queryParams: {
pageNo: 1,
pageSize: 10,
@@ -419,22 +435,20 @@ watch(
const birthYear = parseInt(newIdCard.substring(6, 10));
const birthMonth = parseInt(newIdCard.substring(10, 12));
const birthDay = parseInt(newIdCard.substring(12, 14));
const today = new Date();
const currentYear = today.getFullYear();
const currentMonth = today.getMonth() + 1;
const currentDay = today.getDate();
let age = currentYear - birthYear;
// 如果当前月份小于出生月份或者月份相同但当前日期小于出生日期则年龄减1
if (
currentMonth < birthMonth ||
(currentMonth === birthMonth && currentDay < birthDay)
) {
if (currentMonth < birthMonth || (currentMonth === birthMonth && currentDay < birthDay)) {
age--;
}
console.log('22222222');
form.value.age = age;
}
}
@@ -467,6 +481,7 @@ const findNodeByCode = (data, code) => {
/** 查询患者列表 */
function getList() {
listPatient(queryParams.value).then((response) => {
<<<<<<< HEAD
// 适配门诊挂号接口返回的数据格式
// 不同的接口可能返回不同格式,这里做一个通用适配
if (response.data && Array.isArray(response.data)) {
@@ -500,6 +515,22 @@ function getList() {
tempFlagList.value = response.data.whetherStatus || [];
idTypeList.value = response.data.identityDocumentType || [];
}
=======
patientList.value = response.data.records;
total.value = response.data.total;
console.log('patientList======>', JSON.stringify(patientList.value));
});
lists().then((response) => {
console.log(response);
occupationtypeList.value = response.data.occupationType;
administrativegenderList.value = response.data.sex;
bloodtypeaboList.value = response.data.bloodTypeABO;
bloodtypearhList.value = response.data.bloodTypeRH;
familyrelationshiptypeList.value = response.data.familyRelationshipType;
maritalstatusList.value = response.data.maritalStatus;
tempFlagList.value = response.data.whetherStatus;
idTypeList.value = response.data.identityDocumentType;
>>>>>>> v1.3
});
}
@@ -516,7 +547,7 @@ function reset() {
phone: undefined,
prfsEnum: undefined,
address: undefined,
tempFlag: undefined,
activeFlag: undefined,
countryCode: undefined,
bloodRh: undefined,
bloodAbo: undefined,
@@ -533,6 +564,11 @@ function reset() {
maritalStatusEnum: undefined,
busNo: undefined,
organizationId: undefined,
patientIdInfoList: [
{
typeCode: undefined,
},
],
};
proxy.resetForm('patientRef');
}
@@ -564,29 +600,40 @@ function handleAdd() {
}
//查看按钮
function handleSee(row) {
isViewMode.value = true;
form.value = row;
open.value = true;
title.value = '查看患者';
reset();
nextTick(() => {
isViewMode.value = true;
form.value = row;
open.value = true;
title.value = '查看患者';
});
}
// 映射
const nationalityDict = (code) => {
const findObj = nationality_code.value.find((item) => item.value === code);
return findObj?.label;
};
/** 修改按钮操作 */
function handleUpdate(row) {
console.log('nationality_code=======>', JSON.stringify(nationality_code.value));
reset();
form.value = JSON.parse(JSON.stringify(row));
addressCom.value =
row.addressProvince + row.addressCity + row.addressDistrict + row.addressStreet + row.address;
const selectedOptions1 = ref([
row.addressProvince,
row.addressCity,
row.addressDistrict,
row.addressStreet,
]);
const codes = convertAddressToCodes(selectedOptions1.value);
selectedOptions.value = codes.filter((code) => code !== null);
isViewMode.value = false;
open.value = true;
title.value = '修改菜单';
nextTick(() => {
form.value = JSON.parse(JSON.stringify(row));
addressCom.value =
row.addressProvince + row.addressCity + row.addressDistrict + row.addressStreet + row.address;
const selectedOptions1 = ref([
row.addressProvince,
row.addressCity,
row.addressDistrict,
row.addressStreet,
]);
const codes = convertAddressToCodes(selectedOptions1.value);
selectedOptions.value = codes.filter((code) => code !== null);
isViewMode.value = false;
open.value = true;
title.value = '修改菜单';
});
}
const convertAddressToCodes = (selectedOptions1) => {
const [provinceName, cityName, areaName, streetName] = selectedOptions1;
@@ -629,6 +676,8 @@ function getAddress(form) {
}
/** 提交按钮 */
function submitForm() {
console.log('selectedOptions=====>', JSON.stringify(selectedOptions.value));
if (form.value.idCard) {
form.value.birthDate =
form.value.idCard.toString().substring(6, 10) +
@@ -659,6 +708,8 @@ function submitForm() {
});
} else {
form.value.address = getAddress(form);
console.log('params========>', form.value);
addPatient(form.value).then((response) => {
proxy.$modal.msgSuccess('新增成功');
open.value = false;
@@ -674,5 +725,4 @@ onMounted(() => {
});
</script>
<style>
</style>
<style></style>