Browse Source

修改环境

shuhao 4 months ago
parent
commit
5279d5d972
1 changed files with 6 additions and 4 deletions
  1. 6 4
      src/views/authentic/Pdf.vue

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

@@ -98,7 +98,7 @@ let printObj = {
   id:"printTest",
   popTitle: 'good print',
   beforeOpenCallback (vue) {
-    // toImg(true)
+    toImg(true)
     console.log('打开之前')
   },
   openCallback (vue) {
@@ -129,9 +129,9 @@ const closeDialog = (key) => {
 function toImg(show) {
   let canvas = pdfMap.kmap.map.getViewport().querySelector('canvas')
   let dataURL = canvas.toDataURL('image/png');
-  if(show){
+  // if(show){
     imgUrl.value = dataURL;
-  }
+  // }
 }
 
 
@@ -141,7 +141,9 @@ onMounted(()=>{
     data.area = getAreaByWkt(data.geom)
     rowData.value = data
     pdfMap.initMap(data,mapRef.value)
-    // toImg(false)
+    setTimeout(function(){
+      toImg(false)
+    },1000)
   })
 })
 </script>