From 2d705d2f8122413b90bc9a8565a6814a19c7d3ff Mon Sep 17 00:00:00 2001 From: Ranyunqiao <2499115710@qq.com> Date: Fri, 27 Mar 2026 10:44:11 +0800 Subject: [PATCH] =?UTF-8?q?251=20=E6=89=8B=E6=9C=AF=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E3=80=8B=E9=97=A8=E8=AF=8A=E6=89=8B=E6=9C=AF=E5=AE=89=E6=8E=92?= =?UTF-8?q?=EF=BC=9A=E3=80=90=E6=96=B0=E5=A2=9E=E6=89=8B=E6=9C=AF=E5=AE=89?= =?UTF-8?q?=E6=8E=92=E3=80=91=E7=95=8C=E9=9D=A2=E5=AE=89=E6=8E=92=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=AD=97=E6=AE=B5=E7=9A=84=E6=97=B6=E5=88=86=E7=A7=92?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E9=80=89=E5=80=BC=E5=92=8C=E6=9C=AA=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=20252=20=E6=89=8B=E6=9C=AF=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E3=80=8B=E9=97=A8=E8=AF=8A=E6=89=8B=E6=9C=AF=E5=AE=89=E6=8E=92?= =?UTF-8?q?=EF=BC=9A=E3=80=90=E6=96=B0=E5=A2=9E=E6=89=8B=E6=9C=AF=E5=AE=89?= =?UTF-8?q?=E6=8E=92=E3=80=91=E7=95=8C=E9=9D=A2=E7=9A=84=E9=BA=BB=E9=86=89?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E5=AD=97=E6=AE=B5=E6=9C=AA=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=8F=96=E5=80=BC=E4=BA=8E=E6=89=8B=E6=9C=AF=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E7=9A=84=E9=BA=BB=E9=86=89=E6=96=B9=E5=BC=8F=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=9A=84=E5=80=BC=20254=20=E6=89=8B=E6=9C=AF=E7=AE=A1=E7=90=86?= =?UTF-8?q?-=E3=80=8B=E9=97=A8=E8=AF=8A=E6=89=8B=E6=9C=AF=E7=AE=A1?= =?UTF-8?q?=E7=90=86=EF=BC=9A=E3=80=90=E6=96=B0=E5=A2=9E=E6=89=8B=E6=9C=AF?= =?UTF-8?q?=E5=AE=89=E6=8E=92=E3=80=91=E7=95=8C=E9=9D=A2=E7=9A=84=E5=88=87?= =?UTF-8?q?=E5=8F=A3=E7=B1=BB=E5=9E=8B=E5=AD=97=E6=AE=B5=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E9=80=89=E9=A1=B9=E6=9C=AA=E5=8F=96=E5=80=BC=20277=20=E9=97=A8?= =?UTF-8?q?=E8=AF=8A=E5=8C=BB=E7=94=9F=E7=AB=99-=E3=80=8B=E6=89=8B?= =?UTF-8?q?=E6=9C=AF=E7=94=B3=E8=AF=B7TAB=E9=A1=B5=E9=9D=A2=EF=BC=9A?= =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91/=E3=80=90=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E3=80=91=E7=95=8C=E9=9D=A2=E7=82=B9=E5=87=BB=E3=80=90?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=94=B3=E8=AF=B7=E3=80=91=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=88=90=E5=8A=9F=E4=B9=9F=E6=8F=90=E7=A4=BA=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/RequestFormPageDto.java | 12 +++ .../RequestFormManageAppMapper.xml | 9 +- .../components/surgery/surgeryApplication.vue | 25 +++--- .../src/views/surgicalschedule/index.vue | 87 +++++-------------- 4 files changed, 54 insertions(+), 79 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/dto/RequestFormPageDto.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/dto/RequestFormPageDto.java index 60f10663..d4ee012e 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/dto/RequestFormPageDto.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/dto/RequestFormPageDto.java @@ -81,4 +81,16 @@ public class RequestFormPageDto { * 费用类别 */ private String feeType; + /** + * 麻醉方式 + */ + private Integer anesthesiaTypeEnum; + /** + * 切口等级 + */ + private Integer incisionLevel; + /** + * 手术等级 + */ + private Integer surgeryLevel; } diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml index d9c80ca5..64725f1a 100644 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml @@ -64,6 +64,9 @@ + + + @@ -85,7 +88,9 @@ cs.apply_dept_id, cs.apply_dept_name, cs.surgery_type_enum, - cs.status_enum, + cs.anesthesia_type_enum, + cs.incision_level, + cs.surgery_level, fc.contract_name AS fee_type FROM doc_request_form drf LEFT JOIN cli_surgery cs ON cs.surgery_no = drf.prescription_no @@ -107,8 +112,6 @@ AND cs.apply_dept_id = #{requestFormDto.applyDeptId} AND drf.delete_flag = '0' - - AND (cs.status_enum IS NULL OR cs.status_enum != 4) ORDER BY drf.create_time DESC diff --git a/openhis-ui-vue3/src/views/doctorstation/components/surgery/surgeryApplication.vue b/openhis-ui-vue3/src/views/doctorstation/components/surgery/surgeryApplication.vue index 43471171..5d5287f8 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/surgery/surgeryApplication.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/surgery/surgeryApplication.vue @@ -636,7 +636,7 @@ function getList() { surgeryList.value = res.data.records || [] }).catch(error => { console.error('获取手术列表失败:', error) - proxy.$message.error('数据加载失败,请稍后重试') + proxy.$modal.msgError('数据加载失败,请稍后重试') surgeryList.value = [] }).finally(() => { loading.value = false @@ -715,14 +715,14 @@ function loadDoctorList() { // 新增 function handleAdd() { if (!props.patientInfo?.encounterId) { - proxy.$message.warning('请先选择患者') + proxy.$modal.msgWarning('请先选择患者') return } - + title.value = '新增手术申请' open.value = true reset() - + // 自动填充患者信息 form.value.patientId = props.patientInfo.patientId form.value.encounterId = props.patientInfo.encounterId @@ -737,7 +737,7 @@ function handleAdd() { if (doctorList.value.length === 0) { loadDoctorList() } - + // 加载诊断信息 loadDiagnosisInfo() } @@ -1049,32 +1049,33 @@ function submitForm() { // 新增手术 addSurgery(form.value).then((res) => { if (res.code === 200) { - proxy.$modal.msgSuccess('新增成功') - //保存麻醉方式 + proxy.$modal.msgSuccess(res.msg || '新增成功') + // 保存麻醉方式 sessionStorage.setItem('anesthesiaType', form.value.anesthesiaTypeEnum) open.value = false getList() } else { - proxy.$modal.msgError(res.msg || '新增手术失败') + proxy.$modal.msgError(res.msg || '新增手术失败,请检查表单信息') } }).catch(error => { console.error('新增手术失败:', error) - proxy.$modal.msgError('新增手术失败,请稍后重试') + proxy.$modal.msgError('新增手术失败,请检查表单信息') }) } else { // 修改手术 updateSurgery(form.value).then((res) => { if (res.code === 200) { - proxy.$modal.msgSuccess('修改成功') + proxy.$modal.msgSuccess(res.msg || '修改成功') + // 保存麻醉方式 sessionStorage.setItem('anesthesiaType', form.value.anesthesiaTypeEnum) open.value = false getList() } else { - proxy.$modal.msgError(res.msg || '修改手术失败') + proxy.$modal.msgError(res.msg || '更新手术失败,请检查表单信息') } }).catch(error => { console.error('更新手术失败:', error) - proxy.$modal.msgError('更新手术失败,请稍后重试') + proxy.$modal.msgError('更新手术失败,请检查表单信息') }) } } else { diff --git a/openhis-ui-vue3/src/views/surgicalschedule/index.vue b/openhis-ui-vue3/src/views/surgicalschedule/index.vue index 77423c3d..cba48347 100644 --- a/openhis-ui-vue3/src/views/surgicalschedule/index.vue +++ b/openhis-ui-vue3/src/views/surgicalschedule/index.vue @@ -101,7 +101,7 @@ @@ -259,7 +259,6 @@ placeholder="选择安排时间" value-format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD HH:mm:ss" - :default-time="new Date(2026, 0, 1, 8, 0, 0)" style="width: 100%" /> @@ -446,7 +445,7 @@ v-for="item in anesthesiaList" :key="item.value" :label="item.label" - :value="item.value" + :value="Number(item.value)" /> @@ -611,7 +610,7 @@ v-for="item in incisionTypeList" :key="item.value" :label="item.label" - :value="item.value" + :value="Number(item.value)" /> @@ -748,17 +747,15 @@ + + + - - - @@ -889,6 +886,9 @@ const form = reactive({ allergyRemark: undefined, surgeryNature: undefined, surgerySite: undefined, + incisionLevel: undefined, + surgeryLevel: undefined, + admissionTime: undefined, entryTime: undefined, roomCode: undefined, @@ -1707,44 +1707,6 @@ function getAnesthesiaName(anesMethod) { return anesthesia ? anesthesia.label : '' } -// 获取状态标签类型 -function getStatusTagType(statusEnum) { - const typeMap = { - 0: 'info', // 新开/待排期 - 1: 'warning', // 已排期 - 2: 'primary', // 手术中 - 3: 'success', // 已完成 - 4: 'danger', // 已取消 - 5: 'info' // 暂停 - } - return typeMap[statusEnum] || 'info' -} - -// 获取状态文本 -function getStatusText(statusEnum) { - const textMap = { - 0: '待排期', - 1: '已排期', - 2: '手术中', - 3: '已完成', - 4: '已取消', - 5: '暂停' - } - return textMap[statusEnum] || '未知' -} - -// 将麻醉名称映射为枚举值 -function mapAnesthesiaNameToValue(name) { - if (!name) return undefined - if (name.includes('局部')) return '1' - if (name.includes('区域')) return '2' - if (name.includes('全身') || name.includes('全麻')) return '3' - if (name.includes('脊椎')) return '4' - if (name.includes('硬膜外')) return '5' - if (name.includes('表面')) return '6' - return undefined -} - // 根据出生日期计算年龄 function calculateAge(birthDay) { if (!birthDay) return '' @@ -1780,12 +1742,12 @@ function confirmApply() { const selectedRow = selectedRows[0] // 填充手术申请信息到表单 form.surgeryNo = selectedRow.surgeryNo // 手术单号对应填入手术单号 - form.applyId=selectedRow.applyId// 手术申请 id - form.patientId = selectedRow.patientId// 患者 id - form.visitId = selectedRow.encounterId // id 对应填入就诊 id + form.applyId=selectedRow.applyId// 手术申请id + form.patientId = selectedRow.patientId// 患者id + form.visitId = selectedRow.encounterId // id对应填入就诊id form.operCode = selectedRow.surgeryNo // 手术单号作为手术编码 - form.operName = selectedRow.descJson.surgeryName//手术名称 - form.preoperativeDiagnosis = selectedRow.descJson?.preoperativeDiagnosis || '' + form.operName = selectedRow.descJson?.surgeryName//手术名称 + form.preoperativeDiagnosis = selectedRow.preoperativeDiagnosis || selectedRow.descJson?.preoperativeDiagnosis form.patientName = selectedRow.name// 患者姓名对应填入患者姓名 form.gender = selectedRow.gender//患者性别 form.birthDay = selectedRow.birthDay//患者出生日期 @@ -1795,17 +1757,14 @@ function confirmApply() { form.applyTime = selectedRow.applyTime//申请时间 form.surgeryType = selectedRow.surgeryTypeEnum//手术类型 form.surgeryNature = selectedRow.surgeryTypeEnum//手术性质 - form.surgeonCode = selectedRow.mainSurgeonId//主刀医生 id + form.surgeonCode = selectedRow.mainSurgeonId//主刀医生id form.surgeonName = selectedRow.mainSurgeonName//主刀医生姓名 form.feeType = selectedRow.feeType//费用类别 - // Bug #252 修复:继承手术申请的麻醉方式 - if (selectedRow.descJson?.anesthesiaName) { - form.anesMethod = mapAnesthesiaNameToValue(selectedRow.descJson.anesthesiaName) - } - // Bug #253/#254 修复:继承手术申请的切口类型 - if (selectedRow.descJson?.incisionLevel) { - form.incisionType = String(selectedRow.descJson.incisionLevel) - } + form.anesMethod = selectedRow.anesthesiaTypeEnum != null ? Number(selectedRow.anesthesiaTypeEnum) : undefined //麻醉方法 + form.incisionType = selectedRow.incisionLevel != null ? Number(selectedRow.incisionLevel) : undefined //切口类型 + form.surgeryLevel = selectedRow.surgeryLevel != null ? Number(selectedRow.surgeryLevel) : (selectedRow.descJson?.surgeryLevel != null ? Number(selectedRow.descJson.surgeryLevel) : undefined) //手术等级 + form.surgerySite = selectedRow.descJson?.surgerySite //手术部位 + form.isolationType = selectedRow.descJson?.isolationType //隔离类型 showApplyDialog.value = false }