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.
NewEduCoderBuild/55795.45182548.async.js

1 line
34 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[55795],{55795:function(e,n,t){t.r(n),t.d(n,{default:function(){return ce},identityMap:function(){return oe}});var i=t(37205),l=t.n(i),a=t(7557),r=t.n(a),s=t(82242),o=t.n(s),c=t(41498),d=t.n(c),u=t(79800),h=t.n(u),m=t(39647),f=t.n(m),p=t(59301),x=t(79265),v=t(57809),j=t(92832),g=t(78241),_=t(8591),y=t(43418),b=t(95237),k=t(43604),Z=t(6848),w=t(88522),N=t(5112),I=t(24645),F=t(3113),C="wrap___isQuw",S="content___Gh5i7",A="hint___dh6_r",T="title___Txz11",V="titleWrap___p75TL",P="formWrap___tyQRy",q="schoolHintWrap___WnTDr",z="colorCDCDCD___Xq4Mx",E="color0152d9___lAjmo",L="submitButton___LHi3i",Q="submitButtondiv___J6VbH",B="staffidInput___M9rEi",R="selecticon___T9WXy",H=t(75374),M=t(31593),D=t(28556),O=t(32637),G=t(95972),W=t(54745),U=t(50023),J=t(72528),Y=t(43851),K=t(34837),X=t(82710),$=t(89392),ee=t(29831),ne=t(75694),te=t(69423),ie=t(10665),le=t(37712),ae=["user","account","globalSetting","shixunHomeworks","loading","dispatch"],re=v.default.Option,se=j.Z.TextArea,oe={teacher:"教师",student:"学生",professional:"专业人士"},ce=(0,x.connect)((function(e){var n=e.user,t=e.account,i=e.loading,l=e.globalSetting,a=e.shixunHomeworks;return{user:n,account:t,globalSetting:l,loading:i.effects,shixunHomeworks:a}}))((function(e){var n,t,i,a,s,c=e.user,u=e.account,m=e.globalSetting,oe=e.shixunHomeworks,ce=e.loading,de=e.dispatch,ue=(f()(e,ae),g.Z.useForm()),he=h()(ue,1)[0],me=g.Z.useForm(),fe=h()(me,1)[0],pe=(0,p.useState)({}),xe=h()(pe,2),ve=(xe[0],xe[1]),je=(0,p.useState)(!1),ge=h()(je,2),_e=ge[0],ye=ge[1],be=(0,p.useState)({}),ke=h()(be,2),Ze=ke[0],we=ke[1],Ne=(0,p.useState)([]),Ie=h()(Ne,2),Fe=Ie[0],Ce=Ie[1],Se=(0,p.useState)([]),Ae=h()(Se,2),Te=Ae[0],Ve=Ae[1],Pe=(0,p.useState)([]),qe=h()(Pe,2),ze=qe[0],Ee=qe[1],Le=(0,p.useState)([]),Qe=h()(Le,2),Be=Qe[0],Re=Qe[1],He=(0,p.useState)([]),Me=h()(He,2),De=Me[0],Oe=Me[1],Ge=(0,p.useState)([]),We=h()(Ge,2),Ue=We[0],Je=We[1],Ye=(0,p.useState)(!0),Ke=h()(Ye,2),Xe=Ke[0],$e=Ke[1],en=(0,p.useState)(!1),nn=h()(en,2),tn=nn[0],ln=nn[1],an=(0,p.useState)(),rn=h()(an,2),sn=rn[0],on=rn[1],cn=(0,p.useState)(null),dn=h()(cn,2),un=dn[0],hn=dn[1],mn=(0,p.useState)(!0),fn=h()(mn,2),pn=fn[0],xn=fn[1],vn=(0,p.useState)(),jn=h()(vn,2),gn=(jn[0],jn[1],(0,p.useState)(!1)),_n=h()(gn,2),yn=_n[0],bn=(_n[1],(0,p.useState)([])),kn=h()(bn,2),Zn=kn[0],wn=kn[1],Nn=(0,p.useState)(!0),In=h()(Nn,2),Fn=In[0],Cn=In[1],Sn=(0,p.useState)(!1),An=h()(Sn,2),Tn=An[0],Vn=An[1],Pn=(0,p.useRef)(!0),qn=(0,p.useState)(""),zn=h()(qn,2),En=zn[0],Ln=zn[1],Qn=(0,p.useState)(""),Bn=h()(Qn,2),Rn=Bn[0],Hn=Bn[1],Mn=(0,p.useState)(""),Dn=h()(Mn,2),On=Dn[0],Gn=Dn[1],Wn=(0,p.useRef)((0,$.throttle)((function(e){return Xn(e)}),1200,{leading:!0,trailing:!0})).current,Un=u.basicInfo,Jn=void 0===Un?{}:Un,Yn=Jn&&"certified"==Jn.professional_certification,Kn={visible:!1};(0,p.useEffect)((function(){var e,n;null!==(e=u.basicInfo)&&void 0!==e&&e.school_name&&Xn(null===(n=u.basicInfo)||void 0===n?void 0:n.school_name)}),[null===(n=u.basicInfo)||void 0===n?void 0:n.school_name]),(0,p.useEffect)((function(){Fn&&(he.setFieldsValue({studentNo:Ze.studentNo}),he.validateFields(["studentNo"]))}),[Ze.studentNo]),(0,p.useEffect)((function(){"student"!==Ze.identity||Fn||he.validateFields(["studentNo"])}),[Ze.identity]),(0,p.useEffect)((function(){pn||!Ze.school||Fe.find((function(e){return e.name===Ze.school}))?Ln(""):Ln("error")}),[pn,Ze.school,Fe]),(0,p.useEffect)((function(){pn||!Ze.department||ze.find((function(e){return e.name===Ze.department}))?Hn(""):Hn("error")}),[pn,Ze.department,ze]),(0,p.useEffect)((function(){!pn&&Ze.major_name&&(null==De?void 0:De.length)>0&&!De.find((function(e){return e.name===Ze.major_name}))&&Gn("error")}),[pn,Ze.major_name]);var Xn=function(){var e=d()(r()().mark((function e(n){var t,i,l;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return xn(!0),e.next=3,de({type:"account/getSchoolOption",payload:{keyword:n,limit:99999,display_aliases:!0}});case 3:if(t=e.sent,Ce(null==t?void 0:t.schools),Ve(null==t?void 0:t.schools),!n||""==n){e.next=24;break}if(Ve(null==t||null===(i=t.schools)||void 0===i?void 0:i.filter((function(e){return e.name.includes(n)}))),!((null==t||null===(l=t.schools)||void 0===l?void 0:l.find((function(e){return e.name===n})))||{}).id){e.next=14;break}return e.next=12,tt(n,null==Jn?void 0:Jn.department_name,null==t?void 0:t.schools);case 12:e.next=22;break;case 14:he.setFieldsValue({department:"",major_name:""}),we(o()(o()({},he.getFieldValue()),{school:n,department:"",major_name:""})),Ee([]),Re([]),Oe([]),Je([]),Hn(""),Gn("");case 22:e.next=32;break;case 24:he.setFieldsValue({department:"",major_name:""}),we(o()(o()({},he.getFieldValue()),{department:"",major_name:""})),Ee([]),Re([]),Oe([]),Je([]),Hn(""),Gn("");case 32:xn(!1);case 33:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),$n=function(e){if(e)return de({type:"account/getDepartmentOption",payload:{id:e}})};(0,p.useEffect)((function(){if(u.basicInfo){var e,n,t,i=u.basicInfo,l={nickname:i.nickname,name:i.show_realname?i.name:(0,G.YA)(i.name),gender:i.gender,city:[i.location,i.location_city],identity:i.identity,school:i.school_name,department:i.department_name,major_name:i.major_name,studentNo:i.student_id,edu_entry_year:i.edu_entry_year,edu_background:(e=i.edu_background,null===G.jh||void 0===G.jh||null===(n=G.jh.find((function(n){return n.name===e})))||void 0===n?void 0:n.id),brief_introduction:i.brief_introduction,jobTitle:"teacher"==i.identity?i.technical_title:"教授",manager:"professional"==i.identity?i.technical_title:"企业管理者",staff_id:i.staff_id};if(null!=i&&i.face_image)wn([{uid:"111",name:"111",url:te.Z.API_SERVER+i.face_image,response:{id:null==i||null===(t=i.face_image)||void 0===t||null===(t=t.split("/"))||void 0===t?void 0:t[3]}}]);on(i.name),$e(i.show_realname),hn(i.identity),he.setFieldsValue(l),we(l)}}),[u.basicInfo]);var et,nt,tt=function(){var e=d()(r()().mark((function e(n,t,i){var a,s,c,d,u;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(t),console.log(Pn),c=null===(a=(i||Fe).find((function(e){return e.name===n})))||void 0===a?void 0:a.id,e.next=5,$n(c);case 5:if(e.t0=e.sent,e.t0){e.next=8;break}e.t0={};case 8:d=e.t0,u=Pn.current?t:null==d||null===(s=d.departments[0])||void 0===s?void 0:s.name,he.setFieldsValue({department:u}),we(o()(o()({},he.getFieldsValue()),{school:n,department:u})),Ee(l()(null==d?void 0:d.departments)),Re(l()(null==d?void 0:d.departments)),Gn(""),it(Pn.current,l()(null==d?void 0:d.departments),i);case 16:case"end":return e.stop()}}),e)})));return function(n,t,i){return e.apply(this,arguments)}}(),it=function(){var e=d()(r()().mark((function e(){var n,t,i,a,s,c,d,u,h,m,f=arguments;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=f.length>0&&void 0!==f[0]&&f[0],a=f.length>1?f[1]:void 0,s=f.length>2?f[2]:void 0,console.log(he.getFieldsValue()),console.log(Ze),console.log(Fe),Pn.current=!1,c=null===(n=s.find((function(e){return e.name===he.getFieldValue("school")})))||void 0===n?void 0:n.id,!(d=null===(t=a.find((function(e){return e.name===he.getFieldValue("department")})))||void 0===t?void 0:t.id)){e.next=14;break}return e.next=12,(0,X.ZP)("/api/schools/".concat(c,"/departments/").concat(d,"/major_option.json"),{method:"get"});case 12:0==(null==(u=e.sent)?void 0:u.status)&&(Oe(l()(null==u?void 0:u.majors)),Je(l()(null==u?void 0:u.majors)),m=i?null==Jn?void 0:Jn.major_name:null==u||null===(h=u.majors[0])||void 0===h?void 0:h.name,he.setFieldsValue({major_name:m}),we(o()(o()({},he.getFieldsValue()),{major_name:m})));case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),lt=function(){var e=d()(r()().mark((function e(){var n,t,i,a,s,c,d;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=null===(n=Fe.find((function(e){return e.name===he.getFieldValue("school")})))||void 0===n?void 0:n.id,!(a=null===(t=ze.find((function(e){return e.name===he.getFieldValue("department")})))||void 0===t?void 0:t.id)){e.next=8;break}return Gn(""),e.next=6,(0,X.ZP)("/api/schools/".concat(i,"/departments/").concat(a,"/major_option.json"),{method:"get"});case 6:0==(null==(s=e.sent)?void 0:s.status)&&(Oe(l()(null==s?void 0:s.majors)),Je(l()(null==s?void 0:s.majors)),d=null==s||null===(c=s.majors)||void 0===c||null===(c=c[0])||void 0===c?void 0:c.name,he.setFieldsValue({major_name:d}),we(o()(o()({},he.getFieldsValue()),{major_name:d})));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),at=function(){var e=d()(r()().mark((function e(n){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Xn();case 2:he.setFieldsValue({school:n,department:""}),we(o()(o()({},Ze),{school:n,department:""}));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),rt=function(e){var n,t,i,l;return"number"===e?"teacher"===Ze.identity?"".concat(null==m||null===(n=m.setting)||void 0===n?void 0:n.homepage_tea_qq_number):"".concat(null==m||null===(t=m.setting)||void 0===t?void 0:t.homepage_stu_qq_number):"code"===e?"teacher"===Ze.identity?"".concat(te.Z.IMG_SERVER,"/").concat(null==m||null===(i=m.setting)||void 0===i?void 0:i.homepage_tea_qq_qrcode_url):"".concat(te.Z.IMG_SERVER,"/").concat(null==m||null===(l=m.setting)||void 0===l?void 0:l.homepage_stu_qq_qrcode_url):void 0},st=function(){var e=d()(r()().mark((function e(n){var t,i,l,a,s,o,h,m,f,p,v,j,g,b,k,Z,w,N,I,F,C,S,A,T,V,P,q;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.nickname,s=n.gender,o=n.identity,h=n.studentNo,m=n.jobTitle,f=n.manager,p=n.school,v=n.department,j=n.edu_background,g=n.edu_entry_year,b=n.brief_introduction,n.face_image,k=n.staff_id,Z=n.major_name,w=null===(t=ze.find((function(e){return e.name===v})))||void 0===t?void 0:t.id,N=null===(i=Fe.find((function(e){return e.name===p})))||void 0===i?void 0:i.id,I="student"===o?null===(l=De.find((function(e){return e.name===Z})))||void 0===l?void 0:l.id:null,F=u.basicInfo,console.log("B",n,F),C=[],"uncertified"!=F.authentication&&(sn!=F.name&&C.push("姓名"),s!=F.gender&&C.push("性别")),S=[],Yn&&(o!=F.identity?S.push("职业"):(Ze.identity,"teacher"===Ze.identity&&m!=F.technical_title&&S.push("职业"),"professional"===Ze.identity&&f!=F.technical_title&&S.push("职业")),p!=F.school_name&&S.push("学校/单位"),v!=F.department_name&&S.push("院系/部门"),"student"===o&&Z!=F.major_name&&S.push("专业")),N){e.next=13;break}return y.Z.info({title:"联系平台运营",width:400,icon:null,centered:!0,content:(0,le.jsxs)("div",{style:{textAlign:"center"},children:[(0,le.jsxs)("div",{style:{textAlign:"left"},children:["请扫码或搜索加入头歌官方交流QQ群",rt("number"),",联系群内的运营进行咨询和申请新增学校名称。"]}),(0,le.jsx)("img",{src:rt("code"),style:{width:"170px",height:"170px",marginTop:"20px"}})]}),okText:"我知道了"}),e.abrupt("return");case 13:if(!v||w){e.next=16;break}return y.Z.info({title:"联系平台运营",width:400,icon:null,centered:!0,content:(0,le.jsxs)("div",{style:{textAlign:"center"},children:[(0,le.jsxs)("div",{style:{textAlign:"left"},children:["请扫码或搜索加入头歌官方交流QQ群",rt("number"),",联系群内的运营人员申请新增部门或专业名称。"]}),(0,le.jsx)("img",{src:rt("code"),style:{width:"170px",height:"170px",marginTop:"20px"}})]}),okText:"我知道了"}),e.abrupt("return");case 16:if("student"!==o||!Z||I){e.next=19;break}return y.Z.info({title:"联系平台运营",width:400,icon:null,centered:!0,content:(0,le.jsxs)("div",{style:{textAlign:"center"},children:[(0,le.jsxs)("div",{style:{textAlign:"left"},children:["请扫码或搜索加入头歌官方交流QQ群",rt("number"),",联系群内的运营人员申请新增部门或专业名称。"]}),(0,le.jsx)("img",{src:rt("code"),style:{width:"170px",height:"170px",marginTop:"20px"}})]}),okText:"我知道了"}),e.abrupt("return");case 19:if(!(C.length>0||S.length>0)){e.next=23;break}y.Z.confirm({centered:!0,icon:null,okText:"确定",cancelText:"取消",title:"提示",content:(0,le.jsx)("div",{children:"本次修改涉及".concat(C.toString().replaceAll(",","、")).concat(C.length>0&&S.length>0?"、":"").concat(S.toString().replaceAll(",","、"),",需要重新进行").concat(C.length>0?"实名认证":"").concat(C.length>0&&S.length>0?"和":"").concat(S.length>0?"职业认证":"",",请确认是否进行修改")}),onOk:function(){var e=d()(r()().mark((function e(){var n,t,i,l,d,p,v;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(C.length>0)){e.next=3;break}return e.next=3,(0,W.RA)({login:null===(i=c.userInfo)||void 0===i?void 0:i.login});case 3:if(!(S.length>0)){e.next=6;break}return e.next=6,(0,W.kN)({login:null===(l=c.userInfo)||void 0===l?void 0:l.login});case 6:return e.next=8,de({type:"account/updateAccount",payload:{id:null===(n=u.basicInfo)||void 0===n?void 0:n.id,department_id:w,major_id:I,gender:s,identity:o,location:location,name:sn,nickname:a,school_id:N,edu_background:j,edu_entry_year:g,show_realname:Xe,brief_introduction:b,student_id:"student"===o?h:null,technical_title:m||f,face_image:null==Zn||null===(t=Zn[0])||void 0===t||null===(t=t.response)||void 0===t?void 0:t.id}});case 8:if(-1!==(null==(d=e.sent)?void 0:d.status)){e.next=11;break}return e.abrupt("return");case 11:if(!d){e.next=20;break}if(_.ZP.info("保存成功"),null!==(p=u.basicInfo)&&void 0!==p&&p.base_info_completed||de({type:"user/getUserInfo"}),de({type:"account/getBasicInfo",payload:{login:null===(v=c.userInfo)||void 0===v?void 0:v.login}}),o===un||"teacher"!==o){e.next=18;break}return ln(!0),e.abrupt("return");case 18:"0"===localStorage.getItem("Noviceguide")||de({type:"shixunHomeworks/setActionTabs",payload:{key:"底部弹窗",type:4,href:"/classrooms",text:(0,le.jsx)("div",{children:"OK接下来让我们开始新建【教学课堂】请您找到闪光框并点击 “教学课堂”。"})}}),x.history.push("/account/profile");case 20:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.next=37;break;case 23:return e.next=25,de({type:"account/updateAccount",payload:{id:null===(A=u.basicInfo)||void 0===A?void 0:A.id,department_id:w,major_id:I,gender:s,identity:o,location:location,name:sn,nickname:a,school_id:N,edu_background:j,edu_entry_year:g,staff_id:k,show_realname:Xe,brief_introduction:b,student_id:"student"===o?h:null,technical_title:m||f,face_image:null==Zn||null===(T=Zn[0])||void 0===T||null===(T=T.response)||void 0===T?void 0:T.id}});case 25:if(-1!==(null==(V=e.sent)?void 0:V.status)){e.next=28;break}return e.abrupt("return");case 28:if(!V){e.next=37;break}if(_.ZP.info("保存成功"),null!==(P=u.basicInfo)&&void 0!==P&&P.base_info_completed||de({type:"user/getUserInfo"}),de({type:"account/getBasicInfo",payload:{login:null===(q=c.userInfo)||void 0===q?void 0:q.login}}),o===un||"teacher"!==o){e.next=35;break}return ln(!0),e.abrupt("return");case 35:"0"===localStorage.getItem("Noviceguide")||de({type:"shixunHomeworks/setActionTabs",payload:{key:"底部弹窗",type:4,href:"/classrooms",text:(0,le.jsx)("div",{children:"OK接下来让我们开始新建【教学课堂】请您找到闪光框并点击 “教学课堂”。"})}}),x.history.push("/account/profile");case 37:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),ot=(0,le.jsxs)("div",{children:[yn?(0,le.jsx)(U.Z,{}):(0,le.jsx)(J.Z,{}),(0,le.jsx)("div",{style:{marginTop:8},children:"上传"})]});return(0,le.jsxs)("section",{className:C,children:[(0,le.jsxs)("div",{className:S,children:[(0,le.jsx)("div",{className:V,children:(0,le.jsx)("div",{className:T,children:"基本信息"})}),(0,le.jsxs)(g.Z,{form:he,className:P,layout:"horizontal",onValuesChange:function(e){var n;we(o()({},he.getFieldsValue())),(null==e||null===(n=e.nickname)||void 0===n?void 0:n.length)<=0&&($e(!0),he.setFieldsValue({name:sn})),"name"in e&&on(e.name),"identity"in e&&he.setFieldsValue({staff_id:""})},onFinish:st,scrollToFirstError:!0,children:[(0,le.jsx)(g.Z.Item,{label:"姓名",name:"name",rules:[{required:!0,message:"请输入真实姓名,最大限制".concat(20,"个字符")},{validator:G.HJ}],extra:(0,le.jsx)("span",{children:Ze.nickname?Xe?"显示:平台将显示您的真实姓名":"隐藏:平台将显示你的昵称":"填写昵称后可设置姓名进行隐藏(当进行姓名搜索时,会展示您的真实姓名)"}),children:(0,le.jsx)(j.Z,{style:{height:40},disabled:!!Ze.nickname&&!Xe,placeholder:"请输入真实姓名,最大限制".concat(20,"个字符"),maxLength:20,suffix:Ze.nickname?(0,le.jsx)("i",{style:{lineHeight:"26px"},className:"iconfont ".concat(Xe?"icon-xianshi":"icon-yincang"," font18 ").concat(E),onClick:function(){var e=!Xe;$e(e);var n=e?sn:(0,G.YA)(sn);he.setFieldsValue({name:n})}}):null})}),(0,le.jsxs)(b.Z,{gutter:[10,0],children:[(0,le.jsx)(k.Z,{children:(0,le.jsx)(Z.Z,o()(o()({placement:"bottom",title:function(){return(0,le.jsxs)("div",{children:[(0,le.jsx)("div",{children:"已提交职业认证"}),(0,le.jsxs)("div",{children:["可在",(0,le.jsx)("a",{href:"/account/certification",className:"c-blue",children:"认证信息"}),"中通过“重新认证”进行修改"]})]})}},Kn),{},{children:(0,le.jsx)(g.Z.Item,{label:"职业",name:"identity",rules:[{required:!0,message:"请先选择职业"}],children:(0,le.jsxs)(v.default,{style:{width:135},size:"large",children:[(0,le.jsx)(re,{value:"teacher",children:"教师"}),(0,le.jsx)(re,{value:"student",children:"学生"}),(0,le.jsx)(re,{value:"professional",children:"专业人士"})]})})}))}),(0,le.jsxs)(k.Z,{children:["student"===Ze.identity&&(0,le.jsx)(Z.Z,o()(o()({placement:"bottom",title:function(){return(0,le.jsxs)("div",{children:[(0,le.jsx)("div",{children:"已提交职业认证"}),(0,le.jsxs)("div",{children:["可在",(0,le.jsx)("a",{href:"/account/certification",className:"c-blue",children:"认证信息"}),"中通过“重新认证”进行修改"]})]})}},Kn),{},{children:(0,le.jsx)(g.Z.Item,{initialValue:Ze.studentNo,name:"studentNo",validateTrigger:"onBlur",dependencies:["school"],rules:[{whitespace:!0,message:"不能全为空"},{required:!0,validator:(nt=d()(r()().mark((function e(n,t){var i,l,a;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Cn(!1),e.next=3,(0,X.ZP)("/api/users/accounts/".concat(null==c||null===(i=c.userInfo)||void 0===i?void 0:i.user_id,"/valid_student_id"),{method:"get",params:{school_id:(null==Fe||null===(l=Fe.find((function(e){return e.name===Ze.school})))||void 0===l?void 0:l.id)||(null==Jn?void 0:Jn.school_id),student_id:t}});case 3:return(null==(a=e.sent)?void 0:a.status)<-1&&Tn&&(ye(!0),Vn(!1)),e.abrupt("return",(null==a?void 0:a.status)<-1?Promise.reject((0,le.jsxs)("span",{children:["该学号已被使用,如需继续使用该学号,请先",(0,le.jsx)("a",{onClick:function(){ye(!0)},children:"解绑学号"})]})):Promise.resolve());case 6:case"end":return e.stop()}}),e)}))),function(e,n){return nt.apply(this,arguments)})}],children:(0,le.jsx)(j.Z,{size:"large",style:{width:320},type:"text",placeholder:"请输入学号最大限制20个字符",showCount:!0,maxLength:20})})})),"teacher"===Ze.identity&&(0,le.jsx)(Z.Z,o()(o()({placement:"bottom",title:function(){return(0,le.jsxs)("div",{children:[(0,le.jsx)("div",{children:"已提交职业认证"}),(0,le.jsxs)("div",{children:["可在",(0,le.jsx)("a",{href:"/account/certification",className:"c-blue",children:"认证信息"}),"中通过“重新认证”进行修改"]})]})}},Kn),{},{children:(0,le.jsx)(g.Z.Item,{initialValue:Ze.jobTitle,name:"jobTitle",rules:[{required:!0,message:"请先选择职称"}],children:(0,le.jsxs)(v.default,{style:{width:200},size:"large",children:[(0,le.jsx)(re,{value:"教授",children:"教授"}),(0,le.jsx)(re,{value:"研究员",children:"研究员"}),(0,le.jsx)(re,{value:"副教授",children:"副教授"}),(0,le.jsx)(re,{value:"副研究员",children:"副研究员"}),(0,le.jsx)(re,{value:"讲师",children:"讲师"}),(0,le.jsx)(re,{value:"助理研究员",children:"助理研究员"}),(0,le.jsx)(re,{value:"助理教授",children:"助理教授"})]})})})),"professional"===Ze.identity&&(0,le.jsx)(Z.Z,o()(o()({placement:"bottom",title:function(){return(0,le.jsxs)("div",{children:[(0,le.jsx)("div",{children:"已提交职业认证"}),(0,le.jsxs)("div",{children:["可在",(0,le.jsx)("a",{href:"/account/certification",className:"c-blue",children:"认证信息"}),"中通过“重新认证”进行修改"]})]})}},Kn),{},{children:(0,le.jsx)(g.Z.Item,{initialValue:Ze.manager,name:"manager",rules:[{required:!0,message:"请先选择职称"}],children:(0,le.jsxs)(v.default,{style:{width:200},size:"large",children:[(0,le.jsx)(re,{value:"企业管理者",children:"企业管理者"}),(0,le.jsx)(re,{value:"部门管理者",children:"部门管理者"}),(0,le.jsx)(re,{value:"高级工程师",children:"高级工程师"}),(0,le.jsx)(re,{value:"工程师",children:"工程师"}),(0,le.jsx)(re,{value:"助理工程师",children:"助理工程师"})]})})}))]}),("teacher"===Ze.identity||"professional"===Ze.identity)&&(0,le.jsx)(k.Z,{flex:1,children:(0,le.jsx)(g.Z.Item,{label:"工号",name:"staff_id",labelCol:{span:4},rules:[{validator:function(e,n){if(null===n||""===n)return Promise.resolve();return/[\u4E00-\u9FA5]/g.test(n)?Promise.reject("请勿输入中文字符"):n.length>20?Promise.reject("最大限制20个字符"):Promise.resolve()}}],children:(0,le.jsx)(j.Z,{placeholder:"请输入工号最大限制20个字符",className:B,suffix:" ",showCount:!0,maxLength:20})})})]}),(0,le.jsx)(Z.Z,o()(o()({placement:"bottom",title:function(){return(0,le.jsxs)("div",{children:[(0,le.jsx)("div",{children:"已提交职业认证"}),(0,le.jsxs)("div",{children:["可在",(0,le.jsx)("a",{href:"/account/certification",className:"c-blue",children:"认证信息"}),"中通过“重新认证”进行修改"]})]})}},Kn),{},{children:(0,le.jsxs)("div",{style:{position:"relative"},children:[(0,le.jsx)(g.Z.Item,{label:"学校/单位",name:"school",wrapperCol:{span:10},extra:!pn&&Ze.school&&!(null!=Fe&&Fe.find((function(e){return e.name===Ze.school})))&&(0,le.jsx)("div",{className:q,children:(0,le.jsxs)("span",{className:z,children:["未找到包含“",Ze.school,"”的高校,如有需要,请",(0,le.jsx)("span",{style:{color:"blue",cursor:"pointer"},onClick:function(){y.Z.info({title:"联系平台运营",width:400,icon:null,centered:!0,content:(0,le.jsxs)("div",{style:{textAlign:"center"},children:[(0,le.jsxs)("div",{style:{textAlign:"left"},children:["请扫码或搜索加入头歌官方交流QQ群","teacher"===Ze.identity?"727685969":"816055138",",联系群内的运营进行咨询和申请新增学校名称。"]}),(0,le.jsx)("img",{src:"teacher"===Ze.identity?ee:ne,style:{width:"170px",height:"170px",marginTop:"20px"}})]}),okText:"我知道了"})},children:"联系平台运营"}),"申请新增"]})}),rules:[{required:!0,message:"请先选择学校/单位"},{whitespace:!0,message:"请先选择学校/单位"}],children:(0,le.jsx)(w.Z,{status:En,size:"large",showSearch:!0,onChange:Wn,placeholder:"请输入单位名称",children:Te.map((function(e,n){return(0,le.jsx)(re,{value:e.name,children:e.name},n)}))})}),(0,le.jsx)("span",{className:R,children:(0,le.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,le.jsx)("path",{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"})})})]})})),(0,le.jsx)(Z.Z,o()(o()({placement:"bottom",title:function(){return(0,le.jsxs)("div",{children:[(0,le.jsx)("div",{children:"已提交职业认证"}),(0,le.jsxs)("div",{children:["可在",(0,le.jsx)("a",{href:"/account/certification",className:"c-blue",children:"认证信息"}),"中通过“重新认证”进行修改"]})]})}},Kn),{},{children:(0,le.jsxs)("div",{style:{position:"relative"},children:[(0,le.jsx)(g.Z.Item,{label:"院系/部门",name:"department",wrapperCol:{span:10},extra:!pn&&Ze.department&&!(null!=ze&&ze.find((function(e){return e.name===Ze.department})))&&(0,le.jsxs)("div",{className:q,children:[(0,le.jsx)("span",{className:z,children:Ze.department?"未找到包含“".concat(Ze.department,"”的高校,"):"未找到院系,"}),(0,le.jsxs)("span",{className:z,children:["如有需要,请",(0,le.jsx)("span",{style:{color:"blue",cursor:"pointer"},onClick:function(){y.Z.info({title:"联系平台运营",width:400,icon:null,centered:!0,content:(0,le.jsxs)("div",{style:{textAlign:"center"},children:[(0,le.jsxs)("div",{style:{textAlign:"left"},children:["请扫码或搜索加入头歌官方交流QQ群",rt("number"),",联系群内的运营人员申请新增部门或专业名称"]}),(0,le.jsx)("img",{src:rt("code"),style:{width:"170px",height:"170px",marginTop:"20px"}})]}),okText:"我知道了"})},children:"联系平台运营"}),"申请新增"]})]}),children:(0,le.jsx)(w.Z,{status:Rn,size:"large",placeholder:"请输入部门名称",onChange:function(e){""==e&&(he.setFieldsValue({major_name:""}),we(o()(o()({},he.getFieldsValue()),{major_name:""})),Oe([]),Je([]),Gn("")),lt(),Re(ze.filter((function(n){return n.name.includes(e)})))},children:Be.map((function(e,n){return(0,le.jsxs)(re,{value:e.name,children:[e.name,0==(null==e?void 0:e.status)&&(0,le.jsx)("span",{style:{color:"#FF8C29",marginLeft:"5px"},children:"(待审核)"})]},n)}))})}),(0,le.jsx)("span",{className:R,children:(0,le.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,le.jsx)("path",{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"})})})]})})),"student"===Ze.identity&&(0,le.jsx)(Z.Z,o()(o()({placement:"bottom",title:function(){return(0,le.jsxs)("div",{children:[(0,le.jsx)("div",{children:"已提交职业认证"}),(0,le.jsxs)("div",{children:["可在",(0,le.jsx)("a",{href:"/account/certification",className:"c-blue",children:"认证信息"}),"中通过“重新认证”进行修改"]})]})}},Kn),{},{children:(0,le.jsxs)("div",{style:{position:"relative"},children:[(0,le.jsx)(g.Z.Item,{label:"专业",name:"major_name",wrapperCol:{span:10},extra:"error"===On&&(0,le.jsx)("div",{className:q,children:(0,le.jsxs)("span",{className:z,children:["未找到“",Ze.major_name,"”专业,如有需要,请",(0,le.jsx)("span",{style:{color:"blue",cursor:"pointer"},onClick:function(){y.Z.info({title:"联系平台运营",width:400,icon:null,centered:!0,content:(0,le.jsxs)("div",{style:{textAlign:"center"},children:[(0,le.jsxs)("div",{style:{textAlign:"left"},children:["请扫码或搜索加入头歌官方交流QQ群","teacher"===Ze.identity?"727685969":"816055138",",联系群内的运营人员申请新增部门或专业名称。"]}),(0,le.jsx)("img",{src:"teacher"===Ze.identity?ee:ne,style:{width:"170px",height:"170px",marginTop:"20px"}})]}),okText:"我知道了"})},children:"联系平台运营"}),"申请新增"]})}),children:(0,le.jsx)(w.Z,{status:On,size:"large",placeholder:"请输入专业名称",onChange:function(e){Je(De.filter((function(n){return n.name.includes(e)}))),e&&0==(null==De?void 0:De.length)?Gn("error"):""!=e?e&&(null==De?void 0:De.length)>0&&De.find((function(n){return n.name===e}))&&Gn(""):Gn("")},children:Ue.map((function(e,n){return(0,le.jsxs)(re,{value:e.name,children:[e.name,0==(null==e?void 0:e.status)&&(0,le.jsx)("span",{style:{color:"#FF8C29",marginLeft:"5px"},children:"(待审核)"})]},n)}))})}),(0,le.jsx)("span",{className:R,children:(0,le.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,le.jsx)("path",{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"})})})]})})),(0,le.jsx)(g.Z.Item,{label:"昵称",name:"nickname",rules:[{message:"请输入您的昵称"},{validator:G.G7}],validateTrigger:"onSubmit",children:(0,le.jsx)(j.Z,{style:{height:40},placeholder:"请输入您的昵称,最大限制".concat(20,"个字符"),maxLength:20,suffix:"".concat((null===(t=Ze.nickname)||void 0===t?void 0:t.length)||0,"/").concat(20)})}),(0,le.jsx)(g.Z.Item,{labelCol:{span:3},wrapperCol:{span:4},label:"性别",className:"mb0",children:(0,le.jsx)(g.Z.Item,{name:"gender",children:(0,le.jsxs)(N.ZP.Group,{children:[(0,le.jsx)(N.ZP,{value:0,children:"男"}),(0,le.jsx)(N.ZP,{value:1,children:"女"})]})})}),(0,le.jsx)(g.Z.Item,{label:"入学年份",name:"edu_entry_year",wrapperCol:{span:10},children:(0,le.jsx)(v.default,{placeholder:"请选择入学年份",size:"large",children:(et=(new Date).getFullYear(),Array(31).fill({}).map((function(e,n){return(0,le.jsx)(re,{value:et-n,children:(0,le.jsx)("span",{children:et-n})},n)})))})}),(0,le.jsx)(g.Z.Item,{label:"最高学历",wrapperCol:{span:10},name:"edu_background",children:(0,le.jsx)(v.default,{placeholder:"请选择最高学历",size:"large",children:G.jh.map((function(e,n){return(0,le.jsx)(re,{value:e.id,children:e.name},n)}))})}),(0,le.jsxs)("div",{style:{display:"flex"},children:[(0,le.jsx)(g.Z.Item,{label:"上传证件照",wrapperCol:{span:10},name:"face_image",children:(0,le.jsx)(I.Z,{listType:"picture-card",withCredentials:!0,className:"avatar-uploader",fileList:Zn,onPreview:function(e){K.Z.publish("preview-image",e.thumbUrl||e.url)},action:"".concat(te.Z.API_SERVER,"/api/attachments.json"),beforeUpload:function(e){var n="image/jpeg"===e.type||"image/png"===e.type;if(!n)return _.ZP.error("您上传的不是JPG/PNG类型文件"),Promise.reject();var t=e.size/1024/1024<1;return t?n&&t:(_.ZP.error("文件不能大于1MB"),Promise.reject())},onChange:function(e){wn(l()(e.fileList))},children:(null==Zn?void 0:Zn.length)>0?null:ot})}),(0,le.jsxs)("div",{style:{marginLeft:16,color:"#666666",display:"flex",flexDirection:"column",marginTop:5},children:[(0,le.jsx)("span",{children:"要求:"}),(0,le.jsx)("span",{children:"1.学生照片必须为高清的人脸照"}),(0,le.jsx)("span",{children:"2.按照 姓名-学号 的方式来命名照片"}),(0,le.jsx)("span",{children:"3.图片大小在1MB以内"})]})]}),(0,le.jsxs)("div",{style:{position:"relative"},children:[(0,le.jsx)(g.Z.Item,{label:"简介",name:"brief_introduction",rules:[{required:!1}],children:(0,le.jsx)(se,{maxLength:500,rows:6})}),(0,le.jsxs)("div",{style:{position:"absolute",bottom:10,right:10},children:[null===(i=he.getFieldValue("brief_introduction"))||void 0===i?void 0:i.length,"/500"]})]}),(0,le.jsxs)(g.Z.Item,{children:[(0,le.jsx)(F.ZP,{className:"".concat(2===oe.actionTabs.type?Q:L," ml100"),size:"middle",type:"primary",onClick:function(){Vn(!0),he.submit()},loading:ce["account/editAccount"],children:"保存"}),(0,le.jsx)(F.ZP,{className:L,size:"middle",onClick:function(){return x.history.push("/account/profile")},children:"取消"})]})]})]}),(0,le.jsx)("div",{className:"".concat(A," font14"),children:"* 我们确保你所提供的信息均处于严格保密状态,不会泄露"}),(0,le.jsx)(H.Z,{visible:"Account-AppplySchool"===u.actionTabs.key,onClose:function(){de({type:"account/setActionTabs",payload:{}})},schoolName:Ze.school,onSuccess:at}),(0,le.jsx)(M.Z,{visible:"Account-AppplyDepartment"===u.actionTabs.key,onClose:function(){de({type:"account/setActionTabs",payload:{}})},schoolId:null===(a=Fe.find((function(e){return e.name===Ze.school})))||void 0===a?void 0:a.id,schoolName:Ze.school,departmentName:Ze.department,onSuccess:function(e){return tt(Ze.school,e)}}),(0,le.jsx)(ie.Z,{visible:"Account-AppplyProfession"===u.actionTabs.key,onClose:function(){de({type:"account/setActionTabs",payload:{}})},departmentId:null===(s=ze.find((function(e){return e.name===Ze.department})))||void 0===s?void 0:s.id,departmentName:Ze.department,majorName:Ze.major_name,onSuccess:function(e){he.setFieldsValue({major_name:e}),we(o()(o()({},he.getFieldsValue()),{major_name:e})),lt()}}),(0,le.jsx)(y.Z,{centered:!0,destroyOnClose:!0,open:tn,title:"头歌教师交流社区",width:560,footer:null,onCancel:function(){ln(!1)},children:(0,le.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,le.jsx)("aside",{style:{letterSpacing:1},children:"基于您所在院校与平台有深度合作我们特意为您配备了平台的1对1助教您可以扫描下方二维码添加助理微信我们将7*24小时为您答疑解惑。"}),(0,le.jsx)("img",{className:"mt20 mb20",src:O,width:162,height:162})]})}),(0,le.jsx)(y.Z,{title:"解绑学号",open:_e,centered:!0,destroyOnClose:!0,onCancel:function(){ye(!1),fe.resetFields()},onOk:function(){fe.submit()},children:(0,le.jsxs)(g.Z,{form:fe,size:"large",onValuesChange:function(e,n){ve(n)},onFinish:function(){var e=d()(r()().mark((function e(n){var t,i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,X.ZP)("/api/users/accounts/".concat(null==c||null===(t=c.userInfo)||void 0===t?void 0:t.user_id,"/unbind_student_id.json"),{method:"post",body:o()({student_id:Ze.studentNo,school_id:(null==Fe||null===(i=Fe.find((function(e){return e.name===Ze.school})))||void 0===i?void 0:i.id)||(null==Jn?void 0:Jn.school_id),check_type:4},n)});case 2:0==e.sent.status&&(_.ZP.success("解绑成功"),he.validateFields(),fe.resetFields(),ye(!1));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,le.jsxs)("div",{className:"mb20",children:["很抱歉,该学号(",Ze.studentNo||he.getFieldValue("studentNo"),")在",Ze.school,"内已被使用,您可以提供",(0,le.jsx)("span",{style:{color:"#3061d0"},children:"当前账号所在学校中任意一位已职业认证的教师姓名"}),"进行解绑:"]}),(0,le.jsx)(g.Z.Item,{name:"check_value",rules:[{required:!0,message:"请填写".concat(null==Ze?void 0:Ze.school,"中任意一位已职业认证的教师姓名")}],style:{marginBottom:"10px"},children:(0,le.jsx)(j.Z,{type:"text",placeholder:"请填写".concat(null==Ze?void 0:Ze.school,"中任意一位已职业认证的教师姓名")})}),(0,le.jsxs)("div",{children:["请注意,每位学生每天仅有 ",(0,le.jsx)("span",{style:{color:"#FA6400"},children:"2"})," 次成功解绑学号的机会,请谨慎操作"]})]})}),(0,le.jsx)(Y.Z,{}),(0,le.jsx)(D.Z,{})]})}))}}]);