From 99ea15208144cca227a9f144a071c4c32d03022a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=90=A6?= Date: Sat, 7 Feb 2026 09:41:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=A5=BF=E8=8D=AF=E8=AF=8A?= =?UTF-8?q?=E6=89=80=E5=BC=80=E4=B8=AD=E8=8D=AF=E5=A4=84=E6=96=B9=E7=9A=84?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/.env.production | 2 +- .../chat/components/PrescriptionModal.vue | 5 ++ .../views/doctor/doctor-reception/index.vue | 55 ++++++++++--------- 3 files changed, 36 insertions(+), 26 deletions(-) diff --git a/apps/web-antd/.env.production b/apps/web-antd/.env.production index 7a4e8f19..f56882a7 100644 --- a/apps/web-antd/.env.production +++ b/apps/web-antd/.env.production @@ -5,7 +5,7 @@ VITE_BASE=/ VITE_GLOB_API_URL=/api/admin # 是否开启压缩,可以设置为 none, brotli, gzip -VITE_COMPRESS=none +VITE_COMPRESS=gzip # 是否开启 PWA VITE_PWA=false diff --git a/apps/web-antd/src/views/business/chat/components/PrescriptionModal.vue b/apps/web-antd/src/views/business/chat/components/PrescriptionModal.vue index 8d73c052..1bdae0f0 100644 --- a/apps/web-antd/src/views/business/chat/components/PrescriptionModal.vue +++ b/apps/web-antd/src/views/business/chat/components/PrescriptionModal.vue @@ -122,6 +122,11 @@ const [Modal, modalApi] = useVbenModal({ prescriptionStore.loadFromLocalStorage(); // 获取挂号诊所信息 await prescriptionStore.fetchRegisterStoreInfo(); + + // 如果恢复的处方类型是中药,检测并显示转诊提示 + if (prescriptionStore.activeCategory === 1) { + await checkAndShowTransferTip(); + } } else { console.warn('未提供registerId'); } diff --git a/apps/web-antd/src/views/doctor/doctor-reception/index.vue b/apps/web-antd/src/views/doctor/doctor-reception/index.vue index e03e4dbc..170063cc 100644 --- a/apps/web-antd/src/views/doctor/doctor-reception/index.vue +++ b/apps/web-antd/src/views/doctor/doctor-reception/index.vue @@ -354,7 +354,7 @@ const selectPatient = (patient: Patient, isUpdateTabType = true) => { } } activePatient.value = patient.user_patient; - + // 恢复之前保存的 activeCategory const savedCategory = localStorage.getItem(`activeCategory${patient.user_patient?.id}`); if (savedCategory) { @@ -371,6 +371,11 @@ const selectPatient = (patient: Patient, isUpdateTabType = true) => { // 否则保持默认值 } + // 如果恢复的处方类型是中药,检测并显示转诊提示 + if (activeCategory.value === 1) { + checkAndShowTransferTip(); + } + getPatientItem(patient.id).then((value) => { patientInfo.value = value; userPatientHealthInquiry.value = value.user_patient_health_inquiry; @@ -578,11 +583,11 @@ const sendPrescription = () => { doctor_second_sign: doctorSecondSign.value, }).then((res) => { message.success('处方已发送'); - + // 检查是否需要转诊 const needTransfer = res?.result?.need_transfer || res?.data?.need_transfer || res?.need_transfer; const transferPrescriptionId = res?.result?.transfer_prescription_id || res?.data?.transfer_prescription_id || res?.transfer_prescription_id; - + if (needTransfer && transferPrescriptionId) { // 如果需要转诊,获取转诊信息 fetchTransferPrescription(transferPrescriptionId); @@ -591,7 +596,7 @@ const sendPrescription = () => { // 不需要转诊,清空转诊信息 transferPrescription.value = null; } - + // 清空当前数据 currentDrugs.value = []; diagnosis.value = ''; @@ -603,7 +608,7 @@ const sendPrescription = () => { tabType.value = 1; newDrugInfo.value = {}; updateLocalStorage(); - + // 刷新患者信息 if (selectPatientId.value) { getPatientItem(selectPatientId.value).then((value) => { @@ -797,7 +802,7 @@ async function handleSelectCommonPrescription(data: any, type: number) { dosage.value = prescription.dosage ?? 7; dayDosage.value = prescription.day_dosage ?? 2; packageMethodId.value = prescription.package_method_id ?? 2; - + // 如果是委托调剂,写入完整加工规则配置 - 只有有效值才写入(大于0),级联加载 if (prescription.process_rule_id && prescription.process_rule_id > 0) { processRuleId.value = prescription.process_rule_id; @@ -989,11 +994,11 @@ function tabChange(id) { getStorageKey(activePatient.value?.id, activeCategory.value), JSON.stringify(currentDrugs.value), ); - + // 更新Tab类型 localStorage.setItem(`activeCategory${activePatient.value?.id}`, id); activeCategory.value = id; - + // 加载新Tab对应的药品数据 currentDrugs.value = JSON.parse( localStorage.getItem(getStorageKey(activePatient.value?.id, id)) || '[]', @@ -1523,7 +1528,7 @@ const newDrugInfo = ref({}); */ const fetchTransferPrescription = async (transferPrescriptionId: number) => { if (!transferPrescriptionId) return; - + loadingTransfer.value = true; try { // 通过转诊处方ID获取转诊信息 @@ -1810,13 +1815,13 @@ watch( item.created_at }} - {{ - item.prescription_type === 1 ? '中药处方' : - item.prescription_type === 2 ? '西药处方' : - item.prescription_type === 3 ? '保健食品' : - item.prescription_type === 5 ? '产品服务包' : - item.prescription_type === 6 ? '非药品' : - item.prescription_type === 7 ? '医疗器械' : + {{ + item.prescription_type === 1 ? '中药处方' : + item.prescription_type === 2 ? '西药处方' : + item.prescription_type === 3 ? '保健食品' : + item.prescription_type === 5 ? '产品服务包' : + item.prescription_type === 6 ? '非药品' : + item.prescription_type === 7 ? '医疗器械' : '未知类型' }} / {{ item.category === 1 ? '自费' : '医保' }} @@ -1835,7 +1840,7 @@ watch( - +
总计:¥{{ totalCost.toFixed(2) }}
- -