解决合并冲突

This commit is contained in:
2025-12-10 14:20:24 +08:00
parent e1385cb3e6
commit 18f6a845e6
804 changed files with 61881 additions and 13577 deletions

View File

@@ -26,7 +26,7 @@
<el-date-picker
v-model="registerTime"
@change="handleTimeChange"
type="daterange"
type="date"
style="width: 100%; margin-bottom: 10px"
:clearable="false"
placeholder="挂号时间"
@@ -78,8 +78,8 @@
</div>
<div class="disabled-wrapper" style="width: 85%; border: 1px solid #eee; position: relative">
<div style="padding: 10px; border: 1px solid #eee; height: 50px; border-left: 0">
<el-descriptions :column="4">
<el-descriptions-item label="患者信息:" width="150">
<el-descriptions :column="5" class="patient-info-descriptions">
<el-descriptions-item label="患者信息:" width="420">
{{
Object.keys(patientInfo).length !== 0
? patientInfo.patientName +
@@ -88,13 +88,47 @@
' / ' +
patientInfo.genderEnum_enumText +
' / ' +
patientInfo.contractName
patientInfo.contractName +
'/' +
patientInfo.phone
: '-'
}}
</el-descriptions-item>
<el-descriptions-item label="挂号时间:" width="150">
<el-descriptions-item label="挂号时间:" width="300">
{{ Object.keys(patientInfo).length !== 0 ? formatDate(patientInfo.registerTime) : '-' }}
</el-descriptions-item>
<el-descriptions-item label="医生:" width="250">
{{ userStore.nickName }}
</el-descriptions-item>
<el-descriptions-item label="" width="300">
<el-button type="primary" plain @click.stop="handleFinish(patientInfo.encounterId)">
完诊
</el-button>
<el-button type="primary" plain @click.stop="handleLeave(patientInfo.encounterId)">
暂离
</el-button>
<el-button type="primary" plain @click.stop="handleRefund(patientInfo.encounterId)">
退费
</el-button>
<el-button
type="primary"
plain
@click.stop="getEnPrescription(patientInfo.encounterId)"
>
处方单
</el-button>
<el-button
type="primary"
plain
@click.stop="
() => {
openDialog = true;
}
"
>
办理住院
</el-button>
</el-descriptions-item>
<el-descriptions-item label="医生:" width="150">{{
userStore.name
}}</el-descriptions-item>
@@ -145,6 +179,13 @@
v-model="activeTab"
@tab-change="handleClick(activeTab)"
>
<el-tab-pane label="门诊病历" name="hospitalizationEmr">
<hospitalizationEmr
:patientInfo="patientInfo"
:activeTab="activeTab"
@emrSaved="handleEmrSaved"
/>
</el-tab-pane>
<el-tab-pane label="病历" name="emr">
<Emr
:patientInfo="patientInfo"
@@ -174,14 +215,16 @@
:patientInfo="patientInfo"
ref="prescriptionRef"
:activeTab="activeTab"
:outpatientEmrSaved="outpatientEmrSaved"
/>
</el-tab-pane>
<el-tab-pane label="中医" name="tcm">
<tcmAdvice :patientInfo="patientInfo" ref="tcmRef" />
</el-tab-pane>
<el-tab-pane label="电子处方" name="eprescription">
<!-- <el-tab-pane label="电子处方" name="eprescription">
<eprescriptionlist :patientInfo="patientInfo" ref="eprescriptionRef" />
</el-tab-pane>
-->
</el-tabs>
<div class="overlay" v-if="disabled"></div>
</div>
@@ -193,6 +236,7 @@
:open="openRefundListDialog"
:encounterId="currentEncounterId"
@close="openRefundListDialog = false"
@refresh="() => prescriptionRef.getListInfo()"
/>
<HospitalizationDialog
:open="openDialog"
@@ -208,6 +252,7 @@
</div>
</template>
<script setup>
import hospitalizationEmr from './components/hospitalizationEmr/index.vue';
import Emr from './components/emr/emr.vue';
import {
getList,
@@ -222,13 +267,14 @@ import RefundListDialog from './components/prescription/refundListDialog.vue';
import PatientList from './components/patientList.vue';
import Diagnosis from './components/diagnosis/diagnosis.vue';
import PrescriptionInfo from './components/prescription/prescriptionInfo.vue';
import eprescriptionlist from './components/eprescriptionlist.vue';
// import eprescriptionlist from './components/eprescriptionlist.vue';
import HospitalizationDialog from './components/hospitalizationDialog.vue';
import tcmAdvice from './components/tcm/tcmAdvice.vue';
import { formatDate, formatDateStr } from '@/utils/index';
import useUserStore from '@/store/modules/user';
import { nextTick } from 'vue';
import { onBeforeRouteLeave } from 'vue-router';
import { updatePatientInfo } from './components/store/patient.js';
// // 监听路由离开事件
// onBeforeRouteLeave((to, from, next) => {
@@ -257,15 +303,18 @@ const openRefundListDialog = ref(false);
const openDialog = ref(false);
const openPrescriptionDialog = ref(false);
const saveStatus = ref(false);
const outpatientEmrSaved = ref(false); // 门诊病历保存状态
const currentEncounterId = ref('');
const emits = defineEmits(['click']);
const activeTab = ref('emr');
// const activeTab = ref('emr');
const activeTab = ref('hospitalizationEmr');
const patientList = ref([]);
const patientInfo = ref({});
const visitTypeDisabled = ref(false);
const prescriptionInfo = ref([]);
const registerTime = ref([formatDate(new Date()), formatDate(new Date())]);
const registerTime = ref(formatDate(new Date()));
const patientDrawerRef = ref();
const prescriptionRef = ref();
const tcmRef = ref();
@@ -279,12 +328,41 @@ const firstVisitDate = ref('');
const disabled = computed(() => {
return Object.keys(patientInfo.value).length === 0;
});
const shortcuts = [
{
text: '今天',
value: new Date(),
},
{
text: '昨天',
value: () => {
const date = new Date();
date.setDate(date.getDate() - 1);
return date;
},
},
{
text: '三天内',
value: () => {
const date = new Date();
date.setDate(date.getDate() - 3);
return date;
},
},
{
text: '一周内',
value: () => {
const date = new Date();
date.setDate(date.getDate() - 7);
return date;
},
},
];
const eprescriptionRef = ref();
// const eprescriptionRef = ref();
onMounted(() => {
getWaitPatient();
});
getPatientList();
// 获取现诊患者列表
function getPatientList() {
@@ -373,9 +451,9 @@ function handleClick(tab) {
case 'tcm':
tcmRef.value.getDiagnosisInfo();
break;
case 'eprescription':
eprescriptionRef.value.getList();
break;
// case 'eprescription':
// eprescriptionRef.value.getList();
// break;
}
// if (tab != 'emr') {
// if (!saveStatus.value) {
@@ -393,6 +471,11 @@ function handleClick(tab) {
// 查看本次就诊处方单从医嘱Tab页获取已开立的处方单信息
function getEnPrescription(encounterId) {
getEnPrescriptionInfo({ encounterId: encounterId }).then((res) => {
console.log('处方单 res', res);
prescriptionInfo.value = res.data.records;
openPrescriptionDialog.value = true;
});
// 检查是否有选中的患者
if (!patientInfo.value || !patientInfo.value.encounterId) {
proxy.$modal.msgWarning('请先选择患者');
@@ -470,6 +553,9 @@ function handleCardClick(item, index) {
patient.active = patient.encounterId === item.encounterId;
});
patientInfo.value = item;
// 将患者信息保存到store中供hospitalizationEmr组件使用
updatePatientInfo(item);
activeTab.value = 'hospitalizationEmr';
// 优先使用数据库中保存的初复诊值
if (item.visitType) {
@@ -489,7 +575,7 @@ function handleCardClick(item, index) {
prescriptionRef.value.getListInfo();
tcmRef.value.getListInfo();
diagnosisRef.value.getList();
eprescriptionRef.value.getList();
// eprescriptionRef.value.getList();
emrRef.value.getDetail(item.encounterId);
setTimeout(() => {
loading.value = false;
@@ -520,8 +606,8 @@ function handleFinish(encounterId) {
}
function handleTimeChange(value) {
queryParams.value.registerTimeSTime = value[0] + ' 00:00:00';
queryParams.value.registerTimeETime = value[1] + ' 23:59:59';
queryParams.value.registerTimeSTime = value + ' 00:00:00';
queryParams.value.registerTimeETime = value + ' 23:59:59';
getPatientList();
}
@@ -534,6 +620,11 @@ function handleReceive(row) {
getWaitPatient();
}
// 处理门诊病历保存成功事件
function handleEmrSaved(isSaved) {
outpatientEmrSaved.value = isSaved;
}
function openDrawer() {
drawer.value = true;
}
@@ -564,6 +655,16 @@ function handleCancelEncounter(){
</script>
<style lang="scss" scoped>
// 患者信息
.patient-info-descriptions {
:deep(.el-descriptions__label) {
font-size: 16px !important;
}
:deep(.el-descriptions__content) {
font-size: 16px !important;
}
}
.patient-card {
width: 100%;
overflow: hidden;