fix(common): 统一异常处理并迁移打印功能到hiprint
- 替换所有System.out.println和printStackTrace为slf4j日志记录 - 在BeanUtils、AuditFieldUtil、DateUtils、ServletUtils等工具类中添加Logger实例 - 在Flowable相关控制器和服务中统一错误日志记录格式 - 在代码生成器中添加日志记录功能 - 将前端打印组件从Lodop迁移到hiprint打印方案 - 更新体温单打印功能使用hiprint预览打印 - 移除调试用的console.log语句 - 修复打印模板中线条元素类型定义
This commit is contained in:
@@ -1348,6 +1348,8 @@
|
||||
<script setup>
|
||||
import {computed, reactive, ref} from 'vue';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
// 迁移到 hiprint
|
||||
import { previewPrint } from '@/utils/printUtils.js';
|
||||
|
||||
const userStore = useUserStore();
|
||||
const bodyRef = ref();
|
||||
@@ -1390,32 +1392,11 @@ const closePrintPreview = () => {
|
||||
showPrintPreview.value = false;
|
||||
};
|
||||
|
||||
// 处理打印逻辑
|
||||
// 处理打印逻辑 - 使用 hiprint
|
||||
const handlePrint = () => {
|
||||
if (!printContentRef.value) return;
|
||||
|
||||
// 创建打印窗口
|
||||
const printWindow = window.open('', '_blank');
|
||||
// 复制打印内容到新窗口
|
||||
printWindow.document.write(`
|
||||
<html>
|
||||
<head>
|
||||
<title>打印预览</title>
|
||||
<style>
|
||||
body { font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif; padding: 20px; }
|
||||
* { box-sizing: border-box; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
${printContentRef.value.innerHTML}
|
||||
</body>
|
||||
</html>
|
||||
`);
|
||||
printWindow.document.close();
|
||||
// 执行打印
|
||||
printWindow.print();
|
||||
// 关闭打印窗口(可选)
|
||||
printWindow.close();
|
||||
// 使用 hiprint 预览打印
|
||||
previewPrint(printContentRef.value);
|
||||
};
|
||||
|
||||
const getDom = () => {
|
||||
|
||||
Reference in New Issue
Block a user