|
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[74269],{74269:function(e,n,t){var l=t(7557),i=t.n(l),a=t(82242),o=t.n(a),r=t(41498),s=t.n(r),c=t(79800),d=t.n(c),u=t(39647),m=t.n(u),p=t(59301),h=t(3858),x=t(57809),f=t(59028),j=t(78241),g=t(8591),v=t(43418),_=t(71418),Z=t(95237),y=t(43604),b=t(92832),C=t(6848),N=t(88522),w=t(3113),I=t(95008),k=t(53440),F=t(97730),S=t(51941),T=t(48661),V=t(23756),q=t(89392),D=t(63572),P=t(23634),R=t(37712),E=["user","account","globalSetting","loading","dispatch"],W=x.default.Option,A=f.Z.Dragger;n.Z=(0,h.connect)((function(e){var n=e.user,t=e.account,l=e.loading;return{user:n,account:t,globalSetting:e.globalSetting,loading:l.effects}}))((function(e){var n,t,l,a=e.user,r=e.account,c=e.globalSetting,u=e.loading,h=e.dispatch,f=(m()(e,E),j.Z.useForm()),O=d()(f,1)[0],z=(0,p.useState)({}),L=d()(z,2),Q=L[0],H=L[1],B=(0,p.useState)([]),M=d()(B,2),G=M[0],U=M[1],X=(0,p.useState)([]),K=d()(X,2),Y=K[0],J=K[1],$=(0,p.useState)([]),ee=d()($,2),ne=ee[0],te=ee[1],le=(0,p.useState)([]),ie=d()(le,2),ae=ie[0],oe=ie[1],re=(0,p.useState)([]),se=d()(re,2),ce=se[0],de=se[1],ue=(0,p.useState)([]),me=d()(ue,2),pe=me[0],he=me[1],xe=(0,p.useState)(),fe=d()(xe,2),je=fe[0],ge=fe[1],ve=(0,p.useState)(),_e=d()(ve,2),Ze=_e[0],ye=_e[1],be=(0,p.useState)(),Ce=d()(be,2),Ne=Ce[0],we=Ce[1],Ie=(0,p.useState)(),ke=d()(Ie,2),Fe=ke[0],Se=ke[1],Te=(0,p.useState)(),Ve=d()(Te,2),qe=Ve[0],De=Ve[1],Pe=(0,p.useState)(),Re=d()(Pe,2),Ee=Re[0],We=Re[1];(0,p.useEffect)((function(){var e,n,t,l;"Account-ProfessionalAuth"===r.actionTabs.key&&(null!==(e=r.basicInfo)&&void 0!==e&&e.school_id&&(ze(null===(n=r.basicInfo)||void 0===n?void 0:n.school_id),U([{id:null===(t=r.basicInfo)||void 0===t?void 0:t.school_id,name:null===(l=r.basicInfo)||void 0===l?void 0:l.school_name}])))}),[r.actionTabs.key]);var Ae=(0,p.useRef)((0,q.throttle)((function(e){return Oe(e)}),1200,{leading:!0,trailing:!0})).current,Oe=function(){var e=s()(i()().mark((function e(n){var t,l,a;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h({type:"account/getSchoolOption",payload:{keyword:n,limit:10}});case 2:t=e.sent,U(null==t?void 0:t.schools),n&&""!=n&&(J(null==t||null===(l=t.schools)||void 0===l?void 0:l.filter((function(e){return e.name.includes(n)}))),((null==t||null===(a=t.schools)||void 0===a?void 0:a.find((function(e){return e.name===n})))||{}).id?He(n,null,null==t?void 0:t.schools):(O.setFieldsValue(o()(o()({},O.getFieldsValue()),{},{department:""})),H(o()(o()({},O.getFieldsValue()),{school:n,department:""}))));case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),ze=function(){var e=s()(i()().mark((function e(n){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,h({type:"account/getDepartmentOption",payload:{id:n}});case 4:return t=e.sent,te(null==t?void 0:t.departments),e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();(0,p.useEffect)((function(){if(r.basicInfo){var e=r.basicInfo,n={identity:e.identity,school:e.school_name,department:e.department_name,major_name:e.major_name,studentNo:e.student_id,jobTitle:"teacher"==e.identity?e.technical_title:"教授",manager:"professional"==e.identity?e.technical_title:"企业管理者",code_type:2};O.setFieldsValue(n),H(n)}}),[r.basicInfo]);var Le=function(){G.find((function(e){return e.name===Q.school}))?De(!0):g.ZP.info("请先选择正确的单位或者学校!")},Qe=function(){ne.find((function(e){return e.name===Q.department}))?We(!0):g.ZP.info("请先选择正确的院系或者部门!")},He=function(){var e=s()(i()().mark((function e(n,t,l){var a,r,s,c,d;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=null===(a=(l||G).find((function(e){return e.name===n})))||void 0===a?void 0:a.id,e.next=3,ze(s);case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={};case 6:c=e.t0,d=t||(null==c||null===(r=c.departments)||void 0===r||null===(r=r[0])||void 0===r?void 0:r.name),O.setFieldsValue(o()(o()({},O.getFieldsValue()),{},{department:d})),H(o()(o()({},O.getFieldsValue()),{school:n,department:d}));case 10:case"end":return e.stop()}}),e)})));return function(n,t,l){return e.apply(this,arguments)}}();(0,p.useEffect)((function(){Be()}),[ne]);var Be=function(){var e=s()(i()().mark((function e(){var n,t,l,a,o;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l=null===(n=G.find((function(e){return e.name===O.getFieldValue("school")})))||void 0===n?void 0:n.id,!(a=null===(t=ne.find((function(e){return e.name===O.getFieldValue("department")})))||void 0===t?void 0:t.id)){e.next=7;break}return e.next=5,(0,P.ZP)("/api/schools/".concat(l,"/departments/").concat(a,"/major_option.json"),{method:"get"});case 5:0==(null==(o=e.sent)?void 0:o.status)&&de(null==o?void 0:o.majors);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Me=function(){var e=s()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Oe();case 2:O.setFieldsValue(o()(o()({},O.getFieldsValue()),{},{school:n,department:""})),H(o()(o()({},O.getFieldsValue()),{school:n,department:""}));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Ge=function(){var e=s()(i()().mark((function e(n){var t,l,o,s,d,u,m,p,x,f,j,_,Z,y,b,C,N,w,I,k,S,T,V,q,D,P,E;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m=(u=n||{}).school,p=u.department,x=u.identity,f=u.studentNo,j=u.jobTitle,_=u.manager,Z=u.code_type,y=u.code,b=u.major_name,je){e.next=4;break}return g.ZP.info("请先上传照片!"),e.abrupt("return");case 4:if(C=null===(t=G.find((function(e){return e.name===m})))||void 0===t?void 0:t.id,N=null===(l=ne.find((function(e){return e.name===p})))||void 0===l?void 0:l.id,w=null===(o=ce.find((function(e){return e.name===b})))||void 0===o?void 0:o.id,I="student"===x?f:"teacher"===x?j:_,C){e.next=11;break}return v.Z.info({title:"联系平台运营",width:400,icon:null,centered:!0,content:(0,R.jsxs)("div",{style:{textAlign:"center"},children:[(0,R.jsxs)("div",{style:{textAlign:"left"},children:["请扫码或搜索加入头歌官方交流QQ群:",null==c||null===(k=c.setting)||void 0===k?void 0:k.homepage_tea_qq_number,",联系群内的运营进行咨询和申请新增学校名称。"]}),(0,R.jsx)("img",{src:"".concat(F.Z.IMG_SERVER,"/").concat(null==c||null===(S=c.setting)||void 0===S?void 0:S.homepage_tea_qq_qrcode_url),style:{width:"170px",height:"170px",marginTop:"20px"}})]}),okText:"我知道了"}),e.abrupt("return");case 11:if(!p||N){e.next=14;break}return T=v.Z.confirm({icon:null,width:600,centered:!0,okText:"新增",cancelText:"取消",title:"提示",content:(0,R.jsx)(R.Fragment,{children:(0,R.jsx)("p",{children:"系统未找到您填写的院系/部门,是否申请新增该部门?"})}),onOk:Le,onCancel:function(){T.destroy()}}),e.abrupt("return");case 14:if(!b||w){e.next=17;break}return"teacher"==O.getFieldValue("identity")?V=v.Z.confirm({icon:null,width:600,centered:!0,okText:"新增",cancelText:"取消",title:"提示",content:(0,R.jsx)(R.Fragment,{children:(0,R.jsx)("p",{children:"系统未找到您填写的专业,是否申请新增该专业?"})}),onOk:Qe,onCancel:function(){V.destroy()}}):v.Z.info({title:"联系平台运营",width:400,icon:null,centered:!0,content:(0,R.jsxs)("div",{style:{textAlign:"center"},children:[(0,R.jsxs)("div",{style:{textAlign:"left"},children:["请扫码或搜索加入头歌官方交流QQ群:",null==c||null===(q=c.setting)||void 0===q?void 0:q.homepage_tea_qq_number,",联系群内的运营进行咨询和申请新增专业名称。"]}),(0,R.jsx)("img",{src:"".concat(F.Z.IMG_SERVER,"/").concat(null==c||null===(D=c.setting)||void 0===D?void 0:D.homepage_tea_qq_qrcode_url),style:{width:"170px",height:"170px",marginTop:"20px"}})]}),okText:"我知道了"}),e.abrupt("return");case 17:return e.next=19,h({type:"account/applyProfessionalAuth",payload:{id:(null===(s=r.basicInfo)||void 0===s?void 0:s.id)||(null===(d=a.userInfo)||void 0===d?void 0:d.login),school_id:C,department_id:N,major_id:w,identity:x,extra:I,code:y,code_type:Z,attachment_ids:[Ze]}});case 19:P=e.sent,Ue(),0===(null==P?void 0:P.status)&&(y?g.ZP.info("职业认证审核通过"):g.ZP.info("申请已提交,请等待审核!"),ge(""),h({type:"account/getBasicInfo",payload:{login:null===(E=a.userInfo)||void 0===E?void 0:E.login}}));case 22:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Ue=function(){O.setFieldValue("code",""),h({type:"account/setActionTabs",payload:{}})},Xe={data:{type:"professional"},multiple:!0,withCredentials:!0,showUploadList:!1,action:"".concat(F.Z.API_SERVER,"/api/attachments.json"),className:T.Z.uploader,onChange:function(e){var n;"uploading"!==e.file.status?"done"===e.file.status&&(console.log(e.file,e.file.response),ye(null===(n=e.file.response)||void 0===n?void 0:n.id),(0,V.y3)(e.file.originFileObj,(function(e){ge(e),we(!1)}))):we(!0)},beforeUpload:function(e){var n="image/jpeg"===e.type||"image/png"===e.type||"image/jpg"===e.type||"image/bmp"===e.type;return n||g.ZP.info("请上传正确文件格式"),n}},Ke=function(){var e,n,t,l;v.Z.info({title:"联系平台运营",width:400,icon:null,centered:!0,content:(0,R.jsxs)("div",{style:{textAlign:"center"},children:[(0,R.jsxs)("div",{style:{textAlign:"left"},children:["请扫码或搜索加入头歌官方交流QQ群:","teacher"===Q.identity?null==c||null===(e=c.setting)||void 0===e?void 0:e.homepage_tea_qq_number:null==c||null===(n=c.setting)||void 0===n?void 0:n.homepage_stu_qq_number,",联系群内的运营进行咨询和申请新增专业名称。"]}),(0,R.jsx)("img",{src:"teacher"===Q.identity?"".concat(F.Z.IMG_SERVER,"/").concat(null==c||null===(t=c.setting)||void 0===t?void 0:t.homepage_tea_qq_qrcode_url):"".concat(F.Z.IMG_SERVER,"/").concat(null==c||null===(l=c.setting)||void 0===l?void 0:l.homepage_stu_qq_qrcode_url),style:{width:"170px",height:"170px",marginTop:"20px"}})]}),okText:"我知道了"})};return(0,R.jsxs)(v.Z,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,forceRender:!0,className:T.Z.modal,open:"Account-ProfessionalAuth"===r.actionTabs.key,title:(0,R.jsxs)("div",{children:[(0,R.jsx)("i",{className:"iconfont icon-zhiyerenzheng font18 mr5 ".concat(T.Z.colorBlue)}),"职业认证"]}),width:"660px",footer:null,children:[(0,R.jsx)(_.Z,{spinning:!!Ne,children:(0,R.jsxs)(j.Z,{form:O,layout:"horizontal",size:"large",scrollToFirstError:!0,className:T.Z.formWrap,onValuesChange:function(e){(H(o()({},O.getFieldsValue())),"identity"in e&&H(o()(o()({},O.getFieldsValue()),{},{code_type:2})),"school"in e)&&(J(G.filter((function(n){return n.name.includes(e.school)}))),(G.find((function(n){return n.name===e.school}))||{}).id?He(e.school):(O.setFieldValue("department",""),H(o()(o()({},Q),{school:e.school,department:""}))))},onFinish:Ge,children:[(0,R.jsxs)(Z.Z,{gutter:[10,0],children:[(0,R.jsx)(y.Z,{flex:"300px",children:(0,R.jsx)(j.Z.Item,{label:"职业",name:"identity",rules:[{required:!0,message:"请先选择职业"}],children:(0,R.jsxs)(x.default,{children:[(0,R.jsx)(W,{value:"teacher",children:"教师"}),(0,R.jsx)(W,{value:"student",children:"学生"}),(0,R.jsx)(W,{value:"professional",children:"专业人士"})]})})}),"student"===Q.identity&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(y.Z,{flex:1,children:(0,R.jsx)(j.Z.Item,{initialValue:Q.studentNo,name:"studentNo",rules:[{required:!0,message:"请先输入学号"}],children:(0,R.jsx)(b.Z,{type:"text",placeholder:"请输入学号"})})}),(0,R.jsx)(y.Z,{flex:0,children:(0,R.jsx)("div",{className:T.Z.tooltipWrapper,children:(0,R.jsx)(C.Z,{title:"单位管理员可管理已通过职业认证的学生账号信息(包含初始化密码)",children:(0,R.jsx)("span",{className:T.Z.tips,children:(0,R.jsx)("i",{className:"iconfont icon-a-wenhaobeifen2"})})})})})]}),"teacher"===Q.identity&&(0,R.jsx)(y.Z,{flex:1,children:(0,R.jsx)(j.Z.Item,{initialValue:Q.jobTitle,name:"jobTitle",rules:[{required:!0,message:"请先选择职称"}],children:(0,R.jsxs)(x.default,{children:[(0,R.jsx)(W,{value:"教授",children:"教授"}),(0,R.jsx)(W,{value:"副教授",children:"副教授"}),(0,R.jsx)(W,{value:"讲师",children:"讲师"}),(0,R.jsx)(W,{value:"助教",children:"助教"})]})})}),"professional"===Q.identity&&(0,R.jsx)(y.Z,{flex:1,children:(0,R.jsx)(j.Z.Item,{initialValue:Q.manager,name:"manager",rules:[{required:!0,message:"请先选择职称"}],children:(0,R.jsxs)(x.default,{children:[(0,R.jsx)(W,{value:"企业管理者",children:"企业管理者"}),(0,R.jsx)(W,{value:"部门管理者",children:"部门管理者"}),(0,R.jsx)(W,{value:"高级工程师",children:"高级工程师"}),(0,R.jsx)(W,{value:"工程师",children:"工程师"}),(0,R.jsx)(W,{value:"助理工程师",children:"助理工程师"})]})})})]}),(0,R.jsx)(j.Z.Item,{label:"学校/单位",name:"school",extra:Q.school&&!(null!=G&&G.find((function(e){return e.name===Q.school})))&&(0,R.jsx)("div",{className:T.Z.schoolHintWrap,children:(0,R.jsxs)("span",{className:T.Z.colorCDCDCD,children:["未找到包含“",Q.school,"”的高校,如有需要,请",(0,R.jsx)("span",{style:{color:"blue",cursor:"pointer"},onClick:function(){Ke()},children:"联系平台运营"}),"申请新增"]})}),rules:[{required:!0,message:"请先选择学校/单位"}],children:(0,R.jsx)(N.Z,{showSearch:!0,onSearch:Ae,children:Y.map((function(e,n){return(0,R.jsx)(W,{value:e.name,children:e.name},n)}))})}),(0,R.jsx)(j.Z.Item,{label:"院系/部门",name:"department",extra:Q.department&&!(null!=ne&&ne.find((function(e){return e.name===Q.department})))&&(0,R.jsxs)("div",{className:T.Z.schoolHintWrap,children:[(0,R.jsx)("span",{className:T.Z.colorCDCDCD,children:Q.department?"未找到包含“".concat(Q.department,"”的高校,"):"未找到院系,"}),(0,R.jsxs)("span",{className:T.Z.colorCDCDCD,children:["如有需要,请",(0,R.jsx)("span",{style:{color:"blue",cursor:"pointer"},onClick:function(){Ke()},children:"联系平台运营"}),"申请新增"]})]}),rules:[{required:!0,message:"请先选择院系/部门"}],children:(0,R.jsx)(N.Z,{showSearch:!0,onChange:function(e){Be(),oe(ne.filter((function(n){return n.name.includes(e)})))},children:ae.map((function(e,n){return(0,R.jsxs)(W,{value:e.name,children:[e.name,0==(null==e?void 0:e.status)&&(0,R.jsx)("span",{style:{color:"#FF8C29",marginLeft:"5px"},children:"(待审核)"})]},n)}))})}),(0,R.jsx)(j.Z.Item,{label:"专业",name:"major_name",extra:O.getFieldValue("major_name")&&!(null!=ce&&ce.find((function(e){return e.name==O.getFieldValue("major_name")})))&&(0,R.jsx)("div",{className:T.Z.schoolHintWrap,children:"teacher"==O.getFieldValue("identity")?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)("span",{className:T.Z.colorCDCDCD,children:"未查询到“".concat(O.getFieldValue("major_name"),"”专业,")}),(0,R.jsxs)("span",{className:T.Z.colorCDCDCD,children:["如有需要,请",(0,R.jsx)("span",{style:{color:"blue",cursor:"pointer"},onClick:function(){Ke()},children:"联系平台运营"}),"申请新增"]})]}):(0,R.jsxs)("span",{className:T.Z.colorCDCDCD,children:["未找到“",O.getFieldValue("major_name"),"”专业,如有需要,请",(0,R.jsx)("span",{style:{color:"blue",cursor:"pointer"},onClick:function(){Ke()},children:"联系平台运营"}),"申请新增"]})}),rules:["teacher"==O.getFieldValue("identity")&&{required:!0,message:"请先选择专业"}],children:(0,R.jsx)(N.Z,{size:"large",onChange:function(e){he(ce.filter((function(n){return n.name.includes(e)})))},children:pe.map((function(e,n){return(0,R.jsxs)(W,{value:e.name,children:[e.name,0==(null==e?void 0:e.status)&&(0,R.jsx)("span",{style:{color:"#FF8C29",marginLeft:"5px"},children:"(待审核)"})]},n)}))})}),"student"===Q.identity&&(0,R.jsxs)(Z.Z,{gutter:[10,0],wrap:!1,children:[(0,R.jsx)(y.Z,{flex:"240px",children:(0,R.jsx)(j.Z.Item,{label:"验证码",name:"code_type",initialValue:2,children:(0,R.jsxs)(x.default,{children:[(0,R.jsx)(W,{value:2,children:"手机号"}),(0,R.jsx)(W,{value:1,children:"邀请码"})]})})}),(0,R.jsx)(y.Z,{flex:1,children:1===Q.code_type?(0,R.jsx)(j.Z.Item,{name:"code",children:(0,R.jsx)(b.Z,{type:"text",placeholder:"请输入已加入的教学课堂的邀请码",maxLength:10})}):(0,R.jsx)(j.Z.Item,{name:"code",children:(0,R.jsx)(b.Z,{type:"text",placeholder:"请输入已加入的教学课堂中教师的手机号后六位",maxLength:10})})}),(0,R.jsx)(C.Z,{title:"当前账号申请认证的单位与已加入的教学课堂所属单位需相同",children:(0,R.jsx)(y.Z,{style:{paddingTop:"10px"},children:(0,R.jsx)("i",{className:"iconfont icon-a-wenhaobeifen2 primary-hover font14",style:{cursor:"pointer"}})})})]}),(0,R.jsx)(j.Z.Item,{label:"职业证上传",required:!0,children:(0,R.jsxs)("div",{className:T.Z.flexRow,children:[(0,R.jsxs)("div",{className:"".concat(T.Z.flexColumn," ").concat(T.Z.example),children:[(0,R.jsx)("span",{className:T.Z.exampleImg,children:(0,R.jsx)("img",{src:S})}),(0,R.jsxs)("span",{className:"tc",children:[(0,R.jsx)("p",{children:"示例图片"}),(0,R.jsx)("p",{className:"".concat(T.Z.colorOrange," font12"),children:"(png/jpg/bmp格式,不超过2MB)"})]})]}),(0,R.jsxs)("div",{className:T.Z.flexColumn,children:[(0,R.jsx)(A,o()(o()({},Xe),{},{accept:".png,.jpg,.bmp,.jpeg",children:je?(0,R.jsx)("img",{src:je,className:T.Z.uploadImg}):(0,R.jsxs)("div",{className:T.Z.imageTip,children:[(0,R.jsx)("p",{children:(0,R.jsx)("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(T.Z.uploadTipIcon)})}),(0,R.jsx)("p",{className:T.Z.uploadTip,children:(0,R.jsx)("a",{className:T.Z.color05101a,children:"点击或拖拽上传图片"})})]})})),(0,R.jsx)("span",{className:"tc",children:(0,R.jsx)("p",{className:T.Z.viewLargerImg,children:"查看大图"})})]})]})}),(0,R.jsx)("div",{className:T.Z.footerWrap,children:(0,R.jsxs)(j.Z.Item,{children:[(0,R.jsx)(w.ZP,{className:"mr5",size:"middle",onClick:Ue,children:"取消"}),(0,R.jsx)(w.ZP,{size:"middle",type:"primary",htmlType:"submit",loading:u["account/applyProfessionalAuth"],children:"提交"})]})}),(0,R.jsxs)("div",{className:T.Z.note,children:[(0,R.jsx)("p",{children:"认证须知:"}),(0,R.jsx)("p",{children:"1.根据职业上传相应的证件照:教师(教师证),专业人士(员工证)、学生(学生证),请确保证件照内容完整并且清晰可见,严禁PS;"}),(0,R.jsx)("p",{children:"2.我们将在你提交职业证信息后的24小时(不包含节假日)内完成审核,审核结果将会以系统消息的形式发送给你;"}),(0,R.jsx)("p",{children:"3.职业认证审核完成后,无法删除,请谨慎填写;职业变更请选择重新认证;"}),(0,R.jsx)("p",{children:"4.职业认证审核完成后,系统将自动发放500个金币作为奖励;"}),(0,R.jsx)("p",{children:"5.我们会确保你所提供的信息均处于严格的保密状态,不会泄露;"}),(0,R.jsxs)("p",{children:["6.如存在恶意乱填写姓名,学号,及上传与职业证件无关图片者,一经发现将冻结",!(null!=c&&null!==(n=c.setting)&&void 0!==n&&n.is_local)&&"EduCoder","账号。"]}),(0,R.jsx)("p",{children:"7.非老师身份提交职业认证后系统会自动将状态改为已认证,你将可以体验平台需要职业认证的功能;如果在认证后的使用过程中未通过审核,你将不能继续体验需要认证的功能。"})]})]})}),(0,R.jsx)(I.Z,{visible:Fe,onClose:function(){return Se(!1)},schoolName:Q.school,onSuccess:Me}),(0,R.jsx)(k.Z,{visible:qe,onClose:function(){return De(!1)},schoolId:null===(t=G.find((function(e){return e.name===Q.school})))||void 0===t?void 0:t.id,schoolName:Q.school,departmentName:Q.department,onSuccess:function(e){return He(Q.school,e)}}),(0,R.jsx)(D.Z,{visible:Ee,onClose:function(){return We(!1)},departmentId:null===(l=ne.find((function(e){return e.name===Q.department})))||void 0===l?void 0:l.id,departmentName:Q.department,majorName:O.getFieldValue("major_name"),onSuccess:function(e){O.setFieldsValue({major_name:e}),H(o()(o()({},O.getFieldsValue()),{major_name:e})),Be()}})]})}))},95008:function(e,n,t){t.d(n,{Z:function(){return D}});var l=t(7557),i=t.n(l),a=t(82242),o=t.n(a),r=t(41498),s=t.n(r),c=t(79800),d=t.n(c),u=t(39647),m=t.n(u),p=t(59301),h=t(3858),x=t(92832),f=t(78241),j=t(43418),g=t(61998),v=t(8591),_=t(19842),Z=t(3113),y=t(80559),b=t(58670),C=t(41957),N="flexRow___qRWfN",w="flexColumn___qUHfF",I="formWrap___kSgvX",k="example___D0a_H",F="footerWrap___kTeYf",S=t(37712),T=["account","globalSetting","loading","dispatch","schoolName","visible","onClose","onSuccess"],V=function(e,n){return n.some((function(n){return n.label.toLowerCase().indexOf(e.toLowerCase())>-1}))},q=x.Z.TextArea,D=(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;var n=e.loading,t=e.dispatch,l=e.schoolName,a=e.visible,r=e.onClose,c=void 0===r?function(){}:r,u=e.onSuccess,h=void 0===u?function(){}:u,D=(m()(e,T),f.Z.useForm()),P=d()(D,1)[0];(0,p.useEffect)((function(){P.setFieldsValue({name:l})}),[l]);var R=function(){var e=s()(i()().mark((function e(n){var l,a,r,d,u,m,p,x;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=(l=n||{}).name,r=l.city,d=void 0===r?[]:r,u=l.address,m=l.remarks,e.next=3,t({type:"account/appplySchool",payload:{name:a,province:d[0],city:d[1],address:u,remarks:m}});case 3:if(2!=(null==(p=e.sent)?void 0:p.status)){e.next=7;break}return x=j.Z.confirm({icon:null,width:600,centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("p",{children:"系统检测到您申请新增的单位已存在,请确认是否为该单位?"}),(0,S.jsx)(g.Z,{columns:[{title:"学校/单位",dataIndex:"name"},{title:"用户数",width:150,dataIndex:"users_count"}],dataSource:[o()({},p)],pagination:!1})]}),onOk:function(){var e=s()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h(a);case 2:x.destroy(),c();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),onCancel:function(){x.destroy()}}),e.abrupt("return");case 7:c(),0==p.status&&(v.ZP.success("新增学校/单位成功!"),h(a));case 9:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,S.jsx)(j.Z,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,open:a,title:"申请添加单位名称",width:"600px",footer:null,children:(0,S.jsxs)(f.Z,{className:I,form:P,labelCol:{span:4},wrapperCol:{span:20},onFinish:R,children:[(0,S.jsx)(f.Z.Item,{label:"单位全称:",name:"name",rules:[{required:!0,message:"请输入学校或工作单位"}],children:(0,S.jsx)(x.Z,{placeholder:"学校或工作单位"})}),(0,S.jsxs)("div",{className:"".concat(N," ").concat(k),children:[(0,S.jsx)("div",{children:"示例:"}),(0,S.jsxs)("div",{className:w,children:[(0,S.jsxs)("div",{children:[(0,S.jsx)(y.Z,{style:{color:"rgb(82, 196, 26)"}}),(0,S.jsx)("span",{className:"font14 ml5",children:"正确示例:数据结构"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)(b.Z,{style:{color:"red"}}),(0,S.jsx)("span",{className:"font14 ml5",children:"错误示例:数据结构2019春"})]})]})]}),(0,S.jsx)(f.Z.Item,{label:"地区:",name:"city",children:(0,S.jsx)(_.Z,{allowClear:!0,size:"middle",options:C.P,placeholder:"请选择所在地",showSearch:{matchInputWidth:!0,filter:V}})}),(0,S.jsx)(f.Z.Item,{label:"详细地址:",name:"address",children:(0,S.jsx)(x.Z,{placeholder:"请填写完整的地址信息"})}),(0,S.jsx)(f.Z.Item,{label:"说明:",name:"remarks",children:(0,S.jsx)(q,{placeholder:"再次说明特别情况(选填)"})}),(0,S.jsx)("div",{className:F,children:(0,S.jsxs)(f.Z.Item,{children:[(0,S.jsx)(Z.ZP,{className:"mr5",size:"middle",onClick:function(){c()},children:"取消"}),(0,S.jsx)(Z.ZP,{size:"middle",type:"primary",htmlType:"submit",loading:n["account/appplySchool"],children:"保存"})]})})]})})}))},48661:function(e,n){n.Z={modal:"modal___AR21E",colorBlue:"colorBlue___b0CCE",formWrap:"formWrap___OyO5X",flexRow:"flexRow___wW7jP",flexColumn:"flexColumn___BCgnC",example:"example___ZutfX",exampleImg:"exampleImg___kx2Sr",colorOrange:"colorOrange___Vxey1",uploader:"uploader___XWuRm",uploadImg:"uploadImg___K7STh",imageTip:"imageTip___E92I3",uploadTipIcon:"uploadTipIcon___T9xzR",uploadTip:"uploadTip___q47UY",color05101a:"color05101a___QWF70",viewLargerImg:"viewLargerImg___fGLAh",footerWrap:"footerWrap___ko3aN",note:"note___ks3DM",schoolHintWrap:"schoolHintWrap___nges7",colorCDCDCD:"colorCDCDCD___KQtws",color0152d9:"color0152d9___fTD_v",tips:"tips___NZ2ux"}}}]); |