<template>
  <app-base>
    <div id="contentlarge"></div>
  </app-base>
</template>

<script>
import Comp from "./comp"

export default {

    ready() {

      // 设置模板为测试,,
      global.canvas = 'ShowAddress'
      global.myjson = Object.assign(global.myjson, {
        ShowAddress: {"template":{"type":"Extension","Slots":{"item":{"type":"DynamicTable","SingleWidth":"@110","Data":"stat.Data.towerInfo","TierHeight":"@80"}}},"Drag":{}}
      })
      loadWasm().then(() => {
        global.stat = new Comp()
        global.stat.ready().then(() => {
          console.log(global.stat)
          run()
          setTimeout(function(){
            window.document.title = global.f_residential_area+'小区' + global.f_building + '栋平面图';
            window.print();
            // let c = document.getElementById("ShowAddress");
            // let dataurl = c.toDataURL();
            // console.log(dataurl);
            // let win=window.open();
            // win.document.title = global.f_residential_area+'小区' + global.f_building + '栋平面图';
            // let img = win.document.createElement("img");
            // img.src=dataurl;
            // win.document.body.appendChild(img);
            // setTimeout(win.print(),1000);
          }, 1000)
        })
      })
    }
}




</script>
