住院护士站-》医嘱执行页面:勾选医嘱后点击“执行选中”按钮无反应,无法完成执行操作.
疾病报告管理-》报告卡管理:审核报卡界面内容与门诊医生站登记界面不一致
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
>
|
||||
<template #header>
|
||||
<el-card class="report-header" shadow="never">
|
||||
<h1 class="report-title">中华人民共和国传染病报告卡</h1>
|
||||
<h1 class="report-title">{{ title }}</h1>
|
||||
<el-space align="center" class="card-number-row">
|
||||
<span class="card-number-label">卡片编号:</span>
|
||||
<el-input
|
||||
@@ -17,13 +17,14 @@
|
||||
class="card-number-input"
|
||||
placeholder="单位自编,与网络直报一致"
|
||||
maxlength="12"
|
||||
:disabled="readOnly"
|
||||
/>
|
||||
</el-space>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<el-card class="report-form" shadow="never">
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-position="top">
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-position="top" :disabled="readOnly">
|
||||
<!-- 患者姓名、家长姓名、身份证号 -->
|
||||
<el-row :gutter="16" class="form-row">
|
||||
<el-col :span="8" class="form-item">
|
||||
@@ -503,14 +504,17 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<slot name="append" :form="form" />
|
||||
</el-card>
|
||||
|
||||
<template #footer>
|
||||
<el-space :size="16" justify="center" class="dialog-footer-space" style="display: flex; justify-content: center; width: 100%;">
|
||||
<el-button type="primary" @click="handleSubmit" :loading="submitLoading" class="blue-button">保 存</el-button>
|
||||
<el-button type="info" @click="handleClose">关 闭</el-button>
|
||||
<el-button type="danger" @click="handleReset">重 置</el-button>
|
||||
</el-space>
|
||||
<slot name="footer" :close="handleClose" :submit-loading="submitLoading">
|
||||
<el-space :size="16" justify="center" class="dialog-footer-space" style="display: flex; justify-content: center; width: 100%;">
|
||||
<el-button v-if="!readOnly" type="primary" @click="handleSubmit" :loading="submitLoading" class="blue-button">保 存</el-button>
|
||||
<el-button type="info" @click="handleClose">关 闭</el-button>
|
||||
<el-button v-if="!readOnly" type="danger" @click="handleReset">重 置</el-button>
|
||||
</el-space>
|
||||
</slot>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@@ -545,6 +549,14 @@ const formRef = ref(null);
|
||||
const submitLoading = ref(false);
|
||||
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: '中华人民共和国传染病报告卡',
|
||||
},
|
||||
readOnly: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
@@ -1010,6 +1022,117 @@ function parseBirthDate(birthDate) {
|
||||
};
|
||||
}
|
||||
|
||||
function normalizeDate(value) {
|
||||
if (!value) return '';
|
||||
return String(value).split(/[T ]/)[0];
|
||||
}
|
||||
|
||||
function normalizeSex(value) {
|
||||
if (value === '1' || value === 1 || value === '男') return '男';
|
||||
if (value === '2' || value === 2 || value === '女') return '女';
|
||||
return '未知';
|
||||
}
|
||||
|
||||
function normalizeAgeUnit(value) {
|
||||
const ageUnitMap = {
|
||||
1: '岁',
|
||||
2: '月',
|
||||
3: '天',
|
||||
'1': '岁',
|
||||
'2': '月',
|
||||
'3': '天',
|
||||
'岁': '岁',
|
||||
'月': '月',
|
||||
'天': '天',
|
||||
};
|
||||
return ageUnitMap[value] || '岁';
|
||||
}
|
||||
|
||||
function getDiseaseSelection(diseaseCode) {
|
||||
const code = diseaseCode ? String(diseaseCode) : '';
|
||||
return {
|
||||
selectedClassA: code.startsWith('01') ? code : '',
|
||||
selectedClassB: code.startsWith('02') ? code : '',
|
||||
selectedClassC: code.startsWith('03') ? code : '',
|
||||
};
|
||||
}
|
||||
|
||||
function resetAddressSelector() {
|
||||
provinceCode.value = '';
|
||||
cityCode.value = '';
|
||||
countyCode.value = '';
|
||||
townCode.value = '';
|
||||
cityOptions.value = [];
|
||||
countyOptions.value = [];
|
||||
townOptions.value = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* 以只读详情方式打开报卡弹窗,供报卡管理等页面复用医生站报卡样式。
|
||||
* @param {Object} reportData - 报卡详情数据
|
||||
*/
|
||||
function showReport(reportData = {}) {
|
||||
dialogVisible.value = true;
|
||||
|
||||
resetAddressSelector();
|
||||
initProvinceOptions();
|
||||
|
||||
const birthInfo = parseBirthDate(reportData.birthday || reportData.birthDate);
|
||||
const diseaseCode = reportData.diseaseCode ? String(reportData.diseaseCode) : '';
|
||||
const diseaseSelection = getDiseaseSelection(diseaseCode);
|
||||
|
||||
form.value = {
|
||||
cardNo: reportData.cardNo || '',
|
||||
patName: reportData.patName || reportData.patientName || '',
|
||||
parentName: reportData.parentName || '',
|
||||
idNo: reportData.idNo || '',
|
||||
sex: normalizeSex(reportData.sex),
|
||||
birthYear: birthInfo.year,
|
||||
birthMonth: birthInfo.month,
|
||||
birthDay: birthInfo.day,
|
||||
age: reportData.age != null ? String(reportData.age) : '',
|
||||
ageUnit: normalizeAgeUnit(reportData.ageUnit),
|
||||
workplace: reportData.workplace || '',
|
||||
phone: reportData.phone || '',
|
||||
contactPhone: reportData.contactPhone || '',
|
||||
addressProv: reportData.addressProv || '',
|
||||
addressCity: reportData.addressCity || '',
|
||||
addressCounty: reportData.addressCounty || '',
|
||||
addressTown: reportData.addressTown || '',
|
||||
addressVillage: reportData.addressVillage || '',
|
||||
addressHouse: reportData.addressHouse || '',
|
||||
patientBelong: reportData.patientBelong || 1,
|
||||
occupation: reportData.occupation || '',
|
||||
caseClass: reportData.caseClass != null ? String(reportData.caseClass) : '',
|
||||
onsetDate: normalizeDate(reportData.onsetDate),
|
||||
diagDate: normalizeDate(reportData.diagDate),
|
||||
deathDate: normalizeDate(reportData.deathDate),
|
||||
selectedDiseases: diseaseCode && diseaseCode !== 'OTHER' ? [diseaseCode] : [],
|
||||
selectedClassA: diseaseSelection.selectedClassA,
|
||||
selectedClassB: diseaseSelection.selectedClassB,
|
||||
selectedClassC: diseaseSelection.selectedClassC,
|
||||
otherDisease: reportData.otherDisease || (diseaseCode === 'OTHER' ? reportData.diseaseName || '' : ''),
|
||||
diseaseType: reportData.diseaseType || '',
|
||||
reportOrg: reportData.reportOrg || '',
|
||||
reportOrgPhone: reportData.reportOrgPhone || '',
|
||||
reportDoc: reportData.reportDoc || '',
|
||||
reportDate: normalizeDate(reportData.reportDate || reportData.createdAt),
|
||||
correctName: reportData.correctName || '',
|
||||
withdrawReason: reportData.withdrawReason || '',
|
||||
remark: reportData.remark || '',
|
||||
encounterId: reportData.encounterId || reportData.visitId || '',
|
||||
patientId: reportData.patientId || reportData.patId || '',
|
||||
diagnosisId: reportData.diagnosisId || reportData.diagId || '',
|
||||
};
|
||||
|
||||
initAddressByName(
|
||||
form.value.addressProv,
|
||||
form.value.addressCity,
|
||||
form.value.addressCounty,
|
||||
form.value.addressTown
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 从身份证号自动解析出生日期和性别
|
||||
* @param {string} idNo - 身份证号码(15位或18位)
|
||||
@@ -1118,13 +1241,7 @@ function show(diagnosisData) {
|
||||
dialogVisible.value = true;
|
||||
|
||||
// 重置地址选择器状态
|
||||
provinceCode.value = '';
|
||||
cityCode.value = '';
|
||||
countyCode.value = '';
|
||||
townCode.value = '';
|
||||
cityOptions.value = [];
|
||||
countyOptions.value = [];
|
||||
townOptions.value = [];
|
||||
resetAddressSelector();
|
||||
|
||||
// 初始化省级地址选项
|
||||
initProvinceOptions();
|
||||
@@ -1502,7 +1619,7 @@ function handleClose() {
|
||||
emit('close');
|
||||
}
|
||||
|
||||
defineExpose({ show });
|
||||
defineExpose({ show, showReport, close: handleClose });
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user