Selaa lähdekoodia

检验报告打印小小优化一下

lighter 10 kuukautta sitten
vanhempi
commit
64a829dad7

+ 4 - 4
src/views/examination/InspectionReportIndex.vue

@@ -80,7 +80,7 @@
            min-height: 96%; padding: 0 30px;
            background-color: white; overflow-y: auto"
       >
-        <div v-if="reportCategory === 'JY'" style="height: 100%">
+        <div v-if="reportCategory === 'JY'" style="height: 98%">
           <div v-for="(jyData, index) in jyDataList" :id="'jyData'+index" style="height: 100%">
             <JyResult :data="jyData" />
           </div>
@@ -326,10 +326,10 @@ function doPrint() {
     LODOP.PRINT_INIT('jyjc')
     LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) //宽度溢出缩放
     if (reportCategory.value === 'JY') {
-      LODOP.SET_PRINT_PAGESIZE(2, '148mm', '210mm', 'CreateCustomPage');
+      LODOP.SET_PRINT_PAGESIZE(2, 0, 0, 'A5');
       for (let i = 0; i < jyDataList.value.length; i++) {
         const printarea = document.getElementById("jyData" + i).innerHTML;
-        LODOP.ADD_PRINT_HTM(0, 0, '210mm', '148mm', printarea);
+        LODOP.ADD_PRINT_HTM(0, 0, '208mm', '146mm', printarea);
         LODOP.NEWPAGE()
       }
     } else {
@@ -342,7 +342,7 @@ function doPrint() {
       LODOP.SET_PRINT_STYLEA(0,"Vorient",3);
       LODOP.SET_PRINT_STYLEA(0,"Stretch",1);
     }
-    LODOP.PRINT()
+    LODOP.PREVIEW()
     resolve()
   })
 }

+ 5 - 4
src/views/examination/component/JyResult.vue

@@ -1,7 +1,8 @@
 <template>
-  <div style="position: relative; padding: 0 12px; height: 100%; font-size: 12px">
-    <h3 style="width: 100%; text-align: center; font-weight: bold; height: 30px; line-height: 30px">
-      长沙泰和医院检验报告单</h3>
+  <div style="position: relative; padding: 0 12px; height: 96%; font-size: 12px">
+    <h3 style="width: 100%; text-align: center; font-weight: bold; height: 30px; line-height: 35px">
+      长沙泰和医院检验报告单
+    </h3>
     <div style="display: flex">
       <div style="width: 25%">姓名:{{ data.inspectionDetail.order.ptntName }}</div>
       <div style="width: 25%">性别:{{ filterSex(data.inspectionDetail.order.ptntSex) }}</div>
@@ -163,7 +164,7 @@
         </div>
       </div>
     </div>
-    <div style="position: absolute; bottom: 0; left: 0; right: 0">
+    <div style="position: absolute; bottom: 10px; left: 0; right: 0">
       <div style="margin: 5px 0; border-top: 1px solid gray"></div>
       <div style="display: flex">
         <div style="width: 8%"></div>