|
@@ -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>
|