print.1ec9a2fe.js 1.5 KB

123
  1. import{e as p,ah as _,o as u,g as f,h as m,j as o,u as r,z as h,aE as v,aF as y}from"./vue.e266cb73.js";import{_ as g}from"./_plugin-vue_export-helper.c27b6911.js";const w=t=>(v("data-v-476a21b4"),t=t(),y(),t),x={class:"center",id:"printcontent"},b={class:"box"},I=["src"],k={class:"mt10 tc"},M=w(()=>o("div",{style:{height:"100px"}},null,-1)),B="https://api.ycxxkj.com/index.php/api/qrcode/online/text/",C=p({__name:"print",setup(t){const s=_(),i=s.query.no,a=s.query.name;console.log("🚀 ~ file: print.vue:15 ~ no:",i),console.log("🚀 ~ file: print.vue:17 ~ name:",a);const c=()=>{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 u(()=>{setTimeout(()=>{c()},1e3);var e=function(){console.log("beforePrint")},n=function(){console.log("afterPrint"),window.close()};if(window.matchMedia){var d=window.matchMedia("print");d.addListener(function(l){l.matches?e():n()})}window.onbeforeprint=e,window.onafterprint=n}),(e,n)=>(f(),m("div",x,[o("div",b,[o("img",{class:"inimg",src:B+r(i)},null,8,I)]),o("div",k,h(r(a)),1),M]))}});const S=g(C,[["__scopeId","data-v-476a21b4"],["__file","C:/Users/89282/Desktop/lechang_storage/lechang_storage/vue-next-admin/src/views/data/print.vue"]]);export{S as default};
  2. //# sourceMappingURL=print.1ec9a2fe.js.map