You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
4.8 KiB
2 lines
4.8 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[211],{UHpO:function(y,c,t){y.exports={flex_box_center:"flex_box_center___3tIek",flex_space_between:"flex_space_between___q_V1r",flex_box_vertical_center:"flex_box_vertical_center___SOerp",flex_box_center_end:"flex_box_center_end___2tuyE",flex_box_column:"flex_box_column___Gr44O",wrap:"wrap___3e16-",head:"head___2hC3Y"}},pSk9:function(y,c,t){"use strict";t.r(c);var X=t("VUml"),I=t("RCAX"),T=t("IYef"),Y=t("6NPb"),O=t("o3AU"),Z=t("sOWs"),W=t("jDAR"),k=t("dLI4"),p=t("4d5L"),q=t("EOh4"),i=t("V/dS"),ee=t("8OG5"),b=t("mgsT"),E=t("Hqw+"),S=t("ftSv"),j=t("XXmO"),v=t.n(j),s=t("T/Jt"),e=t.n(s),D=t("9kvl"),m=t("1vsH"),K=t("UHpO"),R=t.n(K),w=t("ErOA"),U=t("m3rI"),N=function(n){var r,f,h,te=n.globalSetting,_e=n.user,ae=n.dispatch,le=Object(S.a)(n,["globalSetting","user","dispatch"]),H=Object(s.useState)([]),A=Object(E.a)(H,2),d=A[0],C=A[1],V=Object(s.useState)(),M=Object(E.a)(V,2),_=M[0],G=M[1],Q=Object(s.useState)(!1),g=Object(E.a)(Q,2),$=g[0],x=g[1],z=Object(s.useState)(!1),F=Object(E.a)(z,2),B=F[0],L=F[1],J={onRemove:function(){C([])},beforeUpload:function(l){if((l==null?void 0:l.size)>1024*1024*50)return b.b.info("\u6587\u4EF6\u8D85\u8FC750M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;var o=[];return o.push(l),C([].concat(o)),!1},fileList:d,accept:".xls,.xlsx"};return e.a.createElement("section",{className:R.a.wrap},e.a.createElement("div",{className:R.a.head},e.a.createElement("span",{onClick:function(){return D.d.push("/problems")}},e.a.createElement("i",{className:"iconfont icon-fanhui2"}),e.a.createElement("span",{className:"mr20"},"\u8FD4\u56DE")),e.a.createElement("b",null,"\u6279\u91CF\u5BFC\u5165\u8BD5\u9898")),e.a.createElement("div",{className:"pr40 pl30 mt30"},e.a.createElement(O.a,{gutter:[16,16]},e.a.createElement(i.a,{className:"font14",span:2,style:{height:"40px",lineHeight:"40px",textAlign:"end"}},"\u6587\u4EF6\u4E0A\u4F20\uFF1A"),e.a.createElement(i.a,null,e.a.createElement(W.a,J,e.a.createElement(p.a,{ghost:!0,type:"primary",style:{width:96,height:40,borderRadius:4}},"\u9009\u62E9\u6587\u4EF6")))),e.a.createElement(O.a,{gutter:[16,16]},e.a.createElement(i.a,{span:2,className:"font14",style:{textAlign:"end"}},"\u6CE8\u610F\uFF1A"),e.a.createElement(i.a,{span:22},e.a.createElement("span",null,"1.\u4EC5\u652F\u6301\u4E0A\u4F20.xlsx\u6216.xls\u7C7B\u578B\u7684\u6587\u4EF6\u3002 ",e.a.createElement("br",null),"2.\u9700\u4E0A\u4F20\u6307\u5B9A\u6A21\u677F\u7684\u6587\u4EF6\u3002",e.a.createElement("span",{style:{cursor:"pointer",color:"#0152d9"},onClick:function(){Object(m.v)("",Object(m.ab)({url:U.a.API_SERVER+"/api/practices/down_template",query:{}}))}},"\u4E0B\u8F7D\u5BFC\u5165\u6A21\u7248"),e.a.createElement("br",null),"3.\u82E5\u76F4\u63A5\u4E0A\u4F20\u4FEE\u6539\u540E\u7684\u5931\u8D25\u6587\u4EF6\uFF0C\u9700\u8981\u5148\u5C06\u201C\u5931\u8D25\u539F\u56E0\u201D\u5217\u5220\u9664\u3002"))),e.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},e.a.createElement(p.a,{type:"primary",style:{width:"116px",height:"40px",borderRadius:"4px"},onClick:Object(T.a)(v.a.mark(function u(){var l,o;return v.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(!((d==null?void 0:d.length)<=0)){a.next=3;break}return b.b.info("\u8BF7\u4E0A\u4F20\u6587\u4EF6"),a.abrupt("return");case 3:return x(!1),L(!0),l=new FormData,l.append("file",d[0]),a.next=9,Object(w.a)("/api/practices/file_import.json",{method:"post",body:l},!0);case 9:if(o=a.sent,L(!1),!(o.status===-1)){a.next=13;break}return a.abrupt("return");case 13:x(!0),G(o);case 15:case"end":return a.stop()}},u)}))},"\u786E\u8BA4\u4E0A\u4F20")),$&&!B&&e.a.createElement("div",null,e.a.createElement("p",{style:{paddingLeft:15,fontSize:14}},"\u4E0A\u4F20\u7ED3\u679C"),e.a.createElement("div",{style:{fontSize:"16px",textAlign:"center",display:"flex"}},e.a.createElement("span",{style:{flex:"1",lineHeight:"30px"}}," ","\u672C\u6B21\u4E0A\u4F20 \u65B0\u589E",e.a.createElement("span",{style:{color:"#FA6400"}},_==null?void 0:_.success),"\u6761\u8BD5\u9898\uFF0C\u4E0A\u4F20\u6210\u529F",e.a.createElement("span",{style:{color:"#FA6400"}},_==null?void 0:_.success),"\u6761\u6570\u636E",!!(_!=null&&(r=_.fail)!==null&&r!==void 0&&r.length)&&e.a.createElement("span",null,"\uFF0C\u5931\u8D25",e.a.createElement("span",{style:{color:"#FA6400"}},_==null||((f=_.fail)===null||f===void 0)?void 0:f.length),"\u6761\u6570\u636E")),!!(_!=null&&(h=_.fail)!==null&&h!==void 0&&h.length)&&e.a.createElement(p.a,{style:{height:"30px",width:"144px"},type:"primary",ghost:!0,onClick:function(){Object(m.v)("",Object(m.ab)({url:U.a.API_SERVER+(_==null?void 0:_.error_file),query:{}}))}},"\u4E0B\u8F7D\u5931\u8D25\u6570\u636E"))),e.a.createElement(I.a,{tip:"\u4E0A\u4F20\u4E2D",style:{width:"100%",marginTop:26},spinning:B})))};c.default=Object(D.a)(function(P){var n=P.user,r=P.globalSetting;return{user:n,globalSetting:r}})(N)}}]);
|