门诊医生站-》开立诊断 页面调整

This commit is contained in:
itcast
2026-01-16 15:46:43 +08:00
parent 2b3add4808
commit be0514bc08
86 changed files with 2224 additions and 3929 deletions

View File

@@ -197,10 +197,7 @@ watch(
// 直接更新查询参数
queryParams.value.searchKey = newValue.searchKey || '';
// 更新categoryCode
queryParams.value.categoryCode = newValue.categoryCode || '';
// 处理类型筛选
if (newValue.adviceType !== undefined && newValue.adviceType !== null && newValue.adviceType !== '') {
// 单个类型
@@ -218,18 +215,8 @@ getList();
// 从priceList列表中获取价格
function getPriceFromInventory(row) {
if (row.priceList && row.priceList.length > 0) {
const price = row.priceList[0].price;
// 检查价格是否为有效数字
if (price !== undefined && price !== null && !isNaN(price) && isFinite(price)) {
return Number(price).toFixed(2) + ' 元';
}
// 如果价格无效,尝试从其他可能的字段获取价格
if (row.totalPrice !== undefined && row.totalPrice !== null && !isNaN(row.totalPrice) && isFinite(row.totalPrice)) {
return Number(row.totalPrice).toFixed(2) + ' 元';
}
if (row.price !== undefined && row.price !== null && !isNaN(row.price) && isFinite(row.price)) {
return Number(row.price).toFixed(2) + ' 元';
}
const price = row.priceList[0].price || 0;
return Number(price).toFixed(2) + ' 元';
}
return '-';
}

View File

@@ -808,17 +808,6 @@ export function getInspectionApplicationList(queryParams) {
});
}
/**
* 获取诊疗项目列表
*/
export function getDiagnosisTreatmentList(queryParams) {
return request({
url: '/data-dictionary/diagnosis-treatment/information-page',
method: 'get',
params: queryParams,
});
}
/**
* 保存检验申请单
*/

View File

