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

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