diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 7e53a84..40357dd 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -71,7 +71,7 @@ 关于 diff --git a/src/views/cases/components/UltrasoundReportPrint.vue b/src/views/cases/components/UltrasoundReportPrint.vue index 78ce769..581a6a6 100644 --- a/src/views/cases/components/UltrasoundReportPrint.vue +++ b/src/views/cases/components/UltrasoundReportPrint.vue @@ -207,46 +207,25 @@ export default { // 打印处理 handlePrint() { // 创建隐藏的打印窗口 - const printWindow = window.open('', '_blank', 'width=800,height=600'); - + const printWindow = window.open("", "_blank", "width=800,height=600"); + if (!printWindow) { - this.$message.error('请允许弹出窗口以进行打印'); + this.$message.error("请允许弹出窗口以进行打印"); return; } // 获取打印区域内容 const printContent = this.$refs.printContent.innerHTML; - + // 构建完整的HTML文档 - const printDoc = ` - - - - - 超声检查报告单 - - - - ${printContent} - - - `; + const printDoc = `${printContent}`; // 写入打印窗口 printWindow.document.write(printDoc); printWindow.document.close(); // 等待页面加载完成后打印 - printWindow.onload = function() { + printWindow.onload = function () { printWindow.focus(); setTimeout(() => { printWindow.print(); @@ -278,25 +257,12 @@ export default { /* 打印样式适配 */ @media print { - .el-dialog, - .el-dialog__footer { - display: none !important; - } .print-container { padding: 0; height: auto; overflow: visible; } - /* .footer { - position: fixed !important; - bottom: 20px; - } */ } -/* .footer { - position: absolute; - bottom: 20px; - width: 98%; -} */ body { font-family: "SimSun", "宋体", sans-serif; } @@ -306,6 +272,6 @@ table { hr { height: 2px; border: none; - border-top: 2px solid #000000; + border-top: 2px solid #909399; } \ No newline at end of file diff --git a/src/views/cases/detail.vue b/src/views/cases/detail.vue index 8628d0f..f383559 100644 --- a/src/views/cases/detail.vue +++ b/src/views/cases/detail.vue @@ -501,16 +501,29 @@ :gender-list="genderList" :age-unit-list="ageUnitList" /> + + +