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

1 line
33 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([[30713],{67147:function(e,n,t){t.d(n,{Z:function(){return c}});var i=t(33614),r=t(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},s=t(1393),l=function(e,n){return r.createElement(s.Z,(0,i.Z)({},e,{ref:n,icon:a}))};var c=r.forwardRef(l)},59015:function(e,n,t){t.d(n,{Z:function(){return o}});var i=t(79800),r=t.n(i),a=t(59301),s=t(53200),l=t(29502),c=t(37712),o=function(){var e=(0,a.useState)(""),n=r()(e,2),t=n[0],i=n[1],o=(0,a.useState)(0),d=r()(o,2),u=(d[0],d[1]),h=(0,a.useState)(),m=r()(h,2),f=(m[0],m[1]),p=(0,a.useState)(),x=r()(p,2),v=(x[0],x[1]),j=(0,a.useState)(!1),g=r()(j,2),y=(g[0],g[1],(0,a.useRef)(""));function _(e){27==e.keyCode&&y.current&&b()}function b(){document.body.style.overflow="auto",f(void 0),v(void 0),u(0),i("")}(0,a.useEffect)((function(){return s.Z.subscribe("preview-image",(function(e){i(e),console.log(Z.current),document.body.style.overflow="hidden"}))}),[]),(0,a.useEffect)((function(){return document.addEventListener("keydown",_),function(){document.removeEventListener("keydown",_)}}),[]),(0,a.useEffect)((function(){y.current=t}),[t]);(0,a.useRef)();var k=(0,a.useRef)(),Z=(0,a.useRef)();return(0,c.jsx)(a.Fragment,{children:t?(0,c.jsx)("div",{children:(0,c.jsx)("div",{className:"preview-wrp-group",ref:k,children:(0,c.jsx)(l.Z,{className:"image-preview",src:t,style:{display:"none"},preview:{visible:!0,src:t,movable:!1,onVisibleChange:function(e){i("")}},alt:"预览大图"})})}):null})}},30713:function(e,n,t){t.r(n),t.d(n,{default:function(){return ce},identityMap:function(){return le}});var i=t(37205),r=t.n(i),a=t(7557),s=t.n(a),l=t(82242),c=t.n(l),o=t(41498),d=t.n(o),u=t(79800),h=t.n(u),m=t(39647),f=t.n(m),p=t(59301),x=t(32007),v=t(57809),j=t(92832),g=t(78241),y=t(8591),_=t(43418),b=t(95237),k=t(43604),Z=t(6848),w=t(88522),N=t(5112),I=t(53326),C=t(3113),A="wrap___isQuw",T="content___Gh5i7",S="hint___dh6_r",F="title___Txz11",P="titleWrap___p75TL",V="formWrap___tyQRy",q="schoolHintWrap___WnTDr",z="colorCDCDCD___Xq4Mx",E="color0152d9___lAjmo",L="submitButton___LHi3i",R="submitButtondiv___J6VbH",H="staffidInput___M9rEi",Q=t(1291),O=t(40684),D=t(47734),B=t(32637),M=t(66621),G=t(13868),U=t(42857),W=t(67147),J=t(59015),Y=t(53200),K=t(85750),X=t(89392),$=t(29831),ee=t(95836),ne=t(20817),te=t(84783),ie=t(37712),re=["user","account","globalSetting","shixunHomeworks","loading","dispatch"],ae=v.default.Option,se=j.Z.TextArea,le={teacher:"教师",student:"学生",professional:"专业人士"},ce=(0,x.connect)((function(e){var n=e.user,t=e.account,i=e.loading,r=e.globalSetting,a=e.shixunHomeworks;return{user:n,account:t,globalSetting:r,loading:i.effects,shixunHomeworks:a}}))((function(e){var n,t,i,a,l,o=e.user,u=e.account,m=(e.globalSetting,e.shixunHomeworks),le=e.loading,ce=e.dispatch,oe=(f()(e,re),g.Z.useForm()),de=h()(oe,1)[0],ue=g.Z.useForm(),he=h()(ue,1)[0],me=(0,p.useState)({}),fe=h()(me,2),pe=fe[0],xe=fe[1],ve=(0,p.useState)(!1),je=h()(ve,2),ge=je[0],ye=je[1],_e=(0,p.useState)({}),be=h()(_e,2),ke=be[0],Ze=be[1],we=(0,p.useState)([]),Ne=h()(we,2),Ie=Ne[0],Ce=Ne[1],Ae=(0,p.useState)([]),Te=h()(Ae,2),Se=Te[0],Fe=Te[1],Pe=(0,p.useState)([]),Ve=h()(Pe,2),qe=Ve[0],ze=Ve[1],Ee=(0,p.useState)([]),Le=h()(Ee,2),Re=Le[0],He=Le[1],Qe=(0,p.useState)([]),Oe=h()(Qe,2),De=Oe[0],Be=Oe[1],Me=(0,p.useState)([]),Ge=h()(Me,2),Ue=Ge[0],We=Ge[1],Je=(0,p.useState)(!0),Ye=h()(Je,2),Ke=Ye[0],Xe=Ye[1],$e=(0,p.useState)(!1),en=h()($e,2),nn=en[0],tn=en[1],rn=(0,p.useState)(),an=h()(rn,2),sn=an[0],ln=an[1],cn=(0,p.useState)(null),on=h()(cn,2),dn=on[0],un=on[1],hn=(0,p.useState)(!0),mn=h()(hn,2),fn=mn[0],pn=mn[1],xn=(0,p.useState)(),vn=h()(xn,2),jn=(vn[0],vn[1],(0,p.useState)(!1)),gn=h()(jn,2),yn=gn[0],_n=(gn[1],(0,p.useState)([])),bn=h()(_n,2),kn=bn[0],Zn=bn[1],wn=(0,p.useState)(!0),Nn=h()(wn,2),In=Nn[0],Cn=Nn[1],An=(0,p.useRef)((0,X.throttle)((function(e){return Vn(e)}),1200,{leading:!0,trailing:!0})).current,Tn=u.basicInfo,Sn=void 0===Tn?{}:Tn,Fn=Sn&&"certified"==Sn.professional_certification,Pn={visible:!1};(0,p.useEffect)((function(){var e,n;null!==(e=u.basicInfo)&&void 0!==e&&e.school_name&&Vn(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(){In&&(de.setFieldsValue({studentNo:ke.studentNo}),de.validateFields(["studentNo"]))}),[ke.studentNo]);var Vn=function(){var e=d()(s()().mark((function e(n){var t,i,r;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return pn(!0),e.next=3,ce({type:"account/getSchoolOption",payload:{keyword:n,limit:10,display_aliases:!0}});case 3:if(t=e.sent,Ce(null==t?void 0:t.schools),!n||""==n){e.next=15;break}if(Fe(null==t||null===(i=t.schools)||void 0===i?void 0:i.filter((function(e){return e.name.includes(n)}))),!((null==t||null===(r=t.schools)||void 0===r?void 0:r.find((function(e){return e.name===n})))||{}).id){e.next=13;break}return e.next=11,Ln(n,null==Sn?void 0:Sn.department_name,null==t?void 0:t.schools);case 11:e.next=15;break;case 13:de.setFieldsValue({department:""}),Ze(c()(c()({},de.getFieldValue()),{school:n,department:""}));case 15:pn(!1);case 16:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),qn=function(e){if(e)return ce({type:"account/getDepartmentOption",payload:{id:e}})};(0,p.useEffect)((function(){if(u.basicInfo){var e,n,t,i=u.basicInfo,r={nickname:i.nickname,name:i.show_realname?i.name:(0,M.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===M.jh||void 0===M.jh||null===(n=M.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)Zn([{uid:"111",name:"111",url:ne.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]}}]);ln(i.name),Xe(i.show_realname),un(i.identity),de.setFieldsValue(r),Ze(r)}}),[u.basicInfo]);var zn=function(){Ie.find((function(e){return e.name===ke.school}))?ce({type:"account/setActionTabs",payload:{key:"Account-AppplyDepartment"}}):y.ZP.info("请先选择正确的单位或者学校!")},En=function(){qe.find((function(e){return e.name===ke.department}))?ce({type:"account/setActionTabs",payload:{key:"Account-AppplyProfession"}}):y.ZP.info("请先选择正确的院系或者部门!")},Ln=function(){var e=d()(s()().mark((function e(n,t,i){var r,a,l,o,d;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=null===(r=(i||Ie).find((function(e){return e.name===n})))||void 0===r?void 0:r.id,e.next=3,qn(l);case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={};case 6:o=e.t0,ze(null==o?void 0:o.departments),d=t||(null==o||null===(a=o.departments)||void 0===a||null===(a=a[0])||void 0===a?void 0:a.name),de.setFieldsValue({department:d}),Ze(c()(c()({},de.getFieldsValue()),{school:n,department:d}));case 11:case"end":return e.stop()}}),e)})));return function(n,t,i){return e.apply(this,arguments)}}();(0,p.useEffect)((function(){Qn()}),[qe]);var Rn,Hn,Qn=function(){var e=d()(s()().mark((function e(){var n,t,i,r,a;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=null===(n=Ie.find((function(e){return e.name===de.getFieldValue("school")})))||void 0===n?void 0:n.id,!(r=null===(t=qe.find((function(e){return e.name===de.getFieldValue("department")})))||void 0===t?void 0:t.id)){e.next=7;break}return e.next=5,(0,K.ZP)("/api/schools/".concat(i,"/departments/").concat(r,"/major_option.json"),{method:"get"});case 5:0==(null==(a=e.sent)?void 0:a.status)&&Be(null==a?void 0:a.majors);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),On=function(){var e=d()(s()().mark((function e(n){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Vn();case 2:de.setFieldsValue({school:n,department:""}),Ze(c()(c()({},ke),{school:n,department:""}));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Dn=function(){var e=d()(s()().mark((function e(n){var t,i,r,a,l,c,h,m,f,p,v,j,g,b,k,Z,w,N,I,C,A,T,S,F,P,V,q,z,E;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.nickname,l=n.gender,c=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=qe.find((function(e){return e.name===v})))||void 0===t?void 0:t.id,N=null===(i=Ie.find((function(e){return e.name===p})))||void 0===i?void 0:i.id,I=null===(r=De.find((function(e){return e.name===Z})))||void 0===r?void 0:r.id,C=u.basicInfo,console.log("B",n,C),A=[],"uncertified"!=C.authentication&&(sn!=C.name&&A.push("姓名"),l!=C.gender&&A.push("性别")),T=[],Fn&&(c!=C.identity?T.push("职业"):(ke.identity,"teacher"===ke.identity&&m!=C.technical_title&&T.push("职业"),"professional"===ke.identity&&f!=C.technical_title&&T.push("职业")),p!=C.school_name&&T.push("学校/单位"),v!=C.department_name&&T.push("院系/部门"),Z!=C.major_name&&T.push("专业")),N){e.next=13;break}return _.Z.info({title:"联系平台运营",width:400,icon:null,centered:!0,content:(0,ie.jsxs)("div",{style:{textAlign:"center"},children:[(0,ie.jsxs)("div",{style:{textAlign:"left"},children:["请扫码或搜索加入头歌官方交流QQ群","teacher"===ke.identity?"727685969":"623193762",",联系群内的运营进行咨询和申请新增学校名称。"]}),(0,ie.jsx)("img",{src:"teacher"===ke.identity?$:ee,style:{width:"170px",height:"170px",marginTop:"20px"}})]}),okText:"我知道了"}),e.abrupt("return");case 13:if(!v||w){e.next=16;break}return S=_.Z.confirm({icon:null,width:600,centered:!0,okText:"新增",cancelText:"取消",title:"提示",content:(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsx)("p",{children:"系统未找到您填写的院系/部门,是否申请新增该部门?"})}),onOk:zn,onCancel:function(){S.destroy()}}),e.abrupt("return");case 16:if(!Z||I){e.next=19;break}return"teacher"==ke.identity?F=_.Z.confirm({icon:null,width:600,centered:!0,okText:"新增",cancelText:"取消",title:"提示",content:(0,ie.jsx)(ie.Fragment,{children:(0,ie.jsx)("p",{children:"系统未找到您填写的专业,是否申请新增该专业?"})}),onOk:En,onCancel:function(){F.destroy()}}):_.Z.info({title:"联系平台运营",width:400,icon:null,centered:!0,content:(0,ie.jsxs)("div",{style:{textAlign:"center"},children:[(0,ie.jsxs)("div",{style:{textAlign:"left"},children:["请扫码或搜索加入头歌官方交流QQ群","teacher"===ke.identity?"727685969":"623193762",",联系群内的运营进行咨询和申请新增专业名称。"]}),(0,ie.jsx)("img",{src:"teacher"===ke.identity?$:ee,style:{width:"170px",height:"170px",marginTop:"20px"}})]}),okText:"我知道了"}),e.abrupt("return");case 19:if(!(A.length>0||T.length>0)){e.next=23;break}_.Z.confirm({centered:!0,icon:null,okText:"确定",cancelText:"取消",title:"提示",content:(0,ie.jsx)("div",{children:"本次修改涉及".concat(A.toString().replaceAll(",","、")).concat(A.length>0&&T.length>0?"、":"").concat(T.toString().replaceAll(",","、"),",需要重新进行").concat(A.length>0?"实名认证":"").concat(A.length>0&&T.length>0?"和":"").concat(T.length>0?"职业认证":"",",请确认是否进行修改")}),onOk:function(){var e=d()(s()().mark((function e(){var n,t,i,r,d,p,v;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(A.length>0)){e.next=3;break}return e.next=3,(0,G.RA)({login:null===(i=o.userInfo)||void 0===i?void 0:i.login});case 3:if(!(T.length>0)){e.next=6;break}return e.next=6,(0,G.kN)({login:null===(r=o.userInfo)||void 0===r?void 0:r.login});case 6:return e.next=8,ce({type:"account/updateAccount",payload:{id:null===(n=u.basicInfo)||void 0===n?void 0:n.id,department_id:w,major_id:I,gender:l,identity:c,location:location,name:sn,nickname:a,school_id:N,edu_background:j,edu_entry_year:g,show_realname:Ke,brief_introduction:b,student_id:"student"===c?h:null,technical_title:m||f,face_image:null==kn||null===(t=kn[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(y.ZP.info("保存成功"),null!==(p=u.basicInfo)&&void 0!==p&&p.base_info_completed||ce({type:"user/getUserInfo"}),ce({type:"account/getBasicInfo",payload:{login:null===(v=o.userInfo)||void 0===v?void 0:v.login}}),c===dn||"teacher"!==c){e.next=18;break}return tn(!0),e.abrupt("return");case 18:"0"===localStorage.getItem("Noviceguide")||ce({type:"shixunHomeworks/setActionTabs",payload:{key:"底部弹窗",type:4,href:"/classrooms",text:(0,ie.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,ce({type:"account/updateAccount",payload:{id:null===(P=u.basicInfo)||void 0===P?void 0:P.id,department_id:w,major_id:I,gender:l,identity:c,location:location,name:sn,nickname:a,school_id:N,edu_background:j,edu_entry_year:g,staff_id:k,show_realname:Ke,brief_introduction:b,student_id:"student"===c?h:null,technical_title:m||f,face_image:null==kn||null===(V=kn[0])||void 0===V||null===(V=V.response)||void 0===V?void 0:V.id}});case 25:if(-1!==(null==(q=e.sent)?void 0:q.status)){e.next=28;break}return e.abrupt("return");case 28:if(!q){e.next=37;break}if(y.ZP.info("保存成功"),null!==(z=u.basicInfo)&&void 0!==z&&z.base_info_completed||ce({type:"user/getUserInfo"}),ce({type:"account/getBasicInfo",payload:{login:null===(E=o.userInfo)||void 0===E?void 0:E.login}}),c===dn||"teacher"!==c){e.next=35;break}return tn(!0),e.abrupt("return");case 35:"0"===localStorage.getItem("Noviceguide")||ce({type:"shixunHomeworks/setActionTabs",payload:{key:"底部弹窗",type:4,href:"/classrooms",text:(0,ie.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)}}(),Bn=(0,ie.jsxs)("div",{children:[yn?(0,ie.jsx)(U.Z,{}):(0,ie.jsx)(W.Z,{}),(0,ie.jsx)("div",{style:{marginTop:8},children:"上传"})]});return(0,ie.jsxs)("section",{className:A,children:[(0,ie.jsxs)("div",{className:T,children:[(0,ie.jsx)("div",{className:P,children:(0,ie.jsx)("div",{className:F,children:"基本信息"})}),(0,ie.jsxs)(g.Z,{form:de,className:V,layout:"horizontal",onValuesChange:function(e){var n;(Ze(c()({},de.getFieldsValue())),"school"in e)&&(Fe(Ie.filter((function(n){return n.name.includes(e.school)}))),(Ie.find((function(n){return n.name===e.school}))||{}).id?Ln(e.school):(de.setFieldsValue({department:""}),Ze(c()(c()({},ke),{school:e.school,department:""}))));(null==e||null===(n=e.nickname)||void 0===n?void 0:n.length)<=0&&(Xe(!0),de.setFieldsValue({name:sn})),"name"in e&&ln(e.name),"identity"in e&&de.setFieldsValue({staff_id:""})},onFinish:Dn,scrollToFirstError:!0,children:[(0,ie.jsx)(g.Z.Item,{label:"姓名",name:"name",rules:[{required:!0,message:"请输入真实姓名,最大限制".concat(20,"个字符")},{validator:M.HJ}],extra:(0,ie.jsx)("span",{children:ke.nickname?Ke?"显示:平台将显示您的真实姓名":"隐藏:平台将显示你的昵称":"填写昵称后可设置姓名进行隐藏(当进行姓名搜索时,会展示您的真实姓名)"}),children:(0,ie.jsx)(j.Z,{style:{height:40},disabled:!!ke.nickname&&!Ke,placeholder:"请输入真实姓名,最大限制".concat(20,"个字符"),maxLength:20,suffix:ke.nickname?(0,ie.jsx)("i",{style:{lineHeight:"26px"},className:"iconfont ".concat(Ke?"icon-xianshi":"icon-yincang"," font18 ").concat(E),onClick:function(){var e=!Ke;Xe(e);var n=e?sn:(0,M.YA)(sn);de.setFieldsValue({name:n})}}):null})}),(0,ie.jsxs)(b.Z,{gutter:[10,0],children:[(0,ie.jsx)(k.Z,{children:(0,ie.jsx)(Z.Z,c()(c()({placement:"bottom",title:function(){return(0,ie.jsxs)("div",{children:[(0,ie.jsx)("div",{children:"已提交职业认证"}),(0,ie.jsxs)("div",{children:["可在",(0,ie.jsx)("a",{href:"/account/certification",className:"c-blue",children:"认证信息"}),"中通过“重新认证”进行修改"]})]})}},Pn),{},{children:(0,ie.jsx)(g.Z.Item,{label:"职业",name:"identity",rules:[{required:!0,message:"请先选择职业"}],children:(0,ie.jsxs)(v.default,{style:{width:135},size:"large",children:[(0,ie.jsx)(ae,{value:"teacher",children:"教师"}),(0,ie.jsx)(ae,{value:"student",children:"学生"}),(0,ie.jsx)(ae,{value:"professional",children:"专业人士"})]})})}))}),(0,ie.jsxs)(k.Z,{children:["student"===ke.identity&&(0,ie.jsx)(Z.Z,c()(c()({placement:"bottom",title:function(){return(0,ie.jsxs)("div",{children:[(0,ie.jsx)("div",{children:"已提交职业认证"}),(0,ie.jsxs)("div",{children:["可在",(0,ie.jsx)("a",{href:"/account/certification",className:"c-blue",children:"认证信息"}),"中通过“重新认证”进行修改"]})]})}},Pn),{},{children:(0,ie.jsx)(g.Z.Item,{initialValue:ke.studentNo,name:"studentNo",validateTrigger:"onBlur",rules:[{whitespace:!0,message:"不能全为空"},{required:!0,validator:(Hn=d()(s()().mark((function e(n,t){var i,r,a;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Cn(!1),e.next=3,(0,K.ZP)("/api/users/accounts/".concat(null==o||null===(i=o.userInfo)||void 0===i?void 0:i.user_id,"/valid_student_id"),{method:"get",params:{school_id:(null==Sn?void 0:Sn.school_id)||(null==Ie||null===(r=Ie.find((function(e){return e.name===ke.school})))||void 0===r?void 0:r.id),student_id:t}});case 3:return a=e.sent,e.abrupt("return",(null==a?void 0:a.status)<-1?Promise.reject((0,ie.jsxs)("span",{children:["该学号已被使用,如需继续使用该学号,请先",(0,ie.jsx)("a",{onClick:function(){ye(!0),xe({check_type:1})},children:"解绑学号"})]})):Promise.resolve());case 5:case"end":return e.stop()}}),e)}))),function(e,n){return Hn.apply(this,arguments)})}],children:(0,ie.jsx)(j.Z,{size:"large",style:{width:320},type:"text",placeholder:"请输入学号最大限制20个字符",showCount:!0,maxLength:20})})})),"teacher"===ke.identity&&(0,ie.jsx)(Z.Z,c()(c()({placement:"bottom",title:function(){return(0,ie.jsxs)("div",{children:[(0,ie.jsx)("div",{children:"已提交职业认证"}),(0,ie.jsxs)("div",{children:["可在",(0,ie.jsx)("a",{href:"/account/certification",className:"c-blue",children:"认证信息"}),"中通过“重新认证”进行修改"]})]})}},Pn),{},{children:(0,ie.jsx)(g.Z.Item,{initialValue:ke.jobTitle,name:"jobTitle",rules:[{required:!0,message:"请先选择职称"}],children:(0,ie.jsxs)(v.default,{style:{width:200},size:"large",children:[(0,ie.jsx)(ae,{value:"教授",children:"教授"}),(0,ie.jsx)(ae,{value:"研究员",children:"研究员"}),(0,ie.jsx)(ae,{value:"副教授",children:"副教授"}),(0,ie.jsx)(ae,{value:"副研究员",children:"副研究员"}),(0,ie.jsx)(ae,{value:"讲师",children:"讲师"}),(0,ie.jsx)(ae,{value:"助理研究员",children:"助理研究员"}),(0,ie.jsx)(ae,{value:"助理教授",children:"助理教授"})]})})})),"professional"===ke.identity&&(0,ie.jsx)(Z.Z,c()(c()({placement:"bottom",title:function(){return(0,ie.jsxs)("div",{children:[(0,ie.jsx)("div",{children:"已提交职业认证"}),(0,ie.jsxs)("div",{children:["可在",(0,ie.jsx)("a",{href:"/account/certification",className:"c-blue",children:"认证信息"}),"中通过“重新认证”进行修改"]})]})}},Pn),{},{children:(0,ie.jsx)(g.Z.Item,{initialValue:ke.manager,name:"manager",rules:[{required:!0,message:"请先选择职称"}],children:(0,ie.jsxs)(v.default,{style:{width:200},size:"large",children:[(0,ie.jsx)(ae,{value:"企业管理者",children:"企业管理者"}),(0,ie.jsx)(ae,{value:"部门管理者",children:"部门管理者"}),(0,ie.jsx)(ae,{value:"高级工程师",children:"高级工程师"}),(0,ie.jsx)(ae,{value:"工程师",children:"工程师"}),(0,ie.jsx)(ae,{value:"助理工程师",children:"助理工程师"})]})})}))]}),("teacher"===ke.identity||"professional"===ke.identity)&&(0,ie.jsx)(k.Z,{flex:1,children:(0,ie.jsx)(g.Z.Item,{label:"工号",name:"staff_id",labelCol:{span:4},rules:[{validator:function(e,n){return/[\u4E00-\u9FA5]/g.test(n)?Promise.reject("请勿输入中文字符"):n.length>20?Promise.reject("最大限制20个字符"):Promise.resolve()}}],children:(0,ie.jsx)(j.Z,{placeholder:"请输入工号最大限制20个字符",className:H,suffix:" ",showCount:!0,maxLength:20})})})]}),(0,ie.jsx)(Z.Z,c()(c()({placement:"bottom",title:function(){return(0,ie.jsxs)("div",{children:[(0,ie.jsx)("div",{children:"已提交职业认证"}),(0,ie.jsxs)("div",{children:["可在",(0,ie.jsx)("a",{href:"/account/certification",className:"c-blue",children:"认证信息"}),"中通过“重新认证”进行修改"]})]})}},Pn),{},{children:(0,ie.jsx)(g.Z.Item,{label:"学校/单位",name:"school",wrapperCol:{span:10},extra:!fn&&ke.school&&!(null!=Ie&&Ie.find((function(e){return e.name===ke.school})))&&(0,ie.jsx)("div",{className:q,children:(0,ie.jsxs)("span",{className:z,children:["未找到包含“",ke.school,"”的高校,如有需要,请",(0,ie.jsx)("span",{style:{color:"blue",cursor:"pointer"},onClick:function(){_.Z.info({title:"联系平台运营",width:400,icon:null,centered:!0,content:(0,ie.jsxs)("div",{style:{textAlign:"center"},children:[(0,ie.jsxs)("div",{style:{textAlign:"left"},children:["请扫码或搜索加入头歌官方交流QQ群","teacher"===ke.identity?"727685969":"623193762",",联系群内的运营进行咨询和申请新增学校名称。"]}),(0,ie.jsx)("img",{src:"teacher"===ke.identity?$:ee,style:{width:"170px",height:"170px",marginTop:"20px"}})]}),okText:"我知道了"})},children:"联系平台运营"}),"申请新增"]})}),rules:[{required:!0,message:"请先选择学校/单位"},{whitespace:!0,message:"请先选择学校/单位"}],children:(0,ie.jsx)(w.Z,{size:"large",showSearch:!0,onChange:An,children:Se.map((function(e,n){return(0,ie.jsx)(ae,{value:e.name,children:e.name},n)}))})})})),(0,ie.jsx)(Z.Z,c()(c()({placement:"bottom",title:function(){return(0,ie.jsxs)("div",{children:[(0,ie.jsx)("div",{children:"已提交职业认证"}),(0,ie.jsxs)("div",{children:["可在",(0,ie.jsx)("a",{href:"/account/certification",className:"c-blue",children:"认证信息"}),"中通过“重新认证”进行修改"]})]})}},Pn),{},{children:(0,ie.jsx)(g.Z.Item,{label:"院系/部门",name:"department",wrapperCol:{span:10},extra:!fn&&ke.department&&!(null!=qe&&qe.find((function(e){return e.name===ke.department})))&&(0,ie.jsxs)("div",{className:q,children:[(0,ie.jsx)("span",{className:z,children:ke.department?"未找到包含“".concat(ke.department,"”的高校,"):"未找到院系,"}),"teacher"===ke.identity?(0,ie.jsx)("span",{className:"".concat(E," current"),onClick:zn,children:"申请新增"}):(0,ie.jsxs)("span",{className:z,children:["如有需要,请",(0,ie.jsx)("span",{style:{color:"blue",cursor:"pointer"},onClick:function(){_.Z.info({title:"联系平台运营",width:400,icon:null,centered:!0,content:(0,ie.jsxs)("div",{style:{textAlign:"center"},children:[(0,ie.jsxs)("div",{style:{textAlign:"left"},children:["请扫码或搜索加入头歌官方交流QQ群","teacher"===ke.identity?"727685969":"623193762",",联系群内的运营进行咨询和申请新增专业名称。"]}),(0,ie.jsx)("img",{src:"teacher"===ke.identity?$:ee,style:{width:"170px",height:"170px",marginTop:"20px"}})]}),okText:"我知道了"})},children:"联系平台运营"}),"申请新增"]})]}),children:(0,ie.jsx)(w.Z,{size:"large",onChange:function(e){Qn(),He(qe.filter((function(n){return n.name.includes(e)})))},children:Re.map((function(e,n){return(0,ie.jsxs)(ae,{value:e.name,children:[e.name,0==(null==e?void 0:e.status)&&(0,ie.jsx)("span",{style:{color:"#FF8C29",marginLeft:"5px"},children:"(待审核)"})]},n)}))})})})),(0,ie.jsx)(Z.Z,c()(c()({placement:"bottom",title:function(){return(0,ie.jsxs)("div",{children:[(0,ie.jsx)("div",{children:"已提交职业认证"}),(0,ie.jsxs)("div",{children:["可在",(0,ie.jsx)("a",{href:"/account/certification",className:"c-blue",children:"认证信息"}),"中通过“重新认证”进行修改"]})]})}},Pn),{},{children:(0,ie.jsx)(g.Z.Item,{label:"专业",name:"major_name",wrapperCol:{span:10},extra:!fn&&ke.major_name&&!(null!=De&&De.find((function(e){return e.name===ke.major_name})))&&(0,ie.jsx)("div",{className:q,children:"teacher"==ke.identity?(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)("span",{className:z,children:"未查询到“".concat(ke.major_name,"”专业,")}),(0,ie.jsx)("span",{className:"".concat(E," current"),onClick:En,children:"申请新增"})]}):(0,ie.jsxs)("span",{className:z,children:["未找到“",ke.major_name,"”专业,如有需要,请",(0,ie.jsx)("span",{style:{color:"blue",cursor:"pointer"},onClick:function(){_.Z.info({title:"联系平台运营",width:400,icon:null,centered:!0,content:(0,ie.jsxs)("div",{style:{textAlign:"center"},children:[(0,ie.jsxs)("div",{style:{textAlign:"left"},children:["请扫码或搜索加入头歌官方交流QQ群","teacher"===ke.identity?"727685969":"623193762",",联系群内的运营进行咨询和申请新增专业名称。"]}),(0,ie.jsx)("img",{src:"teacher"===ke.identity?$:ee,style:{width:"170px",height:"170px",marginTop:"20px"}})]}),okText:"我知道了"})},children:"联系平台运营"}),"申请新增"]})}),children:(0,ie.jsx)(w.Z,{size:"large",onChange:function(e){We(De.filter((function(n){return n.name.includes(e)})))},children:Ue.map((function(e,n){return(0,ie.jsxs)(ae,{value:e.name,children:[e.name,0==(null==e?void 0:e.status)&&(0,ie.jsx)("span",{style:{color:"#FF8C29",marginLeft:"5px"},children:"(待审核)"})]},n)}))})})})),(0,ie.jsx)(g.Z.Item,{label:"昵称",name:"nickname",rules:[{message:"请输入您的昵称"},{validator:M.G7}],validateTrigger:"onSubmit",children:(0,ie.jsx)(j.Z,{style:{height:40},placeholder:"请输入您的昵称,最大限制".concat(20,"个字符"),maxLength:20,suffix:"".concat((null===(t=ke.nickname)||void 0===t?void 0:t.length)||0,"/").concat(20)})}),(0,ie.jsx)(g.Z.Item,{labelCol:{span:3},wrapperCol:{span:4},label:"性别",className:"mb0",children:(0,ie.jsx)(g.Z.Item,{name:"gender",children:(0,ie.jsxs)(N.ZP.Group,{children:[(0,ie.jsx)(N.ZP,{value:0,children:"男"}),(0,ie.jsx)(N.ZP,{value:1,children:"女"})]})})}),(0,ie.jsx)(g.Z.Item,{label:"入学年份",name:"edu_entry_year",wrapperCol:{span:10},children:(0,ie.jsx)(v.default,{placeholder:"请选择入学年份",size:"large",children:(Rn=(new Date).getFullYear(),Array(31).fill({}).map((function(e,n){return(0,ie.jsx)(ae,{value:Rn-n,children:(0,ie.jsx)("span",{children:Rn-n})},n)})))})}),(0,ie.jsx)(g.Z.Item,{label:"最高学历",wrapperCol:{span:10},name:"edu_background",children:(0,ie.jsx)(v.default,{placeholder:"请选择最高学历",size:"large",children:M.jh.map((function(e,n){return(0,ie.jsx)(ae,{value:e.id,children:e.name},n)}))})}),(0,ie.jsxs)("div",{style:{display:"flex"},children:[(0,ie.jsx)(g.Z.Item,{label:"上传证件照",wrapperCol:{span:10},name:"face_image",children:(0,ie.jsx)(I.Z,{listType:"picture-card",withCredentials:!0,className:"avatar-uploader",fileList:kn,onPreview:function(e){Y.Z.publish("preview-image",e.thumbUrl||e.url)},action:"".concat(ne.Z.API_SERVER,"/api/attachments.json"),beforeUpload:function(e){var n="image/jpeg"===e.type||"image/png"===e.type;if(!n)return y.ZP.error("您上传的不是JPG/PNG类型文件"),Promise.reject();var t=e.size/1024/1024<1;return t?n&&t:(y.ZP.error("文件不能大于1MB"),Promise.reject())},onChange:function(e){Zn(r()(e.fileList))},children:(null==kn?void 0:kn.length)>0?null:Bn})}),(0,ie.jsxs)("div",{style:{marginLeft:16,color:"#666666",display:"flex",flexDirection:"column",marginTop:5},children:[(0,ie.jsx)("span",{children:"要求:"}),(0,ie.jsx)("span",{children:"1.学生照片必须为高清的人脸照"}),(0,ie.jsx)("span",{children:"2.按照 姓名-学号 的方式来命名照片"}),(0,ie.jsx)("span",{children:"3.图片大小在1MB以内"})]})]}),(0,ie.jsxs)("div",{style:{position:"relative"},children:[(0,ie.jsx)(g.Z.Item,{label:"简介",name:"brief_introduction",rules:[{required:!1}],children:(0,ie.jsx)(se,{maxLength:500,rows:6})}),(0,ie.jsxs)("div",{style:{position:"absolute",bottom:10,right:10},children:[null===(i=de.getFieldValue("brief_introduction"))||void 0===i?void 0:i.length,"/500"]})]}),(0,ie.jsxs)(g.Z.Item,{children:[(0,ie.jsx)(C.ZP,{className:"".concat(2===m.actionTabs.type?R:L," ml100"),size:"middle",type:"primary",htmlType:"submit",loading:le["account/editAccount"],children:"保存"}),(0,ie.jsx)(C.ZP,{className:L,size:"middle",onClick:function(){return x.history.push("/account/profile")},children:"取消"})]})]})]}),(0,ie.jsx)("div",{className:"".concat(S," font14"),children:"* 我们确保你所提供的信息均处于严格保密状态,不会泄露"}),(0,ie.jsx)(Q.Z,{visible:"Account-AppplySchool"===u.actionTabs.key,onClose:function(){ce({type:"account/setActionTabs",payload:{}})},schoolName:ke.school,onSuccess:On}),(0,ie.jsx)(O.Z,{visible:"Account-AppplyDepartment"===u.actionTabs.key,onClose:function(){ce({type:"account/setActionTabs",payload:{}})},schoolId:null===(a=Ie.find((function(e){return e.name===ke.school})))||void 0===a?void 0:a.id,schoolName:ke.school,departmentName:ke.department,onSuccess:function(e){return Ln(ke.school,e)}}),(0,ie.jsx)(te.Z,{visible:"Account-AppplyProfession"===u.actionTabs.key,onClose:function(){ce({type:"account/setActionTabs",payload:{}})},departmentId:null===(l=qe.find((function(e){return e.name===ke.department})))||void 0===l?void 0:l.id,departmentName:ke.department,majorName:ke.major_name,onSuccess:function(e){de.setFieldsValue({major_name:e}),Ze(c()(c()({},de.getFieldsValue()),{major_name:e})),Qn()}}),(0,ie.jsx)(_.Z,{centered:!0,destroyOnClose:!0,open:nn,title:"头歌教师交流社区",width:560,footer:null,onCancel:function(){tn(!1)},children:(0,ie.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,ie.jsx)("aside",{style:{letterSpacing:1},children:"基于您所在院校与平台有深度合作我们特意为您配备了平台的1对1助教您可以扫描下方二维码添加助理微信我们将7*24小时为您答疑解惑。"}),(0,ie.jsx)("img",{className:"mt20 mb20",src:B,width:162,height:162})]})}),(0,ie.jsx)(_.Z,{title:"解绑学号",open:ge,centered:!0,destroyOnClose:!0,onCancel:function(){ye(!1)},onOk:function(){he.submit()},children:(0,ie.jsxs)(g.Z,{form:he,initialValues:{check_type:1},size:"large",onValuesChange:function(e,n){xe(n)},onFinish:function(){var e=d()(s()().mark((function e(n){var t,i;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,K.ZP)("/api/users/accounts/".concat(null==o||null===(t=o.userInfo)||void 0===t?void 0:t.user_id,"/unbind_student_id.json"),{method:"post",body:c()({student_id:ke.studentNo,school_id:(null==Sn?void 0:Sn.school_id)||(null==Ie||null===(i=Ie.find((function(e){return e.name===ke.school})))||void 0===i?void 0:i.id)},n)});case 2:0==e.sent.status&&(y.ZP.success("解绑成功"),de.validateFields(),ye(!1));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,ie.jsxs)("div",{children:["很抱歉,该学号(",ke.studentNo,")已被使用,如果需要将该学号绑定在当前账号上,您可以提供原账号(使用该学号的账号)的相关信息进行解绑:"]}),(0,ie.jsxs)("div",{className:"mt20 mb20",style:{background:"#f5f5f5",borderRadius:"5px",padding:"10px"},children:[(0,ie.jsx)("div",{children:"1、原账号绑定的手机号码或者邮箱"}),(0,ie.jsx)("div",{children:"2、原账号已加入的教学课堂中教师手机号后6位或者课堂邀请码"}),(0,ie.jsx)("div",{children:"注意:请确保原账号所在单位与已加入的教学课堂所属单位相同。"})]}),(0,ie.jsxs)(b.Z,{gutter:[10,0],children:[(0,ie.jsx)(k.Z,{span:5,children:(0,ie.jsx)(g.Z.Item,{name:"check_type",children:(0,ie.jsxs)(v.default,{children:[(0,ie.jsx)(ae,{value:1,children:"邀请码"}),(0,ie.jsx)(ae,{value:2,children:"手机号"}),(0,ie.jsx)(ae,{value:3,children:"邮箱"})]})})}),(0,ie.jsxs)(k.Z,{flex:1,children:[1==(null==pe?void 0:pe.check_type)&&(0,ie.jsx)(g.Z.Item,{name:"check_value",rules:[{required:!0,message:"请提供所在单位的教学课堂的邀请码"}],children:(0,ie.jsx)(j.Z,{type:"text",placeholder:"请提供所在单位的教学课堂的邀请码",maxLength:10})}),2==(null==pe?void 0:pe.check_type)&&(0,ie.jsx)(g.Z.Item,{name:"check_value",rules:[{required:!0,message:"请输入手机号码"}],children:(0,ie.jsx)(j.Z,{type:"text",placeholder:"请输入手机号码",maxLength:11})}),3==(null==pe?void 0:pe.check_type)&&(0,ie.jsx)(g.Z.Item,{name:"check_value",rules:[{required:!0,type:"email",message:"请输入邮箱"}],children:(0,ie.jsx)(j.Z,{type:"text",placeholder:"请输入邮箱"})})]})]})]})}),(0,ie.jsx)(J.Z,{}),(0,ie.jsx)(D.Z,{})]})}))},32637:function(e,n,t){e.exports=t.p+"static/AssistantCode3.a8740efb.jpeg"}}]);