提交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

@@ -1,23 +1,21 @@
<!--
* @Author: sjjh
* @Date: 2025-04-07 11:49:37
* @Description:
-->
<template>
<div class="inpatientDoctor-home-container">
<el-container>
<!-- 患者列表 -->
<el-aside minWidth="83px" :width="`${patientAside ? '254px' : '83px'}`">
<PatientList v-model:expand="patientAside" />
</el-aside>
<!-- main-->
<PatientList :selected-patient="patientInfo" :on-select="handleItemClick" />
<el-container class="inpatientDoctor-home-main">
<el-header height="auto"><inPatientBarDoctorFold /></el-header>
<el-main>
<el-tabs v-model="activeTabName" type="card" class="patient-tabs">
<el-tab-pane label="住院病历" name="inhospitalEmr">
<Emr ref="inhospitalEmrRef" />
</el-tab-pane>
<el-tab-pane label="诊断录入" name="diagnosis">
<Diagnose ref="diagnosisRef" :patientInfo="currentPatientInfo" />
</el-tab-pane>
<el-tab-pane label="临床医嘱" name="prescription">
<Advice ref="adviceRef" />
</el-tab-pane>
<<<<<<< HEAD
<el-tab-pane label="诊断录入" name="diagnosis">
<Diagnose ref="diagnosisRef" :patientInfo="patientInfo" />
</el-tab-pane>
@@ -25,21 +23,33 @@
<Emr ref="inhospitalEmrRef"/>
</el-tab-pane>
<el-tab-pane label="医技报告" name="fourth">Task</el-tab-pane>
=======
<!-- <el-tab-pane label="医技报告" name="fourth">Task</el-tab-pane> -->
>>>>>>> v1.3
<el-tab-pane label="检验申请" name="test">
<TestApplication />
<TestApplication ref="testApplicationRef" />
</el-tab-pane>
<el-tab-pane label="检查申请" name="examine">
<ExamineApplication />
<ExamineApplication ref="examineApplicationRef" />
</el-tab-pane>
<el-tab-pane label="手术申请" name="surgery">
<SurgeryApplication />
<SurgeryApplication ref="surgeryApplicationRef" />
</el-tab-pane>
<el-tab-pane label="输血申请" name="blood">
<BloodTtransfusionAapplication />
<BloodTtransfusionAapplication ref="bloodTtransfusionAapplicationRef" />
</el-tab-pane>
<<<<<<< HEAD
<el-tab-pane label="护理状态" name="nursing">
<NursingStatus />
</el-tab-pane>
=======
<el-tab-pane label="报告查询" name="report">
<ReportQuery />
</el-tab-pane>
<!-- <el-tab-pane label="护理状态" name="nursing">
<NursingStatus />
</el-tab-pane> -->
>>>>>>> v1.3
</el-tabs>
</el-main>
</el-container>
@@ -47,14 +57,32 @@
</div>
</template>
<script setup>
<<<<<<< HEAD
import { getCurrentInstance, onBeforeMount, onMounted, reactive, ref } from 'vue';
// const { proxy } = getCurrentInstance()
// const emits = defineEmits([])
// const props = defineProps({})
import Emr from './emr/index.vue';
import inPatientBarDoctorFold from '@/components/patientBar/inPatientBarDoctorFold.vue';
=======
>>>>>>> v1.3
import {
getCurrentInstance,
onBeforeMount,
onMounted,
reactive,
ref,
watch,
provide,
computed,
} from 'vue';
import Emr from './emr/index.vue';
import inPatientBarDoctorFold from '@/components/patientBar/inPatientBarDoctorFold.vue';
import PatientList from '@/components/PatientList/patient-list.vue';
import { patientInfo, updatePatientInfo } from './store/patient';
import { getPatientList } from './components/api';
import {
PatientList,
Advice,
Diagnose,
BloodTtransfusionAapplication,
@@ -62,18 +90,121 @@ import {
SurgeryApplication,
TestApplication,
NursingStatus,
<<<<<<< HEAD
=======
ReportQuery,
>>>>>>> v1.3
} from './index.js';
const state = reactive({});
onBeforeMount(() => {});
onMounted(() => {});
onMounted(() => {
// 如果 store 中已有患者信息,使用 store 中的
if (patientInfo.value?.encounterId) {
cardId.value = patientInfo.value.encounterId;
isFirstLoad.value = false;
}
queryPatientData();
getList();
});
defineExpose({ state });
const activeTabName = ref('prescription');
const activeTabName = ref('inhospitalEmr');
const diagnosisRef = ref();
const adviceRef = ref();
const patientAside = ref(true);
const patientInfo = ref({});
const currentPatientInfo = ref({});
const testApplicationRef = ref();
const examineApplicationRef = ref();
const surgeryApplicationRef = ref();
const bloodTtransfusionAapplicationRef = ref();
// 患者列表相关逻辑
const searchData = reactive({
keyword: '',
patientType: 1,
type: 1,
timeLimit: 3,
});
const cardId = ref('');
const cardAllData = ref([]);
const isFirstLoad = ref(true);
const filteredCardData = computed(() => {
return cardAllData.value;
});
const queryloading = ref(false);
const getList = () => {
queryloading.value = true;
getPatientList({ status: 5, searchKey: searchData.keyword })
.then((res) => {
cardAllData.value = res.data.records || [];
})
.finally(() => {
queryloading.value = false;
});
};
watch(
() => filteredCardData.value,
(newData) => {
// 如果有数据且当前没有选中患者,且是首次加载,默认选择第一条
if (
newData &&
newData.length > 0 &&
!cardId.value &&
isFirstLoad.value &&
!patientInfo.value?.encounterId
) {
const firstPatient = newData[0];
if (firstPatient?.encounterId) {
handleItemClick(firstPatient);
isFirstLoad.value = false;
}
}
},
{ immediate: true }
);
const handleItemClick = (node) => {
cardId.value = node.encounterId;
updatePatientInfo(node);
diagnosisRef.value?.getList();
adviceRef.value?.getListInfo();
adviceRef.value?.getDiagnosisInfo();
};
const handleSearch = (keyword) => {
searchData.keyword = keyword;
getList();
};
const queryPatientData = async () => {
if (queryloading.value) return;
try {
} catch (error) {
cardAllData.value = [];
} finally {
queryloading.value = false;
}
};
// 监听 tab 切换,刷新对应的列表
watch(activeTabName, (newTab) => {
if (newTab === 'test' && testApplicationRef.value?.refresh) {
testApplicationRef.value.refresh();
} else if (newTab === 'examine' && examineApplicationRef.value?.refresh) {
examineApplicationRef.value.refresh();
} else if (newTab === 'surgery' && surgeryApplicationRef.value?.refresh) {
surgeryApplicationRef.value.refresh();
} else if (newTab === 'blood' && bloodTtransfusionAapplicationRef.value?.refresh) {
bloodTtransfusionAapplicationRef.value.refresh();
}
});
provide('diagnosisInit', (value) => {
patientInfo.value = value;
currentPatientInfo.value = value;
diagnosisRef.value.getList();
});
provide('getAdviceList', (value) => {