fix(common): 统一异常处理并迁移打印功能到hiprint
- 替换所有System.out.println和printStackTrace为slf4j日志记录 - 在BeanUtils、AuditFieldUtil、DateUtils、ServletUtils等工具类中添加Logger实例 - 在Flowable相关控制器和服务中统一错误日志记录格式 - 在代码生成器中添加日志记录功能 - 将前端打印组件从Lodop迁移到hiprint打印方案 - 更新体温单打印功能使用hiprint预览打印 - 移除调试用的console.log语句 - 修复打印模板中线条元素类型定义
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<script lang="ts" setup>
|
||||
import {ref} from 'vue';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
// 迁移到 hiprint
|
||||
import { previewPrint } from '@/utils/printUtils.js';
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
@@ -99,10 +101,14 @@ const signatures = ref<Signatures>({
|
||||
}, {} as Record<string, string>),
|
||||
});
|
||||
|
||||
// 5. 打印功能:控制打印范围+样式
|
||||
// 5. 打印功能:使用 hiprint
|
||||
const handlePrint = () => {
|
||||
// 1. 触发浏览器打印
|
||||
window.print();
|
||||
const printDom = document.querySelector('.medical-record');
|
||||
if (printDom) {
|
||||
previewPrint(printDom);
|
||||
} else {
|
||||
window.print();
|
||||
}
|
||||
};
|
||||
|
||||
// 暴露接口
|
||||
|
||||
@@ -233,6 +233,8 @@
|
||||
import {onMounted, reactive, ref} from 'vue';
|
||||
import intOperRecordSheet from '../views/hospitalRecord/components/intOperRecordSheet.vue';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
// 迁移到 hiprint
|
||||
import { previewPrint } from '@/utils/printUtils.js';
|
||||
|
||||
const userStore = useUserStore();
|
||||
const isShowprintDom = ref(false);
|
||||
@@ -393,11 +395,16 @@ const setFormData = (data) => {
|
||||
}
|
||||
};
|
||||
|
||||
// 打印功能
|
||||
// 打印功能 - 使用 hiprint
|
||||
const handlePrint = () => {
|
||||
formRef.value.validate((valid) => {
|
||||
if (valid) {
|
||||
window.print();
|
||||
const printDom = document.querySelector('.form-container');
|
||||
if (printDom) {
|
||||
previewPrint(printDom);
|
||||
} else {
|
||||
window.print();
|
||||
}
|
||||
} else {
|
||||
ElMessageBox.warning('请先完善表单信息再打印');
|
||||
}
|
||||
|
||||
@@ -214,6 +214,8 @@
|
||||
<script setup>
|
||||
import {onMounted, reactive, ref} from 'vue';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
// 迁移到 hiprint
|
||||
import { previewPrint } from '@/utils/printUtils.js';
|
||||
|
||||
const userStore = useUserStore();
|
||||
// 医院名称
|
||||
@@ -346,11 +348,16 @@ const setFormData = (data) => {
|
||||
}
|
||||
};
|
||||
|
||||
// 打印功能
|
||||
// 打印功能 - 使用 hiprint
|
||||
const handlePrint = () => {
|
||||
formRef.value.validate((valid) => {
|
||||
if (valid) {
|
||||
window.print();
|
||||
const printDom = document.querySelector('.form-container');
|
||||
if (printDom) {
|
||||
previewPrint(printDom);
|
||||
} else {
|
||||
window.print();
|
||||
}
|
||||
} else {
|
||||
ElMessageBox.warning('请先完善表单信息再打印');
|
||||
}
|
||||
|
||||
@@ -96,6 +96,8 @@ import {
|
||||
} from 'element-plus';
|
||||
import {patientInfo} from '../views/doctorstation/components/store/patient';
|
||||
import useUserStore from '../store/modules/user';
|
||||
// 迁移到 hiprint
|
||||
import { previewPrint } from '@/utils/printUtils.js';
|
||||
|
||||
defineOptions({
|
||||
name: 'tySurgicalRecord'
|
||||
@@ -165,12 +167,16 @@ const submit = () => {
|
||||
});
|
||||
};
|
||||
|
||||
// 打印功能
|
||||
// 打印功能 - 使用 hiprint
|
||||
const handlePrint = () => {
|
||||
formRef.value.validate((valid) => {
|
||||
if (valid) {
|
||||
// window.print();
|
||||
ElMessage.warning('打印功能待实现');
|
||||
const printDom = document.querySelector('.form-container');
|
||||
if (printDom) {
|
||||
previewPrint(printDom);
|
||||
} else {
|
||||
ElMessage.warning('未找到打印内容');
|
||||
}
|
||||
} else {
|
||||
ElMessage.warning('请先完善表单信息再打印');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user