1 |
- import{d as W,P as E,Q as G,S as C,w as g,V as D,h as L,j as t,A as s,B as R,aS as p,bJ as U,F as V,T as u,y as d,u as T,i as k}from"./ResizeObserver.es.b7226882.js";import"./index.40f703b6.js";import{F as l}from"./index.021f1c7b.js";import{C as M}from"./index.9269bf1e.js";import"./index.77fc1df7.js";import{I as q}from"./index.4b0dea7c.js";import{D as K}from"./index.685bede6.js";import{F as P}from"./index.016a5975.js";import{P as h}from"./index.e7e9e267.js";import"./use-id.5d5e6e63.js";import"./index.af733095.js";import"./index.20c0f4c5.js";import"./utils.db47622f.js";const Q="_resjetStudentWrap_o31ed_1",X="_bgWrap_o31ed_8",z="_rejectLogo_o31ed_15",J="_studentText_o31ed_24",O="_schoolNameWrap_o31ed_33",Y="_rejectSchool_o31ed_48",Z="_centerLogo_o31ed_53",H="_infoWrap_o31ed_60",$="_infoWrapCore_o31ed_71",ee="_subTitle_o31ed_78",te="_group_o31ed_86",oe="_noArrow_o31ed_90",ae="_inputCode_o31ed_113",ne="_tips_o31ed_129",se="_sendBtn_o31ed_146",re="_rejectBtn_o31ed_159",ue="_showWrap_o31ed_168",le="_showWrapTop_o31ed_181",ce="_downApp_o31ed_216",de="_secondWrap_o31ed_231",ie="_buttonWrap_o31ed_258",pe="_closeBtn_o31ed_267",me="_submitBtn_o31ed_280";var n={resjetStudentWrap:Q,bgWrap:X,rejectLogo:z,studentText:J,schoolNameWrap:O,rejectSchool:Y,centerLogo:Z,infoWrap:H,infoWrapCore:$,subTitle:ee,group:te,noArrow:oe,inputCode:ae,tips:ne,sendBtn:se,rejectBtn:re,showWrap:ue,showWrapTop:le,downApp:ce,secondWrap:de,buttonWrap:ie,closeBtn:pe,submitBtn:me},ge="./assets/bg.eafce322.png",fe="./assets/rejectLogo.6f541221.png",he="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAAAXNSR0IArs4c6QAAAqNJREFUWEftl8trE1EUxr8zmSQ01NqCq0I6aRGlRVAMSklUooi0lUwXQl24c6EgUgRXRXDjol0VRPoX6KoLtYlaREsjNAk+urRQLOZdpFIXrdrYzMyRSQ0ksSaTmBEXucs755z7m+885g7hP1lUzhHs9O2DqB4mAWI9jBqUbPabfXHkc+hrLf4lIAGn5xgEegmgrZYgv9kyUhZh+/j5+NtPRuOUgAQl7wMGLgGsMSgGQDUaSLcTADsDUt6HMCbHwxNG/UsV6fI+B+EcGBNyMjxmNEixXbDLO8MEmUGTw4mFm0Zj7ApCoOv+xMKU0SDFdgHpxBTA15ogBVVMUeSRq98lsuUxgPbKaeI4cj+G/KuL300BCUieMwDNVasVBnKCqnX709GMKSA6wFOX54gGobIiQi7j//j6g25fAAEjRYSVP7zEqibgznAsvFx4blrXVFMRwIqcCB8AwDtjp2gFfs2RRrQvgAyBxsHadvEZDHKDcFXfExWrcygTSpsKQsx3/cnIjXJlnu0ftCu5jay+byVr92A8FK8KMg+fuCkpVwCto6LUjKScjNwvrhECTfp3mazzPp+4GcvlagJ54vTKmoAZA/nWM31ITobfF4q1oSAvetx7s2rLOFeZI0RItcbFW6cRUkwBMaREmVETpFw10xQJdrodwB5HpTRtta9tjCwt5eeFKSAB6eRRQI0CZKvcvrzuUJWDZzNv1k0B0b8zKlMEQEuVwl2zqVrvQDr6xRQQ/fDpvj6bXe2wVwJpW7Zu6a1rWmqa7dvIr29DR3wzNc3UFK6Ks65+lwLLADOPAtQLwjSYXtVTI2C+CMIpAs0x8LA8BoEFBu7p+wzcJuCdnAjP5u+shZTUdfBfOhHACqk9OyCS5wKBLnP+h/7fLgLFWhPi6E9A9WJr6DrvywAAAABJRU5ErkJggg==",Ae="./assets/subTitle.fbf07443.png",Ce="./assets/center.13bda931.png",be="./assets/studentText.6a2c2c10.png",f="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAARRJREFUSEvF1UFqAjEUBuA/GheuPEQdqtdQSu0FBMUrKMho76BYoe0dRvEM7bbuXI8u3NQDiNJVcV4ZFwo2GZM3Kc1+/i8k8/IL/PESuvzPWTf/dRB32YNceK3hhrsPLRAG/juACoCdFPKh2Bh8cJAkYAugcAwl7GVG1jiIFlgFfjsCXk67ZiJaIA4OA/8RwCANkgi4QK4CaREjIEZW014/imhoe1zGABexAnRINifuvfporpoTa0CFCGB923y6cQb8+n2BdckVoJoNylCt3BgrnxKrI+IMnjHACY/vxAjghhsBacKvAmnDE4Fw0uuA6Nn2abichf8rnOXEfyNCFaCdFDn3lXku/e+F13p1X/qcgld98wOin6sZB+h4pAAAAABJRU5ErkJggg==",Se="./assets/rejectBtn.42205429.png",we="./assets/studentSuccess.639fc4e5.png",Le=W({name:"tenantStudentRejest",setup(){const c=E(),b=G(),a=C({gender:"",name:"",phone:"",subjectId:"",subjectName:"",tenantGroupName:"",tenantGroupId:"",birthdate:"",code:"",genderName:"",tenantId:c.query.tenantId}),e=C({birthdate:new Date(g().year(),g().month()+1,g().date()),schoolName:c.query.name||"",id:c.query.tenantId,tenantGroupId:c.query.tenantGroupId,userSchoolName:"",cityName:"",showArea:!1,checked:!0,success:!1,areaList:{},sendMsg:"\u83B7\u53D6\u9A8C\u8BC1\u7801",imgCodeStatus:!1,subjectList:[],searchStatus:!1,openStatus:!1,dateState:!1,tenantGroupList:[],tenantGroupStatus:!1,genderState:!1,genderList:[{text:"\u7537",value:"1"},{text:"\u5973",value:"0"}],showSuccess:!1,secondConfirm:!1,minDate:new Date(1980,0,1),maxDate:new Date}),A=async()=>{try{if(!a.name){u("\u8BF7\u8F93\u5165\u59D3\u540D");return}if(!a.gender){u("\u8BF7\u9009\u62E9\u6027\u522B");return}if(!a.birthdate){u("\u8BF7\u9009\u62E9\u51FA\u751F\u5E74\u6708");return}if(!a.phone){u("\u8BF7\u8F93\u5165\u624B\u673A\u53F7");return}if(!a.code){u("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801");return}if(!a.subjectId){u("\u8BF7\u9009\u62E9\u58F0\u90E8");return}if(!a.tenantGroupId){u("\u8BF7\u9009\u62E9\u5C0F\u7EC4");return}const o=!!c.query.taId,r=await d.post("/api-tenant/open/student/save",{data:{...a,loginCode:o},hideLoading:!0});r.code==200&&(o?S(r.data):e.showSuccess=!0),r.code==5004&&(e.secondConfirm=!0,e.userSchoolName=r.msg)}catch{}},S=async o=>{try{if(!o){u("\u6CE8\u518C\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u6CE8\u518C");return}const r=await d.post("/api-auth/smsLogin",{requestType:"form",data:{clientId:"student",clientSecret:"student",phone:a.phone,smsCode:o}}),{authentication:i}=r.data;T(i.token_type+" "+i.access_token);const m=await d.get("/api-student/student/queryUserInfo",{initRequest:!0});k(m.data),b.replace({path:"/train-tool",query:{...c.query}})}catch{}},w=async()=>{try{const r=(await d.get("/api-tenant/open/subject/queryPage",{params:{page:1,rows:9999,queryType:"list"}})).data.rows||[],i=[];r.forEach(m=>{i.push({text:m.name,value:m.id})}),e.subjectList=i}catch(o){console.log(o)}},_=o=>{a.subjectName=o.text,a.subjectId=o.value,e.searchStatus=!1},B=o=>{console.log(o,"confirmTenant"),a.tenantGroupName=o.text,a.tenantGroupId=o.value,e.tenantGroupStatus=!1},j=o=>{a.birthdate=g(o).format("YYYY-MM-DD"),e.dateState=!1},v=async()=>{try{const o=await d.post("/api-tenant/open/tenantGroup/page",{data:{page:1,rows:999,tenantId:e.id}});e.tenantGroupList=o.data.rows.map(r=>({text:r.name,value:r.id}))||[]}catch{}};D(()=>{L(),e.tenantGroupId&&(a.tenantGroupId=e.tenantGroupId),v(),w()});const y=o=>{o.value?(a.gender=o.value,a.genderName=o.text):(a.gender="",a.genderName=""),e.genderState=!1},x=async()=>{if(!a.phone){u("\u8BF7\u8F93\u5165\u624B\u673A\u53F7\u7801");return}if(!/^1[3456789]\d{9}$/.test(a.phone)){u("\u624B\u673A\u53F7\u7801\u683C\u5F0F\u4E0D\u6B63\u786E");return}e.imgCodeStatus=!0},F=()=>{e.sendMsg="60s";let o=60;const r=setInterval(()=>{o--,e.sendMsg=`${o}s`,o<=0&&(e.sendMsg="\u83B7\u53D6\u9A8C\u8BC1\u7801",clearInterval(r))},1e3)},I=()=>{window.open(location.origin+"/student/#/download"),e.showSuccess=!1},N=async()=>{try{await d.post("/api-tenant/open/student/save",{data:{...a,updateTenant:!0},hideLoading:!0}),e.showSuccess=!0,e.secondConfirm=!1}catch(o){console.log(o)}};return()=>t(V,null,[t("div",{class:n.videoClass},[t("div",{class:n.resjetStudentWrap},[t("img",{src:fe,class:n.rejectLogo,alt:""},null),t("img",{src:be,class:n.studentText,alt:""},null),t("img",{src:ge,class:n.bgWrap,alt:""},null),t("div",{class:n.schoolNameWrap},[t("img",{src:he,class:n.rejectSchool,alt:""},null),t("p",null,[e.schoolName])]),t("img",{class:n.centerLogo,src:Ce,alt:""},null),t("div",{class:n.infoWrap},[t("div",{class:n.infoWrapCore},[t("img",{src:Ae,class:n.subTitle,alt:""},null),t(P,{onSubmit:()=>A()},{default:()=>[t(M,{class:n.group,border:!1},{default:()=>[t(l,{class:n.noArrow,inputAlign:"right",label:"\u59D3\u540D",placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D",maxlength:14,modelValue:a.name,"onUpdate:modelValue":o=>a.name=o},null),t(l,{readonly:!0,inputAlign:"right",label:"\u6027\u522B",placeholder:"\u8BF7\u9009\u62E9\u6027\u522B",modelValue:a.genderName,"onUpdate:modelValue":o=>a.genderName=o,onClick:()=>{e.genderState=!0}},{button:()=>t("img",{style:{display:"block",width:"12px",height:"12px"},src:f},null)}),t(l,{readonly:!0,inputAlign:"right",label:"\u51FA\u751F\u65E5\u671F",placeholder:"\u8BF7\u9009\u62E9\u51FA\u751F\u65E5\u671F",maxlength:20,modelValue:a.birthdate,"onUpdate:modelValue":o=>a.birthdate=o,onClick:()=>{e.dateState=!0}},{button:()=>t("img",{style:{display:"block",width:"12px",height:"12px"},src:f},null)}),t(l,{inputAlign:"right",label:"\u624B\u673A\u53F7",class:n.noArrow,maxlength:11,placeholder:"\u624B\u673A\u53F7\u7801",modelValue:a.phone,"onUpdate:modelValue":o=>a.phone=o},null),t("div",{class:n.tips},[s("\u624B\u673A\u53F7\u7801\u4E3A\u9177\u4E50\u79C0\u673A\u6784\u7248\u767B\u5F55\u8D26\u53F7")]),t(l,{class:n.inputCode,inputAlign:"left",label:"\u9A8C\u8BC1\u7801",labelWidth:0,modelValue:a.code,"onUpdate:modelValue":o=>a.code=o,maxlength:6},{button:()=>t(R,{disabled:e.sendMsg.includes("s"),class:n.sendBtn,onClick:()=>x()},{default:()=>[e.sendMsg]})}),t(l,{border:!1,inputAlign:"right",label:"\u58F0\u90E8",placeholder:"\u8BF7\u9009\u62E9\u58F0\u90E8",readonly:!0,modelValue:a.subjectName,"onUpdate:modelValue":o=>a.subjectName=o,onClick:()=>e.searchStatus=!0},{button:()=>t("img",{style:{display:"block",width:"12px",height:"12px"},src:f},null)}),e.tenantGroupId?"":t(l,{border:!1,inputAlign:"right",label:"\u5C0F\u7EC4",placeholder:"\u8BF7\u9009\u62E9\u5C0F\u7EC4",readonly:!0,modelValue:a.tenantGroupName,"onUpdate:modelValue":o=>a.tenantGroupName=o,onClick:()=>e.tenantGroupStatus=!0},{button:()=>t("img",{style:{display:"block",width:"12px",height:"12px"},src:f},null)})]})]})]),t("img",{src:Se,onClick:()=>{A()},class:n.rejectBtn,alt:""},null)])]),t(p,{show:e.searchStatus,position:"bottom",round:!0,"columns-field-names":{text:""},"safe-area-inset-bottom":!0,onClose:()=>e.searchStatus=!1,onClosed:()=>e.openStatus=!1},{default:()=>[t(h,{columns:e.subjectList,onCancel:()=>{e.searchStatus=!1},onConfirm:_},null)]}),t(p,{show:e.tenantGroupStatus,position:"bottom",round:!0,"columns-field-names":{text:""},"safe-area-inset-bottom":!0,onClose:()=>e.tenantGroupStatus=!1,onClosed:()=>e.openStatus=!1},{default:()=>[t(h,{columns:e.tenantGroupList,onCancel:()=>{e.tenantGroupStatus=!1},onConfirm:B},null)]}),t(p,{show:e.dateState,position:"bottom",round:!0,"columns-field-names":{text:""},"safe-area-inset-bottom":!0,onClose:()=>e.dateState=!1,onClosed:()=>e.dateState=!1},{default:()=>[t(K,{"min-date":e.minDate,"max-date":e.maxDate,type:"date",modelValue:e.birthdate,"onUpdate:modelValue":o=>e.birthdate=o,onCancel:()=>{e.dateState=!1},onConfirm:j},null)]}),t(p,{show:e.genderState,position:"bottom",round:!0,"columns-field-names":{text:""},"safe-area-inset-bottom":!0,onClose:()=>e.genderState=!1,onClosed:()=>e.genderState=!1},{default:()=>[t(h,{columns:e.genderList,onCancel:()=>{e.genderState=!1},onConfirm:y},null)]}),t(U,{show:e.showSuccess,"z-index":1e3},{default:()=>[t("div",{class:n.showWrap},[t("img",{class:n.showWrapTop,src:we,alt:""},null),t("h2",null,[s("\u606D\u559C\u60A8\u5DF2\u6210\u529F\u767B\u8BB0\u4E3A")]),t("h4",null,[e.schoolName,s(" "),t("span",null,[s("\u3010\u5B66\u5458\u3011")])," "]),t("p",null,[s("\u8BF7\u4E0B\u8F7D\u9177\u4E50\u79C0\u673A\u6784\u7248APP\u8FDB\u884C\u5B66\u4E60")]),t("div",{class:n.downApp,onClick:I},[s("\u7ACB\u5373\u4E0B\u8F7D")])])]}),t(p,{show:e.secondConfirm,position:"center",round:!0,onClose:()=>e.secondConfirm=!1,onClosed:()=>e.secondConfirm=!1},{default:()=>[t("div",{class:n.secondWrap},[t("h2",null,[s("\u63D0\u793A")]),t("p",null,[s("\u5F53\u524D\u8D26\u53F7\u5DF2\u5B58\u5728 "),t("span",null,[s("\u3010"),e.userSchoolName,s("\u3011")])," ",s("\uFF0C\u662F\u5426\u786E\u8BA4\u66F4\u6362\u5230"),t("span",null,[e.schoolName]),s("\u5417?")]),t("div",{class:n.buttonWrap},[t("div",{class:n.closeBtn,onClick:()=>{e.secondConfirm=!1}},[" ",s("\u53D6\u6D88")]),t("div",{class:n.submitBtn,onClick:N},[s("\u786E\u5B9A")])])])]}),e.imgCodeStatus?t(q,{value:e.imgCodeStatus,"onUpdate:value":o=>e.imgCodeStatus=o,phone:a.phone,registerType:"REGISTER",onClose:()=>{e.imgCodeStatus=!1},onSendCode:F},null):null])])}});export{Le as default};
|