fix(common): 统一异常处理并迁移打印功能到hiprint

- 替换所有System.out.println和printStackTrace为slf4j日志记录
- 在BeanUtils、AuditFieldUtil、DateUtils、ServletUtils等工具类中添加Logger实例
- 在Flowable相关控制器和服务中统一错误日志记录格式
- 在代码生成器中添加日志记录功能
- 将前端打印组件从Lodop迁移到hiprint打印方案
- 更新体温单打印功能使用hiprint预览打印
- 移除调试用的console.log语句
- 修复打印模板中线条元素类型定义
This commit is contained in:
2026-03-06 22:16:44 +08:00
parent 8ef334ba1b
commit b65841c0cc
58 changed files with 678 additions and 888 deletions

View File

@@ -352,6 +352,8 @@ import { ref, reactive, onMounted, computed } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { Search, Refresh, Printer, Edit, View, Delete } from '@element-plus/icons-vue'
import { queryConsultationListPage, cancelConsultation, saveConsultation } from './api'
// 迁移到 hiprint
import { simplePrint, PRINT_TEMPLATE } from '@/utils/printUtils.js'
const loading = ref(false)
const saving = ref(false)
@@ -477,12 +479,28 @@ const handleCurrentChange = (val) => {
loadData()
}
const handlePrint = () => {
const handlePrint = async () => {
if (!currentRow.value) {
ElMessage.warning('请先选择一条记录')
return
}
window.print()
try {
// 构建打印数据
const printData = {
patientName: currentRow.value.patientName || '',
gender: currentRow.value.genderText || '',
age: currentRow.value.age || '',
deptName: currentRow.value.department || '',
diagnosis: currentRow.value.provisionalDiagnosis || '',
consultationReason: currentRow.value.consultationPurpose || '',
applyTime: currentRow.value.applyTime || '',
applyDoctor: currentRow.value.requestingPhysician || ''
}
await simplePrint(PRINT_TEMPLATE.CONSULTATION, printData)
} catch (error) {
console.error('会诊申请单打印失败:', error)
ElMessage.error('打印失败')
}
}
const handleRowChange = (row) => {