Bug #722 — 住院病历页面打不开(前端)
This commit is contained in:
@@ -136,11 +136,11 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {nextTick, onMounted, ref, watch} from 'vue';
|
||||
import {getCurrentInstance, nextTick, onMounted, reactive, ref, watch} from 'vue';
|
||||
import {ElMessage} from 'element-plus';
|
||||
import {getTreeList} from '@/views/basicmanage/caseTemplates/api';
|
||||
import {addTemplate, getRecordByEncounterIdList, recordPrint, saveOrUpdateRecord} from './api';
|
||||
import {patientInfo} from '../store/patient.js';
|
||||
import {patientInfo as storePatientInfo} from '../store/patient.js';
|
||||
import dayjs from 'dayjs';
|
||||
// 打印工具
|
||||
import {PRINT_TEMPLATE, simplePrint} from '@/utils/printUtils.js';
|
||||
@@ -301,15 +301,15 @@ const handleSubmitOk = async (data) => {
|
||||
if (currentOperate.value === 'add') {
|
||||
//
|
||||
try {
|
||||
if (!patientInfo.value?.encounterId || !patientInfo.value?.patientId) {
|
||||
if (!storePatientInfo.value?.encounterId || !storePatientInfo.value?.patientId) {
|
||||
ElMessage.error('请先选择患者!');
|
||||
return;
|
||||
}
|
||||
editForm.value.definitionId = currentSelectTemplate.value.id;
|
||||
editForm.value.definitionBusNo = currentSelectTemplate.value.busNo;
|
||||
editForm.value.contentJson = JSON.stringify(data);
|
||||
editForm.value.encounterId = patientInfo.value.encounterId;
|
||||
editForm.value.patientId = patientInfo.value.patientId;
|
||||
editForm.value.encounterId = storePatientInfo.value.encounterId;
|
||||
editForm.value.patientId = storePatientInfo.value.patientId;
|
||||
editForm.value.recordTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||
// 提交病历
|
||||
await saveOrUpdateRecord(editForm.value);
|
||||
@@ -465,15 +465,15 @@ const selectedHistoryRecordId = ref('');
|
||||
|
||||
// 加载最新的病历数据并回显
|
||||
const loadLatestMedicalRecord = async () => {
|
||||
if (!patientInfo.value.encounterId || !currentSelectTemplate.value.id) return;
|
||||
if (!storePatientInfo.value.encounterId || !currentSelectTemplate.value.id) return;
|
||||
|
||||
loading.value = true;
|
||||
try {
|
||||
// 获取患者的历史病历记录
|
||||
const res = await getRecordByEncounterIdList({
|
||||
isPage: 0,
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
patientId: patientInfo.value.patientId,
|
||||
encounterId: storePatientInfo.value.encounterId,
|
||||
patientId: storePatientInfo.value.patientId,
|
||||
definitionId: currentSelectTemplate.value.id,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user