(window.webpackJsonp=window.webpackJsonp||[]).push([[108],{Ohmc:function(u,d,t){u.exports=t.p+"static/certificate.fc32dc1b.jpg"},psBA:function(u,d,t){u.exports={wrp:"wrp___3usIQ",underline:"underline___2KCdI",win:"win___1riZg",desc:"desc___3KjjH"}},tYMO:function(u,d,t){"use strict";t.r(d);var z=t("MPZO"),R=t("bnk9"),g=t("VBJJ"),c=t.n(g),P=t("55MS"),h=t("z3+T"),O=t("GZha"),M=t("buSX"),o=t("ZZRV"),a=t.n(o),C=t("9kvl"),j=t("yMd2"),B=t.n(j),b=t("1vsH"),L=t("xKgJ"),A=t("hJwl"),T=t("psBA"),s=t.n(T),w=function(l){var U=l.classroomList,J=l.dispatch,I=Object(M.a)(l,["classroomList","dispatch"]),K=Object(o.useState)(!1),y=Object(O.a)(K,2),W=y[0],E=y[1],F=Object(o.useState)(I.location.query),v=Object(O.a)(F,2),e=v[0],S=v[1],D=Object(o.useRef)(),Z=[{name:"\u6700\u65B0",id:"created_at"},{name:"\u6700\u70ED",id:"visits"}];Object(o.useEffect)(function(){E(!0),Object(L.m)()&&!e.id&&E(!0),e.id&&x()},[]);var x=function(){var f=Object(h.a)(c.a.mark(function m(){var _;return c.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(A.s)(Object(P.a)({},e));case 2:_=r.sent,(_==null?void 0:_.status)===0&&(E(!0),e.school_name=_.data.school_name,e.user_name=_.data.username,e.student_id=_.data.student_id,e.win_type=_.data.competition_name,e.win=_.data.award_name,e.group=_.data.competition,e.suffix=_.data.identity,S(Object(P.a)({},e)));case 4:case"end":return r.stop()}},m)}));return function(){return f.apply(this,arguments)}}(),N=function(){var f=Object(h.a)(c.a.mark(function m(){var _,i,r;return c.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return _={margin:[20,0,0,0],filename:"11.pdf",enableLinks:!1,html2canvas:{scale:5,allowTaint:!1,useCORS:!0},jsPDF:{format:[1360,1010],orientation:"landscape",unit:"px"},image:{type:"jpeg",quality:.98}},i=B()().set(_).from(D.current).toPdf(),n.next=4,i.get("pdf");case 4:return i=n.sent,n.next=7,i.output("bloburl");case 7:r=n.sent,Object(b.l)("".concat(e.school_name,"_").concat(e.user_name,"_").concat(e.win,"_").concat(e.group,".pdf"),r);case 9:case"end":return n.stop()}},m)}));return function(){return f.apply(this,arguments)}}();return a.a.createElement("section",null,W&&a.a.createElement(a.a.Fragment,null,a.a.createElement("aside",{className:"tc mt10 mb30"},a.a.createElement(R.a,{size:"large",type:"primary",onClick:N},"\u5BFC\u51FA\u5956\u72B6")),a.a.createElement("aside",{className:"edu-container relative",style:{height:880,width:1e3}},a.a.createElement("aside",{ref:D,id:"reportElement",style:{width:1e3,position:"relative"}},a.a.createElement("aside",{className:s.a.wrp},a.a.createElement("aside",{className:"ml50"},a.a.createElement("div",null,a.a.createElement("span",{className:s.a.underline},e.school_name||"\u56FD\u9632\u79D1\u6280\u5927\u5B66"),a.a.createElement("span",{className:"ml20 mr20 ".concat(s.a.underline)},e.user_name||""),e.suffix,e.student_id&&e.type==2&&a.a.createElement("span",null,"\uFF0C\u5B66\u53F7",a.a.createElement("span",{className:"".concat(s.a.underline," ml20")},e.student_id))),a.a.createElement("div",{className:"mt10"},"\u8363\u83B7\uFF1A\u201C",e.win_type||"","\u201D\uFF08",e.group||"\u4EE3\u7801\u6807\u6CE8\u7EC4","\uFF09"),a.a.createElement("div",{className:s.a.win},e.win||"\u4E00\u7B49\u5956"),a.a.createElement("div",{className:s.a.desc},"\u7279\u53D1\u6B64\u8BC1\uFF0C\u4EE5\u8D44\u9F13\u52B1\u3002"))),a.a.createElement("img",{src:t("Ohmc"),style:{width:"100%"}})))))};d.default=Object(C.a)(function(p){var l=p.classroomList,U=p.user;return{classroomList:l,user:U}})(w)}}]);