@@ -2,7 +2,7 @@
<el-dialog
title="添加中医诊断"
v-model="props.openAddDiagnosisDialog"
width="1300px"
width="1500px"
append-to-body
destroy-on-close
@open="handleOpen"
@@ -92,7 +92,6 @@ import {
getTcmSyndrome,
saveTcmDiagnosis,
updateTcmDiagnosis,
getTcmDiagnosis,
} from '@/views/doctorstation/components/api';
const props = defineProps({
@@ -121,144 +120,141 @@ const { proxy } = getCurrentInstance();
const emit = defineEmits(['close']);
function handleOpen() {
// 获取诊断列表
getTcmCondition().then((res) => {
conditionList.value = res.data.records;
});
// 清空数据
tcmDiagonsisSaveList.value = [];
tcmDiagonsisList.value = [];
syndromeSelected.value = true; // 设置为true允许添加新的诊断
// 如果是修改模式,加载传入的诊断数据
if (props.updateZy.length > 0) {
tcmDiagonsisSaveList.value=[];
tcmDiagonsisList.value=[];
debugger;
if (props.updateZy.length>0) {
props.updateZy.forEach((item) => {
let updateIds = item.updateId.split("-");
let name = item.name.split("-");
tcmDiagonsisSaveList.value.push(
{
let updateIds=item.updateId.split("-");
let name=item.name.split("-");
tcmDiagonsisSaveList.value.push({
conditionId: updateIds[0],
definitionId: item.illnessDefinitionId,
ybNo: item.ybNo,
syndromeGroupNo: item.syndromeGroupNo,
verificationStatusEnum: 4,
medTypeCode: '11',
diagSrtNo: item.diagSrtNo,
isExisting: true // 标记为已存在
},
{
diagSrtNo:item.diagSrtNo,
});
tcmDiagonsisList.value.push({
conditionName: name[0],
syndromeGroupNo: item.syndromeGroupNo,
});
tcmDiagonsisSaveList.value.push({
conditionId: updateIds[1],
definitionId: item.symptomDefinitionId,
ybNo: item.symptomYbNo,
syndromeGroupNo: item.syndromeGroupNo,
diagSrtNo: item.diagSrtNo,
isExisting: true // 标记为已存在
}
);
tcmDiagonsisList.value.push({
conditionName: name[0],
syndromeName: name[1],
syndromeGroupNo: item.syndromeGroupNo,
isExisting: true // 标记为已存在
diagSrtNo:item.diagSrtNo,
});
syndromeSelected.value = true;
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = name[1];
console.log("这是修改时带入的数据");
console.log(tcmDiagonsisList.value);
console.log(tcmDiagonsisSaveList.value);
syndromeSelected.value = true;
});
} else {
// 不是修改模式,加载已保存的中医诊断
if (props.patientInfo && props.patientInfo.encounterId) {
getTcmDiagnosis({ encounterId: props.patientInfo.encounterId }).then((res) => {
if (res.code === 200 && res.data.illness && res.data.illness.length > 0) {
res.data.illness.forEach((item, index) => {
const symptom = res.data.symptom[index];
if (symptom) {
// 添加到显示列表
tcmDiagonsisList.value.push({
conditionName: item.name,
syndromeName: symptom.name,
syndromeGroupNo: item.syndromeGroupNo,
isExisting: true // 标记为已存在
});
// 添加到保存列表
tcmDiagonsisSaveList.value.push(
{
conditionId: item.conditionId,
definitionId: item.definitionId,
ybNo: item.ybNo,
syndromeGroupNo: item.syndromeGroupNo,
verificationStatusEnum: item.verificationStatusEnum || 4,
medTypeCode: item.medTypeCode || '11',
diagSrtNo: item.diagSrtNo,
isExisting: true // 标记为已存在
},
{
conditionId: symptom.conditionId,
definitionId: symptom.definitionId,
ybNo: symptom.ybNo,
syndromeGroupNo: item.syndromeGroupNo,
diagSrtNo: item.diagSrtNo,
isExisting: true // 标记为已存在
}
);
}
});
}
}).catch(err => {
console.error('加载已保存的中医诊断失败:', err);
});
}
}
}
// 点击诊断列表处理,点击以后才显示证候列表
function handleClickRow(row) {
if (syndromeSelected.value || tcmDiagonsisList.value.length == 0) {
syndromeSelected.value = false;
syndromeSelected.value = false;
selectedDisease.value = true;
timestamp.value = Date.now();
getTcmSyndrome().then((res) => {
syndromeList.value = res.data.records;
});
// 添加新的诊断
tcmDiagonsisSaveList.value.push({
definitionId: row.id,
ybNo: row.ybNo,
syndromeGroupNo: timestamp.value,
verificationStatusEnum: 4,
medTypeCode: '11',
isExisting: false // 标记为新增
});
tcmDiagonsisList.value.push({
conditionName: row.name,
syndromeGroupNo: timestamp.value,
isExisting: false // 标记为新增
});
if (props.updateZy.length>0) {
props.updateZy.forEach((item) => {
let updateIds=item.updateId.split("-");
tcmDiagonsisSaveList.value.push({
updateId:updateIds[0],
conditionId: updateIds[0],
definitionId: row.id,
ybNo: row.ybNo,
syndromeGroupNo: timestamp.value,
verificationStatusEnum: 4,
medTypeCode: '11',
diagSrtNo:item.diagSrtNo,
});
debugger;
if(tcmDiagonsisList.value.length>0){
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].conditionName = row.name;
}else{
tcmDiagonsisList.value.push({
conditionName: row.name,
syndromeGroupNo: timestamp.value,
});
}
});
}else{
tcmDiagonsisSaveList.value.push({
definitionId: row.id,
ybNo: row.ybNo,
syndromeGroupNo: timestamp.value,
verificationStatusEnum: 4,
medTypeCode: '11',
});
tcmDiagonsisList.value.push({
conditionName: row.name,
syndromeGroupNo: timestamp.value,
});
}
}
// tcmDiagonsisList.value.push({
// conditionName: row.name,
// syndromeGroupNo: timestamp.value,
// });
}
}
function clickSyndromeRow(row) {
// 检查是否已存在完全相同的诊断和证候
let flag = true;
const currentConditionName = tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].conditionName;
tcmDiagonsisList.value.forEach(item => {
if (item.conditionName === currentConditionName && item.syndromeName === row.name) {
proxy.$modal.msgWarning('不能存在完全相同的诊断和证候');
flag = false;
debugger;
let flag=true;
tcmDiagonsisList.value.forEach( item => {
if(tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].conditionName==item.conditionName){
if(item.syndromeName==row.name ){
proxy.$modal.msgWarning('不能存在完全相同的诊断和证侯');
flag=false;
}
}
});
if (flag) {
tcmDiagonsisSaveList.value.push({
definitionId: row.id,
ybNo: row.ybNo,
syndromeGroupNo: timestamp.value,
isExisting: false // 标记为新增
});
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = row.name;
syndromeSelected.value = true;
if(flag){
if(props.updateZy.length>0){
props.updateZy.forEach((item) => {
let updateIds=item.updateId.split("-");
tcmDiagonsisSaveList.value.push({
updateId:updateIds[1],
conditionId: updateIds[1],
definitionId: row.id,
ybNo: row.ybNo,
syndromeGroupNo: timestamp.value,
});
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = row.name;
syndromeSelected.value = true;
});
}else{
tcmDiagonsisSaveList.value.push({
definitionId: row.id,
ybNo: row.ybNo,
syndromeGroupNo: timestamp.value,
});
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = row.name;
syndromeSelected.value = true;
}
// tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = row.name;
// syndromeSelected.value = true;
}
}
@@ -272,52 +268,38 @@ function removeDiagnosis(row, index) {
}
function save() {
// 只保存新增的诊断,过滤掉已存在的
const newDiagnosisList = tcmDiagonsisSaveList.value.filter(item => !item.isExisting);
if (newDiagnosisList.length === 0) {
proxy.$modal.msgWarning('没有新增的诊断需要保存');
return;
}
if (props.updateZy.length > 0) {
// 修改模式
if(props.updateZy.length>0){
updateTcmDiagnosis({
patientId: props.patientInfo.patientId,
encounterId: props.patientInfo.encounterId,
diagnosisChildList: newDiagnosisList,
}).then((res) => {
if (res.code == 200) {
emit('close');
proxy.$modal.msgSuccess('诊断已保存');
}
diagnosisChildList: tcmDiagonsisSaveList.value,
}).then((res) => {
if (res.code == 200) {
emit('close');
proxy.$modal.msgSuccess('诊断已保存');
}
});
} else {
// 新增模式
}else{
saveTcmDiagnosis({
patientId: props.patientInfo.patientId,
encounterId: props.patientInfo.encounterId,
diagnosisChildList: newDiagnosisList,
}).then((res) => {
if (res.code == 200) {
emit('close');
proxy.$modal.msgSuccess('诊断已保存');
}
diagnosisChildList: tcmDiagonsisSaveList.value,
}).then((res) => {
if (res.code == 200) {
emit('close');
proxy.$modal.msgSuccess('诊断已保存');
}
});
}
}
function submit() {
// 检查是否有新增的诊断
const hasNewDiagnosis = tcmDiagonsisSaveList.value.some(item => !item.isExisting);
if (!hasNewDiagnosis) {
// 如果没有新增诊断,直接关闭
emit('close');
return;
}
if (syndromeSelected.value || tcmDiagonsisSaveList.value.length % 2 == 0) {
debugger;
if (
tcmDiagonsisSaveList.value.length > 0 &&
(syndromeSelected.value || tcmDiagonsisSaveList.value.length % 2 == 0)
) {
save();
} else {
proxy.$modal.msgWarning('请选择证候');

View File

@@ -75,17 +75,19 @@
<el-form :model="form" :rules="rules" ref="formRef">
<el-table ref="diagnosisTableRef" :data="form.diagnosisList" height="650">
<el-table-column label="序号" type="index" width="50" />
<el-table-column label="诊断排序" align="center" prop="diagSrtNo" width="120">
<el-table-column label="分类" align="center" prop="typeName" width="120">
<template #default="scope">
<el-form-item :prop="`diagnosisList.${scope.$index}.diagSrtNo`" :rules="rules.diagSrtNo">
<el-input-number v-model="scope.row.diagSrtNo" controls-position="right" :controls="false"
style="width: 80px" />
</el-form-item>
<el-select v-model="scope.row.typeName" placeholder="请选择">
<el-option label="西医" value="西医" />
<el-option label="中医" value="中医" />
<el-option label="证型" value="证型" />
<el-option label="其他" value="其他" />
</el-select>
</template>
</el-table-column>
<el-table-column label="诊断类" align="center" prop="diagSrtNo" width="180">
<el-table-column label="诊断类" align="center" prop="medTypeCode" width="180">
<template #default="scope">
<el-form-item :prop="`diagnosisList.${scope.$index}.medTypeCode`" :rules="rules.medTypeCode">
<el-form-item :prop="`diagnosisList.${scope.$index}.medTypeCode`" :rules="rules.medTypeCode" style="margin-bottom: 0;">
<el-select v-model="scope.row.medTypeCode" placeholder=" " style="width: 150px">
<el-option
v-for="item in diag_type"
@@ -97,9 +99,9 @@
</el-form-item>
</template>
</el-table-column>
<el-table-column label="诊断名称" align="center" prop="name">
<el-table-column label="诊断" align="center" prop="name">
<template #default="scope">
<el-form-item :prop="`diagnosisList.${scope.$index}.name`" :rules="rules.name">
<el-form-item :prop="`diagnosisList.${scope.$index}.name`" :rules="rules.name" style="margin-bottom: 0;">
<el-popover
:popper-style="{ padding: '0' }"
placement="bottom-start"
@@ -120,24 +122,26 @@
</el-form-item>
</template>
</el-table-column>
<el-table-column label="医保码" align="center" prop="ybNo" width="180" />
<el-table-column label="类别" align="center" prop="typeName" width="100" />
<el-table-column label="诊断类型" align="center" prop="maindiseFlag">
<el-table-column label="主诊断" align="center" width="120">
<template #default="scope">
<el-select v-model="scope.row.maindiseFlag" placeholder="是否为主诊断" @change="(value) => handleMaindise(value, scope.$index)">
<el-option label="是" :value="1"/>
<el-option label="否" :value="0"/>
</el-select>
</template>
</el-table-column>
<el-table-column label="诊断备注" align="center" prop="diagnosisDesc" min-width="150">
<template #default="scope">
<el-input v-model="scope.row.diagnosisDesc" placeholder="请输入备注" />
</template>
</el-table-column>
<el-table-column label="ICD编码" align="center" prop="ybNo" width="180" />
<el-table-column label="诊断状态" align="center" prop="maindiseFlag" width="150">
<template #default="scope">
<div style="display:flex;flex-direction:column;align-items:center;gap:5px;">
<el-checkbox
label="主诊断"
:true-value="1"
:false-value="0"
v-model="scope.row.maindiseFlag"
border
size="small"
@change="(value) => handleMaindise(value, scope.$index)"
/>
<el-select
v-model="scope.row.verificationStatusEnum"
placeholder=" "
style="width: 100%; padding-bottom: 5px; padding-left: 10px"
style="width: 100%;"
size="small"
>
<el-option
@@ -147,7 +151,32 @@
:value="item.value"
/>
</el-select>
</div>
</template>
</el-table-column>
<el-table-column label="发病日期" align="center" prop="onsetDate" width="180">
<template #default="scope">
<el-date-picker
v-model="scope.row.onsetDate"
type="date"
placeholder="选择日期"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column label="诊断日期" align="center" prop="diagnosisTime" width="180">
<template #default="scope">
{{ scope.row.diagnosisTime ? scope.row.diagnosisTime.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="医生" align="center" prop="diagnosisDoctor" width="120" />
<el-table-column label="长效诊断标识" align="center" prop="longTermDiagnosisFlag" width="150">
<template #default="scope">
<el-select v-model="scope.row.longTermDiagnosisFlag" placeholder="请选择" clearable>
<el-option label="长期有效" value="1" />
<el-option label="临时" value="2" />
</el-select>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="130">
@@ -218,7 +247,7 @@ const props = defineProps({
const emits = defineEmits(['diagnosisSave']);
const { proxy } = getCurrentInstance();
const userStore = useUserStore();
const { diag_type } = proxy.useDict('diag_type');
const { diag_type, long_term_diagnosis_flag } = proxy.useDict('diag_type', 'long_term_diagnosis_flag');
const rules = ref({
name: [{ required: true, message: '请选择诊断', trigger: 'change' }],
medTypeCode: [{ required: true, message: '请选择诊断类型', trigger: 'change' }],
@@ -252,8 +281,7 @@ function getList() {
getEncounterDiagnosis(props.patientInfo.encounterId)
.then((res) => {
if (res.code == 200) {
// 过滤掉中医诊断,只保留西医诊断
form.value.diagnosisList = res.data.filter(item => item.typeName !== '中医诊断');
form.value.diagnosisList = res.data;
emits('diagnosisSave', false);
}
maxNo = form.value.diagnosisList.length;
@@ -409,10 +437,13 @@ function getTree() {
function handleAddDiagnosis() {
proxy.$refs.formRef.validate((valid) => {
if (valid) {
const maxSortNo = form.value.diagnosisList.length > 0
? Math.max(...form.value.diagnosisList.map(item => item.diagSrtNo || 0))
// if (!allowAdd.value) {
// proxy.$modal.msgWarning('请先填写病历');
// return;
// }
const maxSortNo = form.value.diagnosisList.length > 0
? Math.max(...form.value.diagnosisList.map(item => item.diagSrtNo || 0))
: 0;
form.value.diagnosisList.push({
showPopover: false,
name: undefined,
@@ -422,7 +453,9 @@ function handleAddDiagnosis() {
iptDiseTypeCode: 2,
diagnosisDesc: '',
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
diagnosisTime: new Date().toLocaleString('zh-CN')
diagnosisTime: new Date().toLocaleString('zh-CN'),
typeName: '西医',
longTermDiagnosisFlag: ''
});
// 添加后按排序号排序
@@ -491,7 +524,6 @@ function handleSaveDiagnosis() {
return false;
} else if (!form.value.diagnosisList.some((diagnosis) => diagnosis.maindiseFlag === 1)) {
proxy.$modal.msgWarning('至少添加一条主诊断');
return false;
} else {
// 保存前按排序号排序
form.value.diagnosisList.sort((a, b) => (a.diagSrtNo || 0) - (b.diagSrtNo || 0));

View File

@@ -38,7 +38,7 @@ watch(
queryParams.value.searchKey = newValue;
getList();
},
{ immediate: true }
{ immdiate: true }
);
getList();

View File

@@ -17,7 +17,7 @@
</el-button>
</div>
</div>
<!--检验信息-->
<el-table
ref="inspectionTableRef"
:data="inspectionList"
@@ -79,7 +79,7 @@
</div>
</div>
<!-- 下方申请单和检验项目选择器 -->
<!-- 下方申请单和检验项目选择器 -->
<div style="display: flex; gap: 20px">
<!-- 左侧申请单和检验信息 -->
<div style="width: 55%">
@@ -88,18 +88,18 @@
<div class="application-form" style="padding: 20px; height: 700px; overflow-y: auto; border: 1px solid #e4e7ed; border-radius: 4px; margin: 10px;">
<div style="margin-bottom: 20px">
<label style="display: block; margin-bottom: 5px; font-weight: bold">申请单号</label>
<el-input v-model="formData.applicationNo" readonly size="small" />
<el-input v-model="formData.applicationNo" disabled size="small" />
</div>
<!-- 患者信息行 -->
<div style="display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; margin-bottom: 20px">
<div>
<label style="display: block; margin-bottom: 5px; font-weight: bold">姓名</label>
<el-input v-model="formData.patientName" readonly size="small" />
<el-input v-model="formData.patientName" disabled size="small" />
</div>
<div>
<label style="display: block; margin-bottom: 5px; font-weight: bold">就诊卡号</label>
<el-input v-model="formData.identifierNo" readonly size="small" />
<el-input v-model="formData.cardNo" disabled size="small" />
</div>
<div>
<label style="display: block; margin-bottom: 5px; font-weight: bold">费用性质</label>
@@ -115,7 +115,6 @@
<!-- 申请信息行 -->
<div style="display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; margin-bottom: 20px">
<!--申请日期-->
<div>
<label style="display: block; margin-bottom: 5px; font-weight: bold">申请日期</label>
<el-date-picker
@@ -128,7 +127,6 @@
style="width: 100%"
/>
</div>
<!--申请科室-->
<div>
<label style="display: block; margin-bottom: 5px; font-weight: bold">申请科室</label>
<el-select v-model="formData.departmentName" placeholder="请选择申请科室" size="small" style="width: 100%" disabled>
@@ -137,11 +135,9 @@
<el-option label="儿科" value="pediatrics" />
</el-select>
</div>
<!--申请医生-->
<div>
<label style="display: block; margin-bottom: 5px; font-weight: bold">申请医生</label>
<el-select v-model="formData.doctorName" placeholder="请选择申请医生" size="small" style="width: 100%">
<el-select v-model="formData.doctorName" placeholder="请选择申请医生" size="small" style="width: 100%" disabled>
<el-option label="张医生" value="doctor_zhang" />
<el-option label="李医生" value="doctor_li" />
<el-option label="王医生" value="doctor_wang" />
@@ -168,7 +164,7 @@
<div v-if="validationErrors.executeDepartment" class="error-message">请选择执行科室</div>
</div>
<!-- 诊断描述 -->
<!-- 诊断相关字段 -->
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 20px">
<div :class="{ 'form-item-error': validationErrors.diagnosisDesc }">
<label style="display: block; margin-bottom: 5px; font-weight: bold">诊断描述 <span style="color: #f56c6c">*</span></label>
@@ -252,6 +248,7 @@
</div>
</div>
</el-tab-pane>
<el-tab-pane label="检验信息" name="inspectionInfo">
<div style="padding: 20px; height: 700px; overflow-y: auto; border: 1px solid #e4e7ed; border-radius: 4px; margin: 10px;">
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 20px">
@@ -461,7 +458,7 @@ const formData = reactive({
applicationId: null,
applicationNo: '202511210001',
patientName: '',
identifierNo: '',
cardNo: '',
feeType: 'self',
applicationDate: new Date(),
departmentName: '',
@@ -582,11 +579,11 @@ const getFilteredItems = (categoryKey) => {
// 初始化数据
function initData() {
// console.log('检验组件初始化patientInfo:', props.patientInfo)
console.log('检验组件初始化patientInfo:', props.patientInfo)
if (props.patientInfo) {
queryParams.encounterId = props.patientInfo.encounterId
formData.patientName = props.patientInfo.patientName || ''
formData.identifierNo = props.patientInfo.identifierNo || ''
formData.cardNo = props.patientInfo.cardNo || ''
formData.departmentName = props.patientInfo.departmentName || ''
formData.doctorName = props.patientInfo.doctorName || ''
}
@@ -598,28 +595,20 @@ function initData() {
// 获取检验申请单列表
function getInspectionList() {
// 如果没有encounterId,不调用接口
if (!queryParams.encounterId) {
// console.warn('【检验】encounterId为空,不调用接口')
return
}
loading.value = true
// 调用真实的API只传递 encounterId 参数
// console.log('【检验】调用API,encounterId:', queryParams.encounterId)
getInspectionApplicationList({ encounterId: queryParams.encounterId }).then((res) => {
if (res.code === 200) {
inspectionList.value = res.data || []
total.value = res.data?.length || 0
// console.log('【检验】获取数据成功,数量:', inspectionList.value.length)
} else {
inspectionList.value = []
total.value = 0
ElMessage.error('获取检验申请单列表失败')
}
}).catch((error) => {
// console.error('获取检验申请单列表异常:', error)
console.error('获取检验申请单列表异常:', error)
inspectionList.value = []
total.value = 0
ElMessage.error('获取检验申请单列表异常')
@@ -630,7 +619,7 @@ function getInspectionList() {
// 新增申请单
function handleNewApplication() {
// console.log('点击新增按钮')
console.log('点击新增按钮')
resetForm()
// 生成申请单号
formData.applicationNo = generateApplicationNo()
@@ -740,7 +729,7 @@ function handleSave() {
totalAmount: selectedInspectionItems.value.reduce((sum, item) => sum + item.price + (item.serviceFee || 0), 0)
}
// console.log('保存检验申请单数据:', saveData)
console.log('保存检验申请单数据:', saveData)
// 调用真实的API保存
saveInspectionApplication(saveData).then((res) => {
@@ -754,7 +743,7 @@ function handleSave() {
ElMessage.error(res.message || '保存失败')
}
}).catch((error) => {
// console.error('保存检验申请单异常:', error)
console.error('保存检验申请单异常:', error)
ElMessage.error('保存异常')
})
}
@@ -764,7 +753,7 @@ function handleFormSave() {
formRef.value?.validate((valid) => {
if (valid) {
formData.inspectionItems = selectedInspectionItems.value.map(item => item.id)
// console.log('保存检验申请单表单数据:', formData)
console.log('保存检验申请单表单数据:', formData)
ElMessage.success('保存成功')
showForm.value = false
getInspectionList()
@@ -774,7 +763,7 @@ function handleFormSave() {
// 查看详情
function handleView(row) {
// console.log('点击查看按钮,数据:', row)
console.log('点击查看按钮,数据:', row)
// 加载表单数据
Object.assign(formData, row)
@@ -814,7 +803,7 @@ function switchCategory(category) {
// 处理搜索
function handleSearch() {
// 搜索逻辑已在getFilteredItems中实现这里可以添加额外的搜索逻辑
// console.log('搜索关键词:', searchKeyword.value)
console.log('搜索关键词:', searchKeyword.value)
}
// 处理项目项点击(排除勾选框点击)
@@ -869,7 +858,7 @@ function handleSelectionChange(selection) {
// 打印申请单
function handlePrint(row) {
// console.log('打印申请单:', row)
console.log('打印申请单:', row)
// 切换到申请单TAB
leftActiveTab.value = 'application'
@@ -952,7 +941,7 @@ function handleDelete(row) {
confirmButtonClass: 'el-button--danger'
}
).then(() => {
// console.log('删除申请单:', row)
console.log('删除申请单:', row)
// 调用真实的API删除
deleteInspectionApplication(row.applicationId).then((res) => {
if (res.code === 200) {
@@ -963,7 +952,7 @@ function handleDelete(row) {
ElMessage.error(res.message || '删除失败')
}
}).catch((error) => {
// console.error('删除检验申请单异常:', error)
console.error('删除检验申请单异常:', error)
ElMessage.error('删除异常')
})
}).catch(() => {
@@ -988,16 +977,6 @@ watch(() => props.activeTab, (newVal) => {
}
})
// 监听patientInfo变化,确保encounterId及时更新
watch(() => props.patientInfo, (newVal) => {
// console.log('【检验】patientInfo变化:', newVal)
console.log('【检验】接收到的完整patientInfo:', JSON.stringify(newVal, null, 2))
if (newVal && newVal.encounterId) {
queryParams.encounterId = newVal.encounterId
// console.log('【检验】更新encounterId:', queryParams.encounterId)
}
}, { deep: true, immediate: true })
// 初始化
onMounted(() => {
initData()

View File

@@ -19,7 +19,7 @@
<span>{{ item.prescriptionNo }}</span>
</div>
<div style="text-align: center">
<h2>{{ userStore.hospitalName }}</h2>
<h2>长春市朝阳区中医院医院</h2>
</div>
<div style="text-align: center">
<h3>处方单</h3>
@@ -144,9 +144,6 @@
import {formatDateStr} from '@/utils/index';
//高精度库
import Decimal from 'decimal.js';
import useUserStore from '@/store/modules/user';
const userStore = useUserStore();
const props = defineProps({
open: {

View File

@@ -96,7 +96,7 @@
' ' +
scope.row.volume +
' [' +
(scope.row.unitPrice !== undefined && scope.row.unitPrice !== null && !isNaN(scope.row.unitPrice) && isFinite(scope.row.unitPrice) ? Number(scope.row.unitPrice).toFixed(2) : '-') +
Number(scope.row.unitPrice).toFixed(2) +
' 元' +
'/' +
scope.row.unitCode_dictText +
@@ -145,7 +145,7 @@
<span class="medicine-info"> 注射药品{{ scope.row.injectFlag_enumText }} </span>
<span class="total-amount">
总金额{{
(scope.row.totalPrice !== undefined && scope.row.totalPrice !== null && !isNaN(scope.row.totalPrice) && isFinite(scope.row.totalPrice))
scope.row.totalPrice
? Number(scope.row.totalPrice).toFixed(2) + ' 元'
: '0.00 元'
}}
@@ -631,7 +631,7 @@
" " +
scope.row.volume +
" [" +
(scope.row.unitPrice !== undefined && scope.row.unitPrice !== null && !isNaN(scope.row.unitPrice) && isFinite(scope.row.unitPrice) ? Number(scope.row.unitPrice).toFixed(2) : '-') +
Number(scope.row.unitPrice).toFixed(2) +
" " +
"/" +
scope.row.unitCode_dictText +
@@ -687,7 +687,7 @@
</el-form-item>
<span class="total-amount">
总金额:{{
(scope.row.totalPrice !== undefined && scope.row.totalPrice !== null && !isNaN(scope.row.totalPrice) && isFinite(scope.row.totalPrice))
scope.row.totalPrice
? Number(scope.row.totalPrice).toFixed(2) + ' 元'
: '0.00 元'
}}
@@ -702,7 +702,7 @@
<span style="font-size: 16px; font-weight: 600">
{{ scope.row.adviceName }}
{{
(scope.row.unitPrice !== undefined && scope.row.unitPrice !== null && !isNaN(scope.row.unitPrice) && isFinite(scope.row.unitPrice))
scope.row.unitPrice
? Number(scope.row.unitPrice).toFixed(2) + '/次'
: '-' + '元'
}}
@@ -748,7 +748,7 @@
<span class="total-amount">
总金额:
{{
(scope.row.totalPrice !== undefined && scope.row.totalPrice !== null && !isNaN(scope.row.totalPrice) && isFinite(scope.row.totalPrice))
scope.row.totalPrice
? Number(scope.row.totalPrice).toFixed(2) + ' 元'
: '0.00 元'
}}
@@ -766,128 +766,77 @@
</el-table-column>
<el-table-column type="selection" align="center" width="60" />
<el-table-column label="" align="center" width="60" prop="groupIcon" />
<el-table-column label="医嘱类型" align="center" prop="productName" width="130">
<el-table-column label="医嘱" align="center" prop="productName" width="400">
<template #default="scope">
<template v-if="scope.row.isEdit">
<el-select
size="default"
style="width: 100%;"
v-model="scope.row.adviceType"
:ref="'adviceTypeRef' + scope.$index"
placeholder="选择类型"
clearable
@change="
(value) => {
expandOrder = [];
// 当医嘱类型改变时,清空当前选择的项目名称,因为不同类型项目的数据结构可能不兼容
prescriptionList[scope.$index].adviceName = undefined;
adviceQueryParams.adviceType = value;
// 根据选择的类型设置categoryCode用于药品分类筛选
if (value == 1) { // 西药
adviceQueryParams.categoryCode = '2';
} else if (value == 2) { // 中成药
adviceQueryParams.categoryCode = '1';
} else if (value == 3) { // 耗材
adviceQueryParams.categoryCode = ''; // 耗材不需要categoryCode筛选
} else if (value == 4) { // 诊疗
adviceQueryParams.categoryCode = ''; // 诊疗不需要categoryCode筛选
} else {
adviceQueryParams.categoryCode = ''; // 全部类型
}
}
"
@clear="
() => {
prescriptionList[scope.$index].adviceName = undefined;
prescriptionList[scope.$index].adviceType_dictText = '';
}
"
style="width: 35%; margin-right: 20px"
v-model="scope.row.adviceType"
:ref="'adviceTypeRef' + scope.$index"
@change="
(value) => {
expandOrder = [];
prescriptionList[scope.$index].adviceName = undefined;
adviceQueryParams.adviceType = value;
}
"
>
<el-option
v-for="item in adviceTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
@click="
() => {
prescriptionList[scope.$index].adviceType = item.value;
prescriptionList[scope.$index].adviceType_dictText = item.label;
}
"
>
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: var(--el-text-color-secondary); font-size: 12px">
{{ item.value }}
</span>
</el-option>
v-for="item in adviceTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
@click="
() => {
prescriptionList[scope.$index].adviceType = item.value;
prescriptionList[scope.$index].adviceType_dictText = item.label;
}
"
/>
</el-select>
</template>
<el-tag v-else size="small" type="primary">{{ scope.row.adviceType_dictText }}</el-tag>
</template>
</el-table-column>
<el-table-column label="项目" align="center" prop="" width="280">
<template #default="scope">
<template v-if="scope.row.isEdit">
<el-popover
:popper-style="{ padding: '0' }"
placement="bottom-start"
:visible="scope.row.showPopover"
:width="1200"
trigger="manual"
:popper-style="{ padding: '0' }"
placement="bottom-start"
:visible="scope.row.showPopover"
:width="1200"
>
<adviceBaseList
ref="adviceTableRef"
:popoverVisible="scope.row.showPopover"
:adviceQueryParams="adviceQueryParams"
:patientInfo="props.patientInfo"
@selectAdviceBase="
(row) => {
selectAdviceBase(scope.row.uniqueKey, row);
}
"
ref="adviceTableRef"
:popoverVisible="scope.row.showPopover"
:adviceQueryParams="adviceQueryParams"
:patientInfo="props.patientInfo"
@selectAdviceBase="
(row) => {
selectAdviceBase(scope.row.uniqueKey, row);
}
"
/>
<template #reference>
<el-input
:ref="'adviceRef' + scope.$index"
size="default"
style="width: 100%;"
v-model="scope.row.adviceName"
placeholder="输入项目名称搜索或点击选择"
clearable
@input="handleChange"
@click="handleFocus(scope.row, scope.$index)"
@blur="handleBlur(scope.row)"
@clear="() => { scope.row.adviceName = undefined; }"
@keyup.enter.stop="handleFocus(scope.row, scope.$index)"
@keydown="
(e) => {
if (!scope.row.showPopover) return;
// 拦截上下键和回车事件
if (['ArrowUp', 'ArrowDown', 'Enter'].includes(e.key)) {
e.preventDefault();
// 传递事件到弹窗容器
adviceTableRef.handleKeyDown(e);
}
:ref="'adviceRef' + scope.$index"
style="width: 50%"
v-model="scope.row.adviceName"
placeholder="请选择项目"
@input="handleChange"
@click="handleFocus(scope.row, scope.$index)"
@blur="handleBlur(scope.row)"
@keyup.enter.stop="handleFocus(scope.row, scope.$index)"
@keydown="
(e) => {
if (!scope.row.showPopover) return;
// 拦截上下键和回车事件
if (['ArrowUp', 'ArrowDown', 'Enter'].includes(e.key)) {
e.preventDefault();
// 传递事件到弹窗容器
adviceTableRef.handleKeyDown(e);
}
"
>
<template #prefix>
<el-icon><Search /></el-icon>
</template>
<template #suffix v-if="scope.row.adviceName">
<el-icon style="cursor: pointer; color: var(--el-color-info);" title="快速选择">
<ArrowDown />
</el-icon>
</template>
</el-input>
}
"
/>
</template>
</el-popover>
</template>
<div v-else style="display: flex; align-items: center; gap: 8px;">
<el-icon color="var(--el-color-primary)"><Memo /></el-icon>
<span>{{ scope.row.adviceName }}</span>
</div>
<span v-else>{{ scope.row.adviceName }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="" width="90">
@@ -920,7 +869,7 @@
<el-table-column label="总金额" align="right" prop="" header-align="center" width="100">
<template #default="scope">
<span v-if="!scope.row.isEdit" style="text-align: right">
{{ (scope.row.totalPrice !== undefined && scope.row.totalPrice !== null && !isNaN(scope.row.totalPrice) && isFinite(scope.row.totalPrice)) ? Number(scope.row.totalPrice).toFixed(2) + ' 元' : '-' }}
{{ scope.row.totalPrice ? Number(scope.row.totalPrice).toFixed(2) + ' 元' : '-' }}
</span>
</template>
</el-table-column>
@@ -1042,9 +991,8 @@ import SkinTestInfo from './skinTestInfo';
import Decimal from 'decimal.js';
import useUserStore from '@/store/modules/user';
import {ElMessage, ElMessageBox} from 'element-plus';
import {ArrowDown, Search, Memo} from '@element-plus/icons-vue';
import {ArrowDown} from '@element-plus/icons-vue';
import printUtils, {getPrinterList, PRINT_TEMPLATE, savePrinterToCache,} from '@/utils/printUtils';
import Template from "@/views/inpatientDoctor/home/emr/components/template.vue";
const emit = defineEmits(['selectDiagnosis']);
const total = ref(0);
@@ -1158,7 +1106,7 @@ onMounted(() => {
document.addEventListener('keydown', escKeyListener);
// 初始化时自动创建第一个西药处方
if (westernPrescriptions.value.length === 0) {
handleAddPrescription(null, false);
handleAddPrescription();
}
});
@@ -1583,7 +1531,7 @@ function getListInfo(addNewRow) {
});
getGroupMarkers(); // 更新标记
if (props.activeTab == 'prescription' && addNewRow) {
handleAddPrescription(null, false);
handleAddPrescription();
}
// 在所有异步操作完成后 resolve Promise
@@ -1647,16 +1595,14 @@ function handleSelectionChange(selection, row) {
}
// 新增医嘱
function handleAddPrescription(prescriptionId, showWarning = true) {
function handleAddPrescription(prescriptionId) {
// 如果传入了处方ID先切换到该处方
if (prescriptionId && prescriptionId !== currentPrescriptionId.value) {
switchToActivePrescription(prescriptionId);
}
if (diagnosisList.value.length == 0) {
if (showWarning) {
proxy.$modal.msgWarning('请先保存诊断后再开立医嘱');
}
proxy.$modal.msgWarning('请先保存诊断后再开立医嘱');
return;
}
if (isAdding.value) {
@@ -2345,7 +2291,7 @@ function handleSaveSign(row, index, prescriptionId) {
});
} else {
if (prescriptionList.value[0].adviceName) {
handleAddPrescription(null, false);
handleAddPrescription();
}
}
adviceQueryParams.value.adviceType = undefined;
@@ -2485,8 +2431,8 @@ function setValue(row) {
? (typeof row.skinTestFlag === 'number' ? row.skinTestFlag : (row.skinTestFlag ? 1 : 0))
: 0;
prescriptionList.value[rowIndex.value] = {
...prescriptionList.value[rowIndex.value],
prescriptionList.value[targetIndex] = {
...prescriptionList.value[targetIndex],
...JSON.parse(JSON.stringify(row)),
// 确保adviceType为数字类型避免类型不匹配导致的显示问题
adviceType: Number(row.adviceType),
@@ -2865,25 +2811,12 @@ function getGroupMarkers() {
function calculateTotalPrice(row, index) {
nextTick(() => {
if (row.adviceType == 3) {
// 检查价格是否为有效数字
if (row.unitPrice !== undefined && row.unitPrice !== null && !isNaN(row.unitPrice) && isFinite(row.unitPrice)) {
row.totalPrice = (row.unitPrice * row.quantity).toFixed(6);
} else {
row.totalPrice = '0.000000'; // 或者设置为 0
}
row.totalPrice = (row.unitPrice * row.quantity).toFixed(6);
} else {
if (row.unitCode == row.minUnitCode) {
if (row.minUnitPrice !== undefined && row.minUnitPrice !== null && !isNaN(row.minUnitPrice) && isFinite(row.minUnitPrice)) {
row.totalPrice = (row.minUnitPrice * row.quantity).toFixed(6);
} else {
row.totalPrice = '0.000000';
}
row.totalPrice = (row.minUnitPrice * row.quantity).toFixed(6);
} else {
if (row.unitPrice !== undefined && row.unitPrice !== null && !isNaN(row.unitPrice) && isFinite(row.unitPrice)) {
row.totalPrice = (row.unitPrice * row.quantity).toFixed(6);
} else {
row.totalPrice = '0.000000';
}
row.totalPrice = (row.unitPrice * row.quantity).toFixed(6);
}
}
});

View File

@@ -145,20 +145,14 @@ const fetchAll = async () => {
}
loadingCheck.value = true;
loadingInspection.value = true;
// 独立处理,互不影响
const runFetch = async (fn, loadingRef, name) => {
try {
await fn();
} catch (e) {
proxy.$modal?.msgError?.(`${name}查询失败: ${e.message || '未知错误'}`);
} finally {
loadingRef.value = false;
}
};
runFetch(fetchCheckReport, loadingCheck, '检查报告');
runFetch(fetchInspectionReport, loadingInspection, '检验报告');
try {
await Promise.all([fetchCheckReport(), fetchInspectionReport()]);
} catch (e) {
proxy.$modal?.msgError?.(e.message || '查询报告失败');
} finally {
loadingCheck.value = false;
loadingInspection.value = false;
}
};
const handleRefreshCheck = async () => {

View File

@@ -542,17 +542,7 @@ async function getListInfo(addNewRow) {
tcmPrescriptionList.value.forEach((prescription) => {
prescription.isAdding = false;
});
// 如果没有encounterId,不调用接口
if (!props.patientInfo || !props.patientInfo.encounterId) {
console.warn('【中医处方】patientInfo或encounterId为空,不调用接口')
tcmPrescriptionList.value = []
return
}
console.log('【中医处方】调用API,encounterId:', props.patientInfo.encounterId)
await getTcmAdviceList({ encounterId: props.patientInfo.encounterId }).then(async (res) => {
console.log('【中医处方】获取数据成功,处方数量:', res.data?.length || 0)
// 按 groupId 分组数据
const groupedData = {};
res.data.forEach((item) => {
@@ -633,15 +623,7 @@ async function getListInfo(addNewRow) {
}
function getDiagnosisInfo() {
// 如果没有encounterId,不调用接口
if (!props.patientInfo || !props.patientInfo.encounterId) {
console.warn('【中医诊断】patientInfo或encounterId为空,不调用接口')
diagnosisList.value = []
return
}
diagnosisList.value = [];
console.log('【中医诊断】调用API,encounterId:', props.patientInfo.encounterId)
getTcmDiagnosis({ encounterId: props.patientInfo.encounterId }).then((res) => {
if (res.data.illness.length > 0) {
res.data.illness.forEach((item, index) => {
@@ -653,7 +635,6 @@ function getDiagnosisInfo() {
});
});
}
console.log('【中医诊断】获取数据成功,诊断数量:', diagnosisList.value.length)
// 默认选择第一个诊断
if (diagnosisList.value.length > 0) {
const firstDiagnosis = diagnosisList.value[0];
@@ -775,19 +756,6 @@ function deletePrescription(prescription) {
const index = tcmPrescriptionList.value.findIndex((p) => p.id === prescription.id);
if (index !== -1) {
const prescriptionData = tcmPrescriptionList.value[index];
if (prescriptionData.prescriptionList && prescriptionData.prescriptionList.length > 0) {
proxy.$modal.msgWarning('该处方单还有药品,请先删除所有药品后再删除处方单');
return;
}
const hasChargedItems = prescriptionData.prescriptionList && prescriptionData.prescriptionList.some(item => item.statusEnum === 2);
if (hasChargedItems) {
proxy.$modal.msgWarning('该处方单已收费,不能删除');
return;
}
tcmPrescriptionList.value.splice(index, 1);
}
}
@@ -906,7 +874,7 @@ function selectAdviceBase(key, row, pIndex) {
).chargeItemDefinitionId;
// 库存列表 + 价格列表拼成批次号的下拉框
if (row.adviceType == 1 || row.adviceType == 2) {
if (row.adviceType != 3) {
if (row.inventoryList && row.inventoryList.length == 0) {
prescription.expandOrder = [];
proxy.$modal.msgWarning('该项目无库存');
@@ -1082,32 +1050,23 @@ function handleSaveSign(row, index, pIndex) {
const prescription = tcmPrescriptionList.value[pIndex];
const formRefName = 'formRef' + pIndex + '-' + index;
proxy.$refs[formRefName][0].validate((valid) => {
if (valid) {
row.isEdit = false;
prescription.isAdding = false;
prescription.expandOrder = [];
row.contentJson = undefined;
row.patientId = props.patientInfo.patientId;
row.encounterId = props.patientInfo.encounterId;
row.accountId = prescription.accountId;
row.quantity = row.minUnitQuantity;
row.chineseHerbsDoseQuantity = prescription.chineseHerbsDoseQuantity;
row.unitPrice =
row.unitCodeList.find((item) => item.value == row.unitCode).type == 'unit'
? row.unitPrice
: new Decimal(row.unitPrice).div(row.partPercent).toFixed(2);
row.conditionDefinitionId = prescription.conditionDefinitionId;
row.encounterDiagnosisId = prescription.encounterDiagnosisId;
row.diagnosisName = prescription.diagnosisName;
// 寻找当前选中的单位字典值
const selectedUnit = row.unitCodeList.find((item) => item.value === row.minUnitCode);
if (selectedUnit) {
row.doseUnitCode_dictText = selectedUnit.label;
}
row.contentJson = JSON.stringify(row);
}
row.isEdit = false;
prescription.isAdding = false;
prescription.expandOrder = [];
row.contentJson = undefined;
row.patientId = props.patientInfo.patientId;
row.encounterId = props.patientInfo.encounterId;
row.accountId = prescription.accountId;
row.quantity = row.minUnitQuantity;
row.conditionId = prescription.conditionId;
row.unitPrice =
row.unitCodeList.find((item) => item.value == row.unitCode).type == 'unit'
? row.unitPrice
: new Decimal(row.unitPrice).div(row.partPercent).toFixed(2);
row.conditionDefinitionId = prescription.conditionDefinitionId;
row.encounterDiagnosisId = prescription.encounterDiagnosisId;
row.diagnosisName = prescription.diagnosisName;
row.contentJson = JSON.stringify(row);
});
}

View File

@@ -81,11 +81,11 @@
{{
Object.keys(patientInfo).length !== 0
? patientInfo.patientName +
' / ' +
patientInfo.age +
' / ' +
patientInfo.genderEnum_enumText +
' / ' +
' / ' +
patientInfo.age +
' / ' +
patientInfo.genderEnum_enumText +
' / ' +
(patientInfo?.contractName ? patientInfo.contractName : '') +
'/' +
patientInfo.phone +
@@ -117,7 +117,7 @@
</el-descriptions-item>
</el-descriptions>
</div>
<div style="padding: 10px; position: relative">
<div style="padding: 10px">
<el-tabs
type="card"
style="width: 100%; height: 100%"
@@ -137,9 +137,9 @@
:patientInfo="patientInfo"
ref="emrRef"
@save="
(value) => {
saveStatus = value;
}
(value) => {
saveStatus = value;
}
"
/>
</el-tab-pane> -->
@@ -164,9 +164,6 @@
<el-tab-pane label="检验" name="inspection">
<inspectionApplication :patientInfo="patientInfo" :activeTab="activeTab" ref="inspectionRef" />
</el-tab-pane>
<el-tab-pane label="手术申请" name="surgery">
<surgeryApplication :patientInfo="patientInfo" :activeTab="activeTab" ref="surgeryRef" />
</el-tab-pane>
<el-tab-pane label="电子处方" name="eprescription">
<eprescriptionlist :patientInfo="patientInfo" ref="eprescriptionRef" />
</el-tab-pane>
@@ -220,7 +217,6 @@ import eprescriptionlist from './components/eprescriptionlist.vue';
import HospitalizationDialog from './components/hospitalizationDialog.vue';
import tcmAdvice from './components/tcm/tcmAdvice.vue';
import inspectionApplication from './components/inspection/inspectionApplication.vue';
import surgeryApplication from './components/surgery/surgeryApplication.vue';
import {formatDate, formatDateStr} from '@/utils/index';
import useUserStore from '@/store/modules/user';
import {nextTick} from 'vue';
@@ -270,7 +266,6 @@ const patientDrawerRef = ref();
const prescriptionRef = ref();
const tcmRef = ref();
const inspectionRef = ref();
const surgeryRef = ref();
const emrRef = ref();
const diagnosisRef = ref();
const waitCount = ref(0);
@@ -321,10 +316,7 @@ getPatientList();
function getPatientList() {
queryParams.value.statusEnum = 2;
getList(queryParams.value).then((res) => {
// console.log('API返回的完整数据:', res); // 添加这行来查看完整返回
// console.log('API返回的数据记录:', res.data.records); // 查看具体数据记录
patientList.value = res.data.records.map((item) => {
// console.log('处理的单个患者数据:', item); // 查看处理的单个患者数据
return {
...item,
active: currentEncounterId.value ? item.encounterId == currentEncounterId.value : false,
@@ -410,9 +402,6 @@ function handleClick(tab) {
case 'inspection':
// 检验tab点击处理逻辑可以在这里添加
break;
case 'surgery':
surgeryRef.value.getList();
break;
case 'eprescription':
eprescriptionRef.value.getList();
break;
@@ -434,17 +423,17 @@ function handleClick(tab) {
// 查看本次就诊处方单从医嘱Tab页获取已开立的处方单信息
function getEnPrescription(encounterId) {
getEnPrescriptionInfo({ encounterId: encounterId }).then((res) => {
// console.log('处方单 res', res);
console.log('处方单 res', res);
let dataArr = res.data.records || [];
if (dataArr.length <= 0) {
ElMessage({
type: 'error',
message: '暂无处方单',
});
return;
}
return;
}
prescriptionInfo.value = res.data.records;
openPrescriptionDialog.value = true;
openPrescriptionDialog.value = true;
});
}
@@ -464,7 +453,6 @@ function handleCardClick(item, index) {
patient.active = patient.encounterId === item.encounterId;
});
patientInfo.value = item;
// console.log('patientInfo.value.cardNo:', patientInfo.value.cardNo)
// 将患者信息保存到store中供hospitalizationEmr组件使用
updatePatientInfo(item);
activeTab.value = 'hospitalizationEmr';
@@ -472,7 +460,6 @@ function handleCardClick(item, index) {
prescriptionRef.value.getListInfo();
tcmRef.value.getListInfo();
inspectionRef.value.getList();
surgeryRef.value.getList();
diagnosisRef.value.getList();
eprescriptionRef.value.getList();
// emrRef.value.getDetail(item.encounterId);
@@ -553,7 +540,7 @@ const onHospitalization = async () => {
ElMessage({
type: 'error',
message: '该患者,已办理入院,不允许重复办理',
});
});
}
};
</script>
@@ -742,14 +729,12 @@ const onHospitalization = async () => {
.disabled-wrapper .overlay {
position: absolute;
top: 50px;
top: 0;
left: 0;
width: 100%;
height: calc(100% - 50px);
height: 100%;
z-index: 999;
/* 确保覆盖在内容上方,但不覆盖顶部按钮区域 */
/* 确保覆盖在内容上方 */
cursor: not-allowed;
background-color: rgba(255, 255, 255, 0.01);
pointer-events: auto;
}
</style>