|
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[13560],{13560: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),r=t(7557),a=t.n(r),s=t(82242),o=t.n(s),c=t(41498),d=t.n(c),u=t(79800),h=t.n(u),m=t(39647),p=t.n(m),f=t(59301),x=t(64201),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),I=t(5112),N=t(59028),F=t(3113),C="wrap___isQuw",S="content___Gh5i7",T="hint___dh6_r",V="title___Txz11",A="titleWrap___p75TL",P="formWrap___tyQRy",q="schoolHintWrap___WnTDr",z="colorCDCDCD___Xq4Mx",E="color0152d9___lAjmo",L="submitButton___LHi3i",Q="submitButtondiv___J6VbH",R="staffidInput___M9rEi",B="selecticon___T9WXy",H=t(66248),M=t(60121),D=t(11626),O=t(32637),G=t(23603),W=t(96192),U=t(42141),J=t(26762),Y=t(21207),K=t(26750),X=t(18838),$=t(89392),ee=t(29831),ne=t(75694),te=t(41681),ie=t(14024),le=t(37712),re=["user","account","globalSetting","shixunHomeworks","loading","dispatch"],ae=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,r=e.shixunHomeworks;return{user:n,account:t,globalSetting:l,loading:i.effects,shixunHomeworks:r}}))((function(e){var n,t,i,r,s,c=e.user,u=e.account,m=e.globalSetting,oe=e.shixunHomeworks,ce=e.loading,de=e.dispatch,ue=(p()(e,re),g.Z.useForm()),he=h()(ue,1)[0],me=g.Z.useForm(),pe=h()(me,1)[0],fe=(0,f.useState)({}),xe=h()(fe,2),ve=xe[0],je=xe[1],ge=(0,f.useState)(!1),_e=h()(ge,2),ye=_e[0],be=_e[1],ke=(0,f.useState)({}),Ze=h()(ke,2),we=Ze[0],Ie=Ze[1],Ne=(0,f.useState)([]),Fe=h()(Ne,2),Ce=Fe[0],Se=Fe[1],Te=(0,f.useState)([]),Ve=h()(Te,2),Ae=Ve[0],Pe=Ve[1],qe=(0,f.useState)([]),ze=h()(qe,2),Ee=ze[0],Le=ze[1],Qe=(0,f.useState)([]),Re=h()(Qe,2),Be=Re[0],He=Re[1],Me=(0,f.useState)([]),De=h()(Me,2),Oe=De[0],Ge=De[1],We=(0,f.useState)([]),Ue=h()(We,2),Je=Ue[0],Ye=Ue[1],Ke=(0,f.useState)(!0),Xe=h()(Ke,2),$e=Xe[0],en=Xe[1],nn=(0,f.useState)(!1),tn=h()(nn,2),ln=tn[0],rn=tn[1],an=(0,f.useState)(),sn=h()(an,2),on=sn[0],cn=sn[1],dn=(0,f.useState)(null),un=h()(dn,2),hn=un[0],mn=un[1],pn=(0,f.useState)(!0),fn=h()(pn,2),xn=fn[0],vn=fn[1],jn=(0,f.useState)(),gn=h()(jn,2),_n=(gn[0],gn[1],(0,f.useState)(!1)),yn=h()(_n,2),bn=yn[0],kn=(yn[1],(0,f.useState)([])),Zn=h()(kn,2),wn=Zn[0],In=Zn[1],Nn=(0,f.useState)(!0),Fn=h()(Nn,2),Cn=Fn[0],Sn=Fn[1],Tn=(0,f.useRef)(!0),Vn=(0,f.useState)(""),An=h()(Vn,2),Pn=An[0],qn=An[1],zn=(0,f.useState)(""),En=h()(zn,2),Ln=En[0],Qn=En[1],Rn=(0,f.useState)(""),Bn=h()(Rn,2),Hn=Bn[0],Mn=Bn[1],Dn=(0,f.useRef)((0,$.throttle)((function(e){return Jn(e)}),1200,{leading:!0,trailing:!0})).current,On=u.basicInfo,Gn=void 0===On?{}:On,Wn=Gn&&"certified"==Gn.professional_certification,Un={visible:!1};(0,f.useEffect)((function(){var e,n;null!==(e=u.basicInfo)&&void 0!==e&&e.school_name&&Jn(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,f.useEffect)((function(){Cn&&(he.setFieldsValue({studentNo:we.studentNo}),he.validateFields(["studentNo"]))}),[we.studentNo]),(0,f.useEffect)((function(){xn||!we.school||Ce.find((function(e){return e.name===we.school}))?qn(""):qn("error")}),[xn,we.school,Ce]),(0,f.useEffect)((function(){xn||!we.department||Ee.find((function(e){return e.name===we.department}))?Qn(""):Qn("error")}),[xn,we.department,Ee]),(0,f.useEffect)((function(){!xn&&we.major_name&&(null==Oe?void 0:Oe.length)>0&&!Oe.find((function(e){return e.name===we.major_name}))&&Mn("error")}),[xn,we.major_name]);var Jn=function(){var e=d()(a()().mark((function e(n){var t,i,l;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return vn(!0),e.next=3,de({type:"account/getSchoolOption",payload:{keyword:n,limit:99999,display_aliases:!0}});case 3:if(t=e.sent,Se(null==t?void 0:t.schools),Pe(null==t?void 0:t.schools),!n||""==n){e.next=24;break}if(Pe(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,$n(n,null==Gn?void 0:Gn.department_name,null==t?void 0:t.schools);case 12:e.next=22;break;case 14:he.setFieldsValue({department:"",major_name:""}),Ie(o()(o()({},he.getFieldValue()),{school:n,department:"",major_name:""})),Le([]),He([]),Ge([]),Ye([]),Qn(""),Mn("");case 22:e.next=32;break;case 24:he.setFieldsValue({department:"",major_name:""}),Ie(o()(o()({},he.getFieldValue()),{department:"",major_name:""})),Le([]),He([]),Ge([]),Ye([]),Qn(""),Mn("");case 32:vn(!1);case 33:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Yn=function(e){if(e)return de({type:"account/getDepartmentOption",payload:{id:e}})};(0,f.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)In([{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]}}]);cn(i.name),en(i.show_realname),mn(i.identity),he.setFieldsValue(l),Ie(l)}}),[u.basicInfo]);var Kn,Xn,$n=function(){var e=d()(a()().mark((function e(n,t,i){var r,s,c,d,u;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(t),console.log(Tn),c=null===(r=(i||Ce).find((function(e){return e.name===n})))||void 0===r?void 0:r.id,e.next=5,Yn(c);case 5:if(e.t0=e.sent,e.t0){e.next=8;break}e.t0={};case 8:d=e.t0,u=Tn.current?t:null==d||null===(s=d.departments[0])||void 0===s?void 0:s.name,he.setFieldsValue({department:u}),Ie(o()(o()({},he.getFieldsValue()),{school:n,department:u})),Le(l()(null==d?void 0:d.departments)),He(l()(null==d?void 0:d.departments)),Mn(""),et(Tn.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)}}(),et=function(){var e=d()(a()().mark((function e(){var n,t,i,r,s,c,d,u,h,m,p=arguments;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=p.length>0&&void 0!==p[0]&&p[0],r=p.length>1?p[1]:void 0,s=p.length>2?p[2]:void 0,console.log(he.getFieldsValue()),console.log(we),console.log(Ce),Tn.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=r.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)&&(Ge(l()(null==u?void 0:u.majors)),Ye(l()(null==u?void 0:u.majors)),m=i?null==Gn?void 0:Gn.major_name:null==u||null===(h=u.majors[0])||void 0===h?void 0:h.name,he.setFieldsValue({major_name:m}),Ie(o()(o()({},he.getFieldsValue()),{major_name:m})));case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),nt=function(){var e=d()(a()().mark((function e(){var n,t,i,r,s,c,d;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=null===(n=Ce.find((function(e){return e.name===he.getFieldValue("school")})))||void 0===n?void 0:n.id,!(r=null===(t=Ee.find((function(e){return e.name===he.getFieldValue("department")})))||void 0===t?void 0:t.id)){e.next=8;break}return Mn(""),e.next=6,(0,X.ZP)("/api/schools/".concat(i,"/departments/").concat(r,"/major_option.json"),{method:"get"});case 6:0==(null==(s=e.sent)?void 0:s.status)&&(Ge(l()(null==s?void 0:s.majors)),Ye(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}),Ie(o()(o()({},he.getFieldsValue()),{major_name:d})));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),tt=function(){var e=d()(a()().mark((function e(n){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jn();case 2:he.setFieldsValue({school:n,department:""}),Ie(o()(o()({},we),{school:n,department:""}));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),it=function(e){var n,t,i,l;return"number"===e?"teacher"===we.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"===we.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},lt=function(){var e=d()(a()().mark((function e(n){var t,i,l,r,s,o,h,m,p,f,v,j,g,b,k,Z,w,I,N,F,C,S,T,V,A,P,q;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.nickname,s=n.gender,o=n.identity,h=n.studentNo,m=n.jobTitle,p=n.manager,f=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=Ee.find((function(e){return e.name===v})))||void 0===t?void 0:t.id,I=null===(i=Ce.find((function(e){return e.name===f})))||void 0===i?void 0:i.id,N=null===(l=Oe.find((function(e){return e.name===Z})))||void 0===l?void 0:l.id,F=u.basicInfo,console.log("B",n,F),C=[],"uncertified"!=F.authentication&&(on!=F.name&&C.push("姓名"),s!=F.gender&&C.push("性别")),S=[],Wn&&(o!=F.identity?S.push("职业"):(we.identity,"teacher"===we.identity&&m!=F.technical_title&&S.push("职业"),"professional"===we.identity&&p!=F.technical_title&&S.push("职业")),f!=F.school_name&&S.push("学校/单位"),v!=F.department_name&&S.push("院系/部门"),Z!=F.major_name&&S.push("专业")),I){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群:",it("number"),",联系群内的运营进行咨询和申请新增学校名称。"]}),(0,le.jsx)("img",{src:it("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群:",it("number"),",联系群内的运营人员申请新增部门或专业名称。"]}),(0,le.jsx)("img",{src:it("code"),style:{width:"170px",height:"170px",marginTop:"20px"}})]}),okText:"我知道了"}),e.abrupt("return");case 16:if(!Z||N){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群:",it("number"),",联系群内的运营人员申请新增部门或专业名称。"]}),(0,le.jsx)("img",{src:it("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()(a()().mark((function e(){var n,t,i,l,d,f,v;return a()().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:N,gender:s,identity:o,location:location,name:on,nickname:r,school_id:I,edu_background:j,edu_entry_year:g,show_realname:$e,brief_introduction:b,student_id:"student"===o?h:null,technical_title:m||p,face_image:null==wn||null===(t=wn[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!==(f=u.basicInfo)&&void 0!==f&&f.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===hn||"teacher"!==o){e.next=18;break}return rn(!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===(T=u.basicInfo)||void 0===T?void 0:T.id,department_id:w,major_id:N,gender:s,identity:o,location:location,name:on,nickname:r,school_id:I,edu_background:j,edu_entry_year:g,staff_id:k,show_realname:$e,brief_introduction:b,student_id:"student"===o?h:null,technical_title:m||p,face_image:null==wn||null===(V=wn[0])||void 0===V||null===(V=V.response)||void 0===V?void 0:V.id}});case 25:if(-1!==(null==(A=e.sent)?void 0:A.status)){e.next=28;break}return e.abrupt("return");case 28:if(!A){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===hn||"teacher"!==o){e.next=35;break}return rn(!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)}}(),rt=(0,le.jsxs)("div",{children:[bn?(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:A,children:(0,le.jsx)("div",{className:V,children:"基本信息"})}),(0,le.jsxs)(g.Z,{form:he,className:P,layout:"horizontal",onValuesChange:function(e){var n;Ie(o()({},he.getFieldsValue())),(null==e||null===(n=e.nickname)||void 0===n?void 0:n.length)<=0&&(en(!0),he.setFieldsValue({name:on})),"name"in e&&cn(e.name),"identity"in e&&he.setFieldsValue({staff_id:""})},onFinish:lt,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:we.nickname?$e?"显示:平台将显示您的真实姓名":"隐藏:平台将显示你的昵称":"填写昵称后可设置姓名进行隐藏(当进行姓名搜索时,会展示您的真实姓名)"}),children:(0,le.jsx)(j.Z,{style:{height:40},disabled:!!we.nickname&&!$e,placeholder:"请输入真实姓名,最大限制".concat(20,"个字符"),maxLength:20,suffix:we.nickname?(0,le.jsx)("i",{style:{lineHeight:"26px"},className:"iconfont ".concat($e?"icon-xianshi":"icon-yincang"," font18 ").concat(E),onClick:function(){var e=!$e;en(e);var n=e?on:(0,G.YA)(on);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:"认证信息"}),"中通过“重新认证”进行修改"]})]})}},Un),{},{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)(ae,{value:"teacher",children:"教师"}),(0,le.jsx)(ae,{value:"student",children:"学生"}),(0,le.jsx)(ae,{value:"professional",children:"专业人士"})]})})}))}),(0,le.jsxs)(k.Z,{children:["student"===we.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:"认证信息"}),"中通过“重新认证”进行修改"]})]})}},Un),{},{children:(0,le.jsx)(g.Z.Item,{initialValue:we.studentNo,name:"studentNo",validateTrigger:"onBlur",rules:[{whitespace:!0,message:"不能全为空"},{required:!0,validator:(Xn=d()(a()().mark((function e(n,t){var i,l,r;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Sn(!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==Gn?void 0:Gn.school_id)||(null==Ce||null===(l=Ce.find((function(e){return e.name===we.school})))||void 0===l?void 0:l.id),student_id:t}});case 3:return r=e.sent,e.abrupt("return",(null==r?void 0:r.status)<-1?Promise.reject((0,le.jsxs)("span",{children:["该学号已被使用,如需继续使用该学号,请先",(0,le.jsx)("a",{onClick:function(){be(!0),je({check_type:4})},children:"解绑学号"})]})):Promise.resolve());case 5:case"end":return e.stop()}}),e)}))),function(e,n){return Xn.apply(this,arguments)})}],children:(0,le.jsx)(j.Z,{size:"large",style:{width:320},type:"text",placeholder:"请输入学号,最大限制20个字符",showCount:!0,maxLength:20})})})),"teacher"===we.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:"认证信息"}),"中通过“重新认证”进行修改"]})]})}},Un),{},{children:(0,le.jsx)(g.Z.Item,{initialValue:we.jobTitle,name:"jobTitle",rules:[{required:!0,message:"请先选择职称"}],children:(0,le.jsxs)(v.default,{style:{width:200},size:"large",children:[(0,le.jsx)(ae,{value:"教授",children:"教授"}),(0,le.jsx)(ae,{value:"研究员",children:"研究员"}),(0,le.jsx)(ae,{value:"副教授",children:"副教授"}),(0,le.jsx)(ae,{value:"副研究员",children:"副研究员"}),(0,le.jsx)(ae,{value:"讲师",children:"讲师"}),(0,le.jsx)(ae,{value:"助理研究员",children:"助理研究员"}),(0,le.jsx)(ae,{value:"助理教授",children:"助理教授"})]})})})),"professional"===we.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:"认证信息"}),"中通过“重新认证”进行修改"]})]})}},Un),{},{children:(0,le.jsx)(g.Z.Item,{initialValue:we.manager,name:"manager",rules:[{required:!0,message:"请先选择职称"}],children:(0,le.jsxs)(v.default,{style:{width:200},size:"large",children:[(0,le.jsx)(ae,{value:"企业管理者",children:"企业管理者"}),(0,le.jsx)(ae,{value:"部门管理者",children:"部门管理者"}),(0,le.jsx)(ae,{value:"高级工程师",children:"高级工程师"}),(0,le.jsx)(ae,{value:"工程师",children:"工程师"}),(0,le.jsx)(ae,{value:"助理工程师",children:"助理工程师"})]})})}))]}),("teacher"===we.identity||"professional"===we.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:R,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:"认证信息"}),"中通过“重新认证”进行修改"]})]})}},Un),{},{children:(0,le.jsxs)("div",{style:{position:"relative"},children:[(0,le.jsx)(g.Z.Item,{label:"学校/单位",name:"school",wrapperCol:{span:10},extra:!xn&&we.school&&!(null!=Ce&&Ce.find((function(e){return e.name===we.school})))&&(0,le.jsx)("div",{className:q,children:(0,le.jsxs)("span",{className:z,children:["未找到包含“",we.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"===we.identity?"727685969":"816055138",",联系群内的运营进行咨询和申请新增学校名称。"]}),(0,le.jsx)("img",{src:"teacher"===we.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:Pn,size:"large",showSearch:!0,onChange:Dn,placeholder:"请输入单位名称",children:Ae.map((function(e,n){return(0,le.jsx)(ae,{value:e.name,children:e.name},n)}))})}),(0,le.jsx)("span",{className:B,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:"认证信息"}),"中通过“重新认证”进行修改"]})]})}},Un),{},{children:(0,le.jsxs)("div",{style:{position:"relative"},children:[(0,le.jsx)(g.Z.Item,{label:"院系/部门",name:"department",wrapperCol:{span:10},extra:!xn&&we.department&&!(null!=Ee&&Ee.find((function(e){return e.name===we.department})))&&(0,le.jsxs)("div",{className:q,children:[(0,le.jsx)("span",{className:z,children:we.department?"未找到包含“".concat(we.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群:",it("number"),",联系群内的运营人员申请新增部门或专业名称"]}),(0,le.jsx)("img",{src:it("code"),style:{width:"170px",height:"170px",marginTop:"20px"}})]}),okText:"我知道了"})},children:"联系平台运营"}),"申请新增"]})]}),children:(0,le.jsx)(w.Z,{status:Ln,size:"large",placeholder:"请输入部门名称",onChange:function(e){""==e&&(he.setFieldsValue({major_name:""}),Ie(o()(o()({},he.getFieldsValue()),{major_name:""})),Ge([]),Ye([]),Mn("")),nt(),He(Ee.filter((function(n){return n.name.includes(e)})))},children:Be.map((function(e,n){return(0,le.jsxs)(ae,{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:B,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:"认证信息"}),"中通过“重新认证”进行修改"]})]})}},Un),{},{children:(0,le.jsxs)("div",{style:{position:"relative"},children:[(0,le.jsx)(g.Z.Item,{label:"专业",name:"major_name",wrapperCol:{span:10},extra:"error"===Hn&&(0,le.jsx)("div",{className:q,children:(0,le.jsxs)("span",{className:z,children:["未找到“",we.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"===we.identity?"727685969":"816055138",",联系群内的运营人员申请新增部门或专业名称。"]}),(0,le.jsx)("img",{src:"teacher"===we.identity?ee:ne,style:{width:"170px",height:"170px",marginTop:"20px"}})]}),okText:"我知道了"})},children:"联系平台运营"}),"申请新增"]})}),children:(0,le.jsx)(w.Z,{status:Hn,size:"large",placeholder:"请输入专业名称",onChange:function(e){Ye(Oe.filter((function(n){return n.name.includes(e)}))),e&&0==(null==Oe?void 0:Oe.length)?Mn("error"):""!=e?e&&(null==Oe?void 0:Oe.length)>0&&Oe.find((function(n){return n.name===e}))&&Mn(""):Mn("")},children:Je.map((function(e,n){return(0,le.jsxs)(ae,{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:B,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=we.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)(I.ZP.Group,{children:[(0,le.jsx)(I.ZP,{value:0,children:"男"}),(0,le.jsx)(I.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:(Kn=(new Date).getFullYear(),Array(31).fill({}).map((function(e,n){return(0,le.jsx)(ae,{value:Kn-n,children:(0,le.jsx)("span",{children:Kn-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)(ae,{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)(N.Z,{listType:"picture-card",withCredentials:!0,className:"avatar-uploader",fileList:wn,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){In(l()(e.fileList))},children:(null==wn?void 0:wn.length)>0?null:rt})}),(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",htmlType:"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(T," font14"),children:"* 我们确保你所提供的信息均处于严格保密状态,不会泄露"}),(0,le.jsx)(H.Z,{visible:"Account-AppplySchool"===u.actionTabs.key,onClose:function(){de({type:"account/setActionTabs",payload:{}})},schoolName:we.school,onSuccess:tt}),(0,le.jsx)(M.Z,{visible:"Account-AppplyDepartment"===u.actionTabs.key,onClose:function(){de({type:"account/setActionTabs",payload:{}})},schoolId:null===(r=Ce.find((function(e){return e.name===we.school})))||void 0===r?void 0:r.id,schoolName:we.school,departmentName:we.department,onSuccess:function(e){return $n(we.school,e)}}),(0,le.jsx)(ie.Z,{visible:"Account-AppplyProfession"===u.actionTabs.key,onClose:function(){de({type:"account/setActionTabs",payload:{}})},departmentId:null===(s=Ee.find((function(e){return e.name===we.department})))||void 0===s?void 0:s.id,departmentName:we.department,majorName:we.major_name,onSuccess:function(e){he.setFieldsValue({major_name:e}),Ie(o()(o()({},he.getFieldsValue()),{major_name:e})),nt()}}),(0,le.jsx)(y.Z,{centered:!0,destroyOnClose:!0,open:ln,title:"头歌教师交流社区",width:560,footer:null,onCancel:function(){rn(!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:ye,centered:!0,destroyOnClose:!0,onCancel:function(){be(!1),pe.resetFields()},onOk:function(){pe.submit()},children:(0,le.jsxs)(g.Z,{form:pe,initialValues:{check_type:4},size:"large",onValuesChange:function(e,n){je(n)},onFinish:function(){var e=d()(a()().mark((function e(n){var t,i;return a()().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:we.studentNo,school_id:(null==Gn?void 0:Gn.school_id)||(null==Ce||null===(i=Ce.find((function(e){return e.name===we.school})))||void 0===i?void 0:i.id)},n)});case 2:0==e.sent.status&&(_.ZP.success("解绑成功"),he.validateFields(),pe.resetFields(),be(!1));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,le.jsxs)("div",{children:["很抱歉,该学号(",we.studentNo,")已被使用,您可以提供当前账号所在学校或者原账号(使用该学号的账号)的相关信息进行解绑:"]}),(0,le.jsxs)("div",{className:"mt20 mb20",style:{background:"#f5f5f5",borderRadius:"5px",padding:"10px"},children:["1、当前账号所在学校中任意一位已职业认证的教师姓名;",(0,le.jsx)("br",{}),"2、原账号绑定的手机号码或者邮箱;",(0,le.jsx)("br",{}),"3、原账号已加入的教学课堂中教师手机号后6位或者课堂邀请码;",(0,le.jsx)("br",{}),"注意:请确保原账号所在学校与已加入的教学课堂所属学校相同。"]}),(0,le.jsxs)(b.Z,{gutter:[10,0],children:[(0,le.jsx)(k.Z,{span:6,children:(0,le.jsx)(g.Z.Item,{name:"check_type",children:(0,le.jsxs)(v.default,{children:[(0,le.jsx)(ae,{value:4,children:"教师姓名"}),(0,le.jsx)(ae,{value:1,children:"邀请码"}),(0,le.jsx)(ae,{value:2,children:"手机号"}),(0,le.jsx)(ae,{value:3,children:"邮箱"})]})})}),(0,le.jsxs)(k.Z,{flex:1,children:[1==(null==ve?void 0:ve.check_type)&&(0,le.jsx)(g.Z.Item,{name:"check_value",rules:[{required:!0,message:"请提供所在学校的教学课堂的邀请码"}],children:(0,le.jsx)(j.Z,{type:"text",placeholder:"请提供所在学校的教学课堂的邀请码",maxLength:10})}),2==(null==ve?void 0:ve.check_type)&&(0,le.jsx)(g.Z.Item,{name:"check_value",rules:[{required:!0,message:"请输入手机号码"}],children:(0,le.jsx)(j.Z,{type:"text",placeholder:"请输入手机号码",maxLength:11})}),3==(null==ve?void 0:ve.check_type)&&(0,le.jsx)(g.Z.Item,{name:"check_value",rules:[{required:!0,type:"email",message:"请输入邮箱"}],children:(0,le.jsx)(j.Z,{type:"text",placeholder:"请输入邮箱"})}),4==(null==ve?void 0:ve.check_type)&&(0,le.jsx)(g.Z.Item,{name:"check_value",rules:[{required:!0,message:"请输入所在学校中任意一位已职业认证的教师姓名"}],children:(0,le.jsx)(j.Z,{type:"text",placeholder:"请输入所在学校中任意一位已职业认证的教师姓名"})})]})]})]})}),(0,le.jsx)(Y.Z,{}),(0,le.jsx)(D.Z,{})]})}))}}]); |