소스 검색

检验报告打印改成A5

lighter 10 달 전
부모
커밋
69aa4ab9ec
2개의 변경된 파일47개의 추가작업 그리고 34개의 파일을 삭제
  1. 5 4
      src/views/examination/InspectionReportIndex.vue
  2. 42 30
      src/views/examination/component/JyResult.vue

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

@@ -324,19 +324,20 @@ function doPrint() {
   return new Promise((resolve) => {
     const LODOP = getLodop()
     LODOP.PRINT_INIT('jyjc')
-    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') {
+      LODOP.SET_PRINT_PAGESIZE(2, '148mm', '210mm', 'CreateCustomPage');
       for (let i = 0; i < jyDataList.value.length; i++) {
         const printarea = document.getElementById("jyData" + i).innerHTML;
-        LODOP.ADD_PRINT_HTM(0, 0, '210mm', '267MM', printarea);
+        LODOP.ADD_PRINT_HTM(0, 0, '210mm', '148mm', printarea);
         LODOP.NEWPAGE()
       }
     } else {
+      const ori = reportCategory.value === 'XD' ? 2 : 1
+      LODOP.SET_PRINT_PAGESIZE(ori, '210mm', '267mm', 'CreateCustomPage');
       const imgUrl = reportCategory.value === 'JC' ?
           jcbg.value.reportUrl : blxdUrl.value
-      LODOP.ADD_PRINT_IMAGE(0, 0, '210mm', '267MM', imgUrl)
+      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);

+ 42 - 30
src/views/examination/component/JyResult.vue

@@ -1,5 +1,5 @@
 <template>
-  <div style="position: relative; padding: 0 12px; height: 100%">
+  <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="display: flex">
@@ -27,11 +27,11 @@
     <div v-if="data.reportType === '普通' || data.reportType === '外送'" >
       <div style="display: inline-block; width: 49.7%; vertical-align: top">
         <div style="display: flex">
-          <div style="width: 25%">检验项目</div>
+          <div style="width: 30%">检验项目</div>
           <div style="width: 16.66%">结果</div>
           <div style="width: 16.66%">单位</div>
           <div style="width: 16.66%">说明</div>
-          <div style="width: 25%">参考值</div>
+          <div style="width: 20%">参考值</div>
         </div>
         <div style="margin: 5px 0; border-top: 1px solid gray"></div>
         <div
@@ -39,49 +39,49 @@
             :key="index"
             style="display: flex"
         >
-          <div style="width: 25%">
-            <div>{{ item.itmName.substring(0, 6) }}</div>
-            <div>{{ item.itmName.substring(6) }}</div>
+          <div style="width: 30%">
+            <div>{{ item.itmName.substring(0, 8) }}</div>
+            <div>{{ item.itmName.substring(8) }}</div>
           </div>
           <div style="width: 16.66%">
-            <div>{{ item.itmValue.substring(0, 6) }}</div>
-            <div>{{ item.itmValue.substring(6) }}</div>
-            <div>{{ item.itmStrValue.substring(0, 6) }}</div>
-            <div>{{ item.itmStrValue.substring(6) }}</div>
+            <div>{{ item.itmValue.substring(0, 8) }}</div>
+            <div>{{ item.itmValue.substring(8) }}</div>
+            <div>{{ item.itmStrValue.substring(0, 8) }}</div>
+            <div>{{ item.itmStrValue.substring(8) }}</div>
           </div>
           <div style="width: 16.66%">{{ item.itmUnit }}</div>
           <div style="width: 16.66%">
             <span v-html="getItemAlert(item.itmAlert, item.itmStrValue, item.itmValue)"></span>
           </div>
-          <div style="width: 25%">{{ item.range }}</div>
+          <div style="width: 20%">{{ item.range }}</div>
         </div>
       </div>
       <div style="display: inline-block; width: 49.7%; vertical-align: top">
         <div style="display: flex">
-          <div style="width: 25%">检验项目</div>
+          <div style="width: 30%">检验项目</div>
           <div style="width: 16.66%">结果</div>
           <div style="width: 16.66%">单位</div>
           <div style="width: 16.66%">说明</div>
-          <div style="width: 25%">参考值</div>
+          <div style="width: 20%">参考值</div>
         </div>
         <div style="margin: 5px 0; border-top: 1px solid gray"></div>
         <div v-for="(item, index) in data.inspectionDetail.items.slice(data.halfSize)" :key="index"
              style="display: flex">
-          <div style="width: 25%">
-            <div>{{ item.itmName.substring(0, 6) }}</div>
-            <div>{{ item.itmName.substring(6) }}</div>
+          <div style="width: 30%">
+            <div>{{ item.itmName.substring(0, 8) }}</div>
+            <div>{{ item.itmName.substring(8) }}</div>
           </div>
           <div style="width: 16.66%">
-            <div>{{ item.itmValue.substring(0, 6) }}</div>
-            <div>{{ item.itmValue.substring(6) }}</div>
-            <div>{{ item.itmStrValue.substring(0, 6) }}</div>
-            <div>{{ item.itmStrValue.substring(6) }}</div>
+            <div>{{ item.itmValue.substring(0, 8) }}</div>
+            <div>{{ item.itmValue.substring(8) }}</div>
+            <div>{{ item.itmStrValue.substring(0, 8) }}</div>
+            <div>{{ item.itmStrValue.substring(8) }}</div>
           </div>
           <div style="width: 16.66%">{{ item.itmUnit }}</div>
           <div style="width: 16.66%">
             <span v-html="getItemAlert(item.itmAlert, item.itmStrValue, item.itmValue)"></span>
           </div>
-          <div style="width: 25%">{{ item.range }}</div>
+          <div style="width: 20%">{{ item.range }}</div>
         </div>
       </div>
     </div>
@@ -125,8 +125,8 @@
               :key="index"
           >
             <div style="width: 33.33%">
-              <div>{{ bac.antiNameCn.substring(0, 6) }}</div>
-              <div>{{ bac.antiNameCn.substring(6) }}</div>
+              <div>{{ bac.antiNameCn.substring(0, 8) }}</div>
+              <div>{{ bac.antiNameCn.substring(8) }}</div>
             </div>
             <div style="width: 33.33%">{{ bac.antiAbb }}</div>
             <div style="width: 16.66%">{{ bac.antiMic }}</div>
@@ -147,8 +147,8 @@
               :key="index"
           >
             <div style="width: 33.33%">
-              <div>{{ bac.antiNameCn.substring(0, 6) }}</div>
-              <div>{{ bac.antiNameCn.substring(6) }}</div>
+              <div>{{ bac.antiNameCn.substring(0, 8) }}</div>
+              <div>{{ bac.antiNameCn.substring(8) }}</div>
             </div>
             <div style="width: 33.33%">{{ bac.antiAbb }}</div>
             <div style="width: 16.66%">{{ bac.antiMic }}</div>
@@ -166,16 +166,28 @@
     <div style="position: absolute; bottom: 0; left: 0; right: 0">
       <div style="margin: 5px 0; border-top: 1px solid gray"></div>
       <div style="display: flex">
-        <div style="width: 33.33%">接收时间:{{ data.inspectionDetail.order.aplyDate }}</div>
+        <div style="width: 8%"></div>
+        <div style="width: 25%;">
+          接收时间:{{ data.inspectionDetail.order.aplyDate }}
+        </div>
         <div style="width: 33.33%">
           检验时间:{{data.inspectionDetail.order.ordrCreateDate }}
         </div>
-        <div style="width: 33.33%">报告时间:{{ data.inspectionDetail.order.audtTime }}</div>
+        <div style="width: 33.33%">
+          报告时间:{{ data.inspectionDetail.order.audtTime }}
+        </div>
       </div>
       <div style="display: flex">
-        <div style="width: 33.33%">送检医生:{{ data.inspectionDetail.order.testUsrName }}</div>
-        <div style="width: 33.33%">检验人:{{ data.inspectionDetail.order.ordrUsrName }}</div>
-        <div style="width: 33.33%">审核人:{{ data.inspectionDetail.order.audtUsrName }}</div>
+        <div style="width: 8%"></div>
+        <div style="width: 25%;">
+          送检医生:{{ data.inspectionDetail.order.testUsrName }}
+        </div>
+        <div style="width: 33.33%">
+          检验人:{{ data.inspectionDetail.order.ordrUsrName }}
+        </div>
+        <div style="width: 33.33%">
+          审核人:{{ data.inspectionDetail.order.audtUsrName }}
+        </div>
       </div>
       <div style="margin: 5px 0; border-top: 1px solid gray"></div>
       <div style="width: 100%; text-align: center; font-weight: bold; height: 30px; font-size: 12px">