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
5.4 KiB
2 lines
5.4 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[189],{ZKIH:function(f,P,t){f.exports={title:"title___153Aq"}},n59o:function(f,P,t){"use strict";t.r(P);var k=t("+L6B"),y=t("2/Rp"),I=t("WmNS"),U=t.n(I),j=t("9og8"),q=t("DZo9"),K=t("8z0m"),ee=t("miYZ"),s=t("tsqr"),W=t("oBTY"),te=t("5NDa"),E=t("5rEg"),i=t("tJVT"),u=t("q1tI"),e=t.n(u),R=t("m3rI"),S=t("ErOA"),z=t("ZKIH"),$=t.n(z),N=t("55Ip"),J=t("9kvl"),Z=t("xvlK");function H(d){var m,v,ae=d.user,_e=d.dispatch,V=Object(u.useState)(),D=Object(i.a)(V,2),g=D[0],O=D[1],Y=Object(u.useState)(),B=Object(i.a)(Y,2),h=B[0],F=B[1],G=Object(u.useState)([]),M=Object(i.a)(G,2),n=M[0],p=M[1],Q=Object(u.useState)(),C=Object(i.a)(Q,2),x=C[0],A=C[1],X=Object(u.useState)(),L=Object(i.a)(X,2),b=L[0],T=L[1],w=e.a.createElement("div",{style:{height:"128px",width:"128px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}},e.a.createElement(Z.a,null),e.a.createElement("div",{style:{marginTop:8}},"\u4E0A\u4F20\u56FE\u7247"));return e.a.createElement("div",{style:{marginBottom:"40px"}},e.a.createElement("div",{className:"edu-container",style:{marginTop:"10px"}},e.a.createElement(N.Link,{to:"/TeachingTeam",style:{color:"#333333"}},"\u6559\u5B66\u56E2\u961F"),"/",e.a.createElement("span",null,"\u521B\u5EFA")),e.a.createElement("div",{className:"edu-container minH500",style:{width:"1200px",background:"#fff",marginTop:"20px",paddingBottom:"20px"}},e.a.createElement("div",{className:$.a.title},e.a.createElement("span",null,"\u6DFB\u52A0\u8001\u5E08 ")),e.a.createElement("div",{style:{padding:"0px 45px"}},e.a.createElement("div",{style:{marginBottom:"20px"}},e.a.createElement("span",{style:{color:"#E02020"}},"*")," ",e.a.createElement("span",{style:{color:"#333333"}},"\u59D3\u540D\uFF1A"),e.a.createElement("br",null),e.a.createElement(E.a,{style:{marginTop:"21px",width:"600px",marginLeft:"10px"},value:g,onChange:function(a){return O(a.target.value)},maxLength:20,placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D"})),e.a.createElement("div",{style:{marginBottom:"20px"}},e.a.createElement("span",{style:{color:"#E02020"}},"*")," ",e.a.createElement("span",{style:{color:"#333333"}},"\u804C\u79F0\uFF1A"),e.a.createElement("br",null),e.a.createElement(E.a,{style:{marginTop:"21px",width:"600px",marginLeft:"10px"},value:h,onChange:function(a){return F(a.target.value)},maxLength:20,placeholder:"\u8BF7\u8F93\u5165\u804C\u79F0"})),e.a.createElement("div",{style:{marginBottom:"20px"}},e.a.createElement("span",{style:{color:"#333333"}},"\u4E0A\u4F20\u7167\u7247\uFF1A",e.a.createElement("span",{style:{fontSize:"14px",color:"#888888",marginBottom:"21px"}},"\uFF08\u652F\u6301jpg\u3001gif\u3001png\u683C\u5F0F\u7684\u7167\u7247\uFF1B\u5EFA\u8BAE\u6587\u4EF6\u5C0F\u4E8E2M\uFF09")),e.a.createElement("br",null),e.a.createElement("div",{style:{marginTop:"21px",marginLeft:"10px"}},e.a.createElement(K.a,{name:"file",accept:"image/png, image/jpeg",listType:"picture-card",style:{marginLeft:"10px"},showUploadList:!1,action:R.a.API_SERVER+"/api/attachments.json",withCredentials:!0,fileList:n,onChange:function(a){var _,r=(a==null?void 0:a.file.size)/1024/1024<2;if(!((_=a.fileList)===null||_===void 0?void 0:_.length))return!1;if(!r)p(Object(W.a)(n));else{var c;p(a==null||((c=a.fileList)===null||c===void 0)?void 0:c.slice(-1))}},beforeUpload:function(a){var _=a.type==="image/jpeg"||a.type==="image/png";if(!_)return s.b.error("\u53EA\u80FD\u4E0A\u4F20jpg \u6216\u8005png\u56FE\u7247"),!1;var r=a.size/1024/1024<2;return r?_&&r:(s.b.error("\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u5927\u4E8E2m"),!1)},onRemove:function(a){p([])}},(n==null?void 0:n.length)>0?e.a.createElement("img",{src:R.a.API_SERVER+"/api/attachments/"+((m=n[0])===null||m===void 0||((v=m.response)===null||v===void 0)?void 0:v.id),alt:"avatar",style:{width:"128px",height:"128px"}}):w))),e.a.createElement("div",{style:{marginBottom:"20px"}},e.a.createElement("span",{style:{color:"#333333"}},"\u5B66\u6821/\u5355\u4F4D\uFF1A"),e.a.createElement("br",null),e.a.createElement(E.a,{style:{marginTop:"21px",marginLeft:"10px"},value:x,onChange:function(a){return A(a.target.value)},maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u5B66\u6821/\u5355\u4F4D"})),e.a.createElement("div",{style:{marginBottom:"20px"}},e.a.createElement("span",{style:{color:"#333333"}},"\u7B80\u4ECB\uFF1A"),e.a.createElement("br",null),e.a.createElement(E.a.TextArea,{style:{marginTop:"21px",marginLeft:"10px"},value:b,onChange:function(a){return T(a.target.value)},maxLength:500,placeholder:"\u8BF7\u8F93\u5165\u7B80\u4ECB\uFF0C500\u5B57\u4EE5\u5185"})),e.a.createElement("div",{style:{marginBottom:"20px"}},e.a.createElement(y.a,{type:"primary",onClick:Object(j.a)(U.a.mark(function l(){var a,_,r;return U.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(g){o.next=3;break}return s.b.info("\u8BF7\u8F93\u5165\u59D3\u540D"),o.abrupt("return");case 3:if(h){o.next=6;break}return s.b.info("\u8BF7\u8F93\u5165\u804C\u79F0"),o.abrupt("return");case 6:return o.next=8,Object(S.a)("/api/teaching_teams.json",{method:"post",body:{name:g,technical_title:h,school_name:x,description:b,attachment_ids:[n==null||((a=n[0])===null||a===void 0||((_=a.response)===null||_===void 0))?void 0:_.id]}});case 8:r=o.sent,(r==null?void 0:r.status)===0&&(s.b.info("\u521B\u5EFA\u6210\u529F"),O(""),F(""),p([]),T(""),A(""),history.back());case 10:case"end":return o.stop()}},l)}))},"\u786E\u8BA4"),e.a.createElement(y.a,{style:{marginLeft:"30px"},onClick:function(){history.back()}},"\u53D6\u6D88")))))}P.default=Object(J.a)(function(d){var m=d.user;return{user:m}})(H)}}]);
|