Browse Source

fix:修改bug

wangsisi 4 months ago
parent
commit
29e0171929
2 changed files with 17 additions and 5 deletions
  1. 16 4
      src/views/authentic/Pdf.vue
  2. 1 1
      src/views/authentic/index.vue

+ 16 - 4
src/views/authentic/Pdf.vue

@@ -45,8 +45,10 @@
               </tr>
             </table>
             <div class="a4_sub_title">地块四至图</div>
-            <img class="img" width="595" height="500" v-if="imgUrl"  :src="imgUrl" />
-            <div class="img" v-else ref="mapRef" id="mapRefId"></div>
+            <div class="img_box" >
+              <img class="img-content img" style="z-index: 999" width="595" height="500" v-if="imgUrl"  :src="imgUrl" />
+              <div class="img-content" v-if="!imgUrl" ref="mapRef" id="mapRefId"></div>
+            </div>
             <div class="signature">签名:______________</div>
           </div>
         </div>
@@ -98,7 +100,7 @@ let printObj = {
   id:"printTest",
   popTitle: 'good print',
   beforeOpenCallback (vue) {
-    // toImg(pdfMap.kmap.map)
+    toImg(pdfMap.kmap.map)
     console.log('打开之前')
   },
   openCallback (vue) {
@@ -264,10 +266,20 @@ $body-height:calc(100% - $title-height);
         font-weight: normal;
       }
     }
-    .img{
+    .img_box{
+      position: relative;
       width:595px;
       height: 500px;
       z-index: 1000;
+      .img-content{
+        position: absolute;
+        width:595px;
+        height: 500px;
+        z-index: 1000;
+      }
+      .img{
+        z-index: 999;
+      }
     }
     .signature{
       width:595px;

+ 1 - 1
src/views/authentic/index.vue

@@ -565,7 +565,7 @@ const handleDowload = () => {
     "masterTel",
     "points",
   ];
-  const fileName = "农场数据" + dateFormat(new Date(), "YYYY-mm-dd");
+  const fileName = "农场数据" + dateFormat(new Date(), "YYYY-mm");
   exportExcel(gridData.value, fieldLabels, fieldKeys, fileName);
 };