123 |
- import{e as _,ah as u,o as m,g as f,h,j as n,u as i,z as v,aE as y,aF as g}from"./vue.e266cb73.js";import{e as w}from"./mitt.7f99bbc0.js";import{_ as x}from"./_plugin-vue_export-helper.c27b6911.js";const b=t=>(y("data-v-476a21b4"),t=t(),g(),t),C={class:"center",id:"printcontent"},k={class:"box"},I=["src"],M={class:"mt10 tc"},B=b(()=>n("div",{style:{height:"100px"}},null,-1)),E="https://api.ycxxkj.com/index.php/api/qrcode/online/text/",P=_({__name:"print",setup(t){const o=u(),r=o.query.no,a=o.query.name,c=()=>{w.emit("onCurrentContextmenuClick",Object.assign({},{contextMenuClickId:1,...o}))},d=()=>{let e=document.createElement("div");e.innerHTML=document.getElementById("printcontent").innerHTML,e.style.position="fixed",e.style.left="0",e.style.top="0",e.style.width="100%",e.style.height="100%",e.style.zIndex="100000",e.style.background="#fff",e.style.overflow="auto",document.body.appendChild(e),window.print(),document.body.removeChild(e)};return m(()=>{setTimeout(()=>{d()},500);var e=function(){console.log("beforePrint")},s=function(){console.log("afterPrint"),c()};if(window.matchMedia){var l=window.matchMedia("print");l.addListener(function(p){p.matches?e():s()})}window.onbeforeprint=e,window.onafterprint=s}),(e,s)=>(f(),h("div",C,[n("div",k,[n("img",{class:"inimg",src:E+i(r)},null,8,I)]),n("div",M,v(i(a)),1),B]))}});const q=x(P,[["__scopeId","data-v-476a21b4"],["__file","C:/Users/89282/Desktop/lechang_storage/lechang_storage/vue-next-admin/src/views/data/print.vue"]]);export{q as default};
- //# sourceMappingURL=print.e7e5c90e.js.map
|