Browse Source

检查、心电等打印

lighter 9 months ago
parent
commit
d9206a3d80
1 changed files with 9 additions and 5 deletions
  1. 9 5
      src/views/examination/InspectionReportIndex.vue

+ 9 - 5
src/views/examination/InspectionReportIndex.vue

@@ -55,7 +55,6 @@
           icon="Printer"
           :disabled="inPrintProcess"
           @click="beforePrint"
-          v-if="reportCategory === 'JY'"
       >
         打印
       </el-button>
@@ -68,7 +67,7 @@
             stripe highlight-current-row
             @row-click="beforeQueryDetail"
         >
-          <el-table-column type="selection" width="30"></el-table-column>
+          <el-table-column v-if="reportCategory === 'JY' " type="selection" width="30"></el-table-column>
           <el-table-column prop="trscDate" label="报告时间" width="130"></el-table-column>
           <el-table-column prop="examPurpose" label="检验名称" width="170"></el-table-column>
           <el-table-column v-if="reportCategory === 'JY'" prop="reportType" label="报告类别" width="70"></el-table-column>
@@ -325,7 +324,8 @@ function doPrint() {
   return new Promise((resolve) => {
     const LODOP = getLodop()
     LODOP.PRINT_INIT('jyjc')
-    LODOP.SET_PRINT_PAGESIZE(1, '210mm', '267MM', 'CreateCustomPage');
+    const ori = reportCategory.value === 'XD' ? 2 : 1
+    LODOP.SET_PRINT_PAGESIZE(ori, '210mm', '267MM', 'CreateCustomPage');
     LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) //宽度溢出缩放
     if (reportCategory.value === 'JY') {
       for (let i = 0; i < jyDataList.value.length; i++) {
@@ -334,8 +334,12 @@ function doPrint() {
         LODOP.NEWPAGE()
       }
     } else {
-      const printarea = document.getElementById('reportDetail').innerHTML
-      LODOP.ADD_PRINT_HTM(0, 0, '210mm', '267MM', printarea);
+      const imgUrl = reportCategory.value === 'JC' ?
+          jcbg.value.reportUrl : blxdUrl.value
+      LODOP.ADD_PRINT_IMAGE(0, 0, '210mm', '267MM', imgUrl)
+      LODOP.SET_PRINT_STYLEA(0,"Horient",3);
+      LODOP.SET_PRINT_STYLEA(0,"Vorient",3);
+      LODOP.SET_PRINT_STYLEA(0,"Stretch",1);
     }
     LODOP.PRINT()
     resolve()