(window.webpackJsonp=window.webpackJsonp||[]).push([[109],{Ohmc:function(l,d,t){l.exports=t.p+"static/certificate.fc32dc1b.jpg"},psBA:function(l,d,t){l.exports={wrp:"wrp___3usIQ",underline:"underline___2KCdI",win:"win___1riZg",desc:"desc___3KjjH"}},tYMO:function(l,d,t){"use strict";t.r(d);var z=t("+L6B"),D=t("2/Rp"),R=t("WmNS"),c=t.n(R),P=t("k1fw"),h=t("9og8"),g=t("tJVT"),b=t("PpiC"),o=t("q1tI"),a=t.n(o),M=t("9kvl"),j=t("1n7x"),C=t.n(j),B=t("1vsH"),L=t("xKgJ"),A=t("hJwl"),w=t("psBA"),s=t.n(w),T=function(i){var O=i.classroomList,J=i.dispatch,I=Object(b.a)(i,["classroomList","dispatch"]),K=Object(o.useState)(!1),U=Object(g.a)(K,2),W=U[0],E=U[1],F=Object(o.useState)(I.location.query),y=Object(g.a)(F,2),e=y[0],x=y[1],v=Object(o.useRef)(),k=[{name:"\u6700\u65B0",id:"created_at"},{name:"\u6700\u70ED",id:"visits"}];Object(o.useEffect)(function(){E(!0),Object(L.n)()&&!e.id&&E(!0),e.id&&N()},[]);var N=function(){var f=Object(h.a)(c.a.mark(function m(){var _;return c.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Object(A.u)(Object(P.a)({},e));case 2:_=n.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,x(Object(P.a)({},e)));case 4:case"end":return n.stop()}},m)}));return function(){return f.apply(this,arguments)}}(),S=function(){var f=Object(h.a)(c.a.mark(function m(){var _,u,n;return c.a.wrap(function(r){for(;;)switch(r.prev=r.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}},u=C()().set(_).from(v.current).toPdf(),r.next=4,u.get("pdf");case 4:return u=r.sent,r.next=7,u.output("bloburl");case 7:n=r.sent,Object(B.l)("".concat(e.school_name,"_").concat(e.user_name,"_").concat(e.win,"_").concat(e.group,".pdf"),n);case 9:case"end":return r.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(D.a,{size:"large",type:"primary",onClick:S},"\u5BFC\u51FA\u5956\u72B6")),a.a.createElement("aside",{className:"edu-container relative",style:{height:880,width:1e3}},a.a.createElement("aside",{ref:v,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(M.a)(function(p){var i=p.classroomList,O=p.user;return{classroomList:i,user:O}})(T)}}]);
