index.f669a9b0.js 9.5 KB

1
  1. import{d as _,O as j,Q as g,U as F,j as e,z as n,B as x,aR as c,bE as W,F as E,T as r,w as d,u as N}from"./index.cf487d9e.js";import"./index.e3693273.js";import{F as l}from"./index.1c8c6ce9.js";import{C as D}from"./index.9b68ff02.js";import"./index.0f76b414.js";import{D as R}from"./index.08f875f0.js";import{F as U}from"./index.db7e92e2.js";import{P as h}from"./index.96191dd0.js";import"./use-id.f045e77e.js";import"./utils.523b8f77.js";const y="_resjetStudentWrap_8vpsh_1",L="_bgWrap_8vpsh_6",T="_rejectLogo_8vpsh_13",I="_studentText_8vpsh_22",V="_schoolNameWrap_8vpsh_31",k="_rejectSchool_8vpsh_46",M="_centerLogo_8vpsh_51",K="_infoWrap_8vpsh_58",G="_infoWrapCore_8vpsh_71",Q="_subTitle_8vpsh_79",P="_group_8vpsh_87",q="_noArrow_8vpsh_91",X="_inputCode_8vpsh_114",z="_tips_8vpsh_130",J="_sendBtn_8vpsh_147",O="_rejectBtn_8vpsh_160",Y="_showWrap_8vpsh_168",Z="_showWrapTop_8vpsh_181",H="_downApp_8vpsh_216",$="_secondWrap_8vpsh_231",ee="_buttonWrap_8vpsh_258",te="_closeBtn_8vpsh_267",se="_submitBtn_8vpsh_280";var a={resjetStudentWrap:y,bgWrap:L,rejectLogo:T,studentText:I,schoolNameWrap:V,rejectSchool:k,centerLogo:M,infoWrap:K,infoWrapCore:G,subTitle:Q,group:P,noArrow:q,inputCode:X,tips:z,sendBtn:J,rejectBtn:O,showWrap:Y,showWrapTop:Z,downApp:H,secondWrap:$,buttonWrap:ee,closeBtn:te,submitBtn:se},oe="./assets/bg.eafce322.png",ae="./assets/rejectLogo.6f541221.png",ne="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==",re="./assets/subTitle.fbf07443.png",le="./assets/center.13bda931.png",ue="./assets/studentText.6a2c2c10.png",p="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAARRJREFUSEvF1UFqAjEUBuA/GheuPEQdqtdQSu0FBMUrKMho76BYoe0dRvEM7bbuXI8u3NQDiNJVcV4ZFwo2GZM3Kc1+/i8k8/IL/PESuvzPWTf/dRB32YNceK3hhrsPLRAG/juACoCdFPKh2Bh8cJAkYAugcAwl7GVG1jiIFlgFfjsCXk67ZiJaIA4OA/8RwCANkgi4QK4CaREjIEZW014/imhoe1zGABexAnRINifuvfporpoTa0CFCGB923y6cQb8+n2BdckVoJoNylCt3BgrnxKrI+IMnjHACY/vxAjghhsBacKvAmnDE4Fw0uuA6Nn2abichf8rnOXEfyNCFaCdFDn3lXku/e+F13p1X/qcgld98wOin6sZB+h4pAAAAABJRU5ErkJggg==",ce="./assets/rejectBtn.42205429.png",de="./assets/studentSuccess.639fc4e5.png",we=_({name:"tenantStudentRejest",setup(){const i=j(),o=g({gender:"",name:"",phone:"",subjectId:"",subjectName:"",birthdate:"",code:"",genderName:"",tenantId:i.query.tenantId}),t=g({schoolName:i.query.name||"",id:i.query.tenantId,userSchoolName:"",cityName:"",showArea:!1,checked:!0,success:!1,areaList:{},sendMsg:"\u83B7\u53D6\u9A8C\u8BC1\u7801",imgCodeStatus:!1,subjectList:[],searchStatus:!1,openStatus:!1,dateState:!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}),m=async()=>{try{if(console.log(o,"forms"),!o.name){r("\u8BF7\u8F93\u5165\u59D3\u540D");return}if(!o.gender){r("\u8BF7\u9009\u62E9\u6027\u522B");return}if(!o.phone){r("\u8BF7\u8F93\u5165\u624B\u673A\u53F7");return}if(!o.birthdate){r("\u8BF7\u9009\u62E9\u51FA\u751F\u5E74\u6708");return}if(!o.code){r("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801");return}if(!o.subjectId){r("\u8BF7\u9009\u62E9\u58F0\u90E8");return}const s=await d.post("/api-tenant/open/student/save",{data:{...o},hideLoading:!0});console.log(s),s.code==200&&(t.showSuccess=!0),s.code==5004&&(t.secondConfirm=!0,t.userSchoolName=s.msg)}catch{}},A=async()=>{try{const s=await d.get("/api-tenant/open/subject/queryPage",{data:{page:1,rows:9999}});t.subjectList=s.data.rows.map(u=>({text:u.name,value:u.id}))||[]}catch(s){console.log(s)}},f=s=>{o.subjectName=s.text,o.subjectId=s.value,t.searchStatus=!1,console.log(s,"confirmSubject")},b=s=>{o.birthdate=N(s).format("YYYY-MM-DD"),t.dateState=!1};F(()=>{A()});const C=s=>{s.value?(o.gender=s.value,o.genderName=s.text):(o.gender="",o.genderName=""),t.genderState=!1},v=async()=>{if(!o.phone){r("\u8BF7\u8F93\u5165\u624B\u673A\u53F7\u7801");return}if(!/^1[3456789]\d{9}$/.test(o.phone)){r("\u624B\u673A\u53F7\u7801\u683C\u5F0F\u4E0D\u6B63\u786E");return}await d.post("/api-student/code/sendSmsCode",{requestType:"form",data:{mobile:o.phone,type:"REGISTER"}}),w(),setTimeout(()=>{r("\u9A8C\u8BC1\u7801\u5DF2\u53D1\u9001")},100)},w=()=>{t.sendMsg="60s";let s=60;const u=setInterval(()=>{s--,t.sendMsg=`${s}s`,s<=0&&(t.sendMsg="\u83B7\u53D6\u9A8C\u8BC1\u7801",clearInterval(u))},1e3)},S=()=>{window.open(location.origin+"/student/#/download"),t.showSuccess=!1},B=async()=>{try{await d.post("/api-tenant/open/student/save",{data:{...o,updateTenant:!0},hideLoading:!0}),t.showSuccess=!0,t.secondConfirm=!1}catch(s){console.log(s)}};return()=>e(E,null,[e("div",{class:a.videoClass},[e("div",{class:a.resjetStudentWrap},[e("img",{src:ae,class:a.rejectLogo,alt:""},null),e("img",{src:ue,class:a.studentText,alt:""},null),e("img",{src:oe,class:a.bgWrap,alt:""},null),e("div",{class:a.schoolNameWrap},[e("img",{src:ne,class:a.rejectSchool,alt:""},null),e("p",null,[t.schoolName])]),e("img",{class:a.centerLogo,src:le,alt:""},null),e("div",{class:a.infoWrap},[e("div",{class:a.infoWrapCore},[e("img",{src:re,class:a.subTitle,alt:""},null),e(U,{onSubmit:()=>m()},{default:()=>[e(D,{class:a.group,border:!1},{default:()=>[e(l,{class:a.noArrow,inputAlign:"right",label:"\u59D3\u540D",placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D",maxlength:14,modelValue:o.name,"onUpdate:modelValue":s=>o.name=s},null),e(l,{readonly:!0,inputAlign:"right",label:"\u6027\u522B",placeholder:"\u8BF7\u9009\u62E9\u6027\u522B",modelValue:o.genderName,"onUpdate:modelValue":s=>o.genderName=s,onClick:()=>{t.genderState=!0}},{button:()=>e("img",{style:{display:"block",width:"12px",height:"12px"},src:p},null)}),e(l,{readonly:!0,inputAlign:"right",label:"\u51FA\u751F\u65E5\u671F",placeholder:"\u8BF7\u9009\u62E9\u51FA\u751F\u65E5\u671F",maxlength:20,modelValue:o.birthdate,"onUpdate:modelValue":s=>o.birthdate=s,onClick:()=>{t.dateState=!0}},{button:()=>e("img",{style:{display:"block",width:"12px",height:"12px"},src:p},null)}),e(l,{inputAlign:"right",label:"\u624B\u673A\u53F7",class:a.noArrow,maxlength:11,placeholder:"\u624B\u673A\u53F7\u7801",modelValue:o.phone,"onUpdate:modelValue":s=>o.phone=s},null),e("div",{class:a.tips},[n("\u624B\u673A\u53F7\u7801\u4E3A\u9177\u4E50\u79C0\u673A\u6784\u7248\u767B\u5F55\u8D26\u53F7")]),e(l,{class:a.inputCode,inputAlign:"left",label:"\u9A8C\u8BC1\u7801",labelWidth:0,modelValue:o.code,"onUpdate:modelValue":s=>o.code=s,maxlength:6},{button:()=>e(x,{disabled:t.sendMsg.includes("s"),class:a.sendBtn,onClick:()=>v()},{default:()=>[t.sendMsg]})}),e(l,{border:!1,inputAlign:"right",label:"\u58F0\u90E8",placeholder:"\u8BF7\u9009\u62E9\u58F0\u90E8",readonly:!0,modelValue:o.subjectName,"onUpdate:modelValue":s=>o.subjectName=s,onClick:()=>t.searchStatus=!0},{button:()=>e("img",{style:{display:"block",width:"12px",height:"12px"},src:p},null)})]})]})]),e("img",{src:ce,onClick:()=>{m()},class:a.rejectBtn,alt:""},null)])]),e(c,{show:t.searchStatus,position:"bottom",round:!0,"columns-field-names":{text:""},"safe-area-inset-bottom":!0,onClose:()=>t.searchStatus=!1,onClosed:()=>t.openStatus=!1},{default:()=>[e(h,{columns:t.subjectList,onCancel:()=>{t.searchStatus=!1},onConfirm:f},null)]}),e(c,{show:t.dateState,position:"bottom",round:!0,"columns-field-names":{text:""},"safe-area-inset-bottom":!0,onClose:()=>t.dateState=!1,onClosed:()=>t.dateState=!1},{default:()=>[e(R,{"min-date":t.minDate,"max-date":t.maxDate,type:"date",value:o.birthdate,"onUpdate:value":s=>o.birthdate=s,onCancel:()=>{t.dateState=!1},onConfirm:b},null)]}),e(c,{show:t.genderState,position:"bottom",round:!0,"columns-field-names":{text:""},"safe-area-inset-bottom":!0,onClose:()=>t.genderState=!1,onClosed:()=>t.genderState=!1},{default:()=>[e(h,{columns:t.genderList,onCancel:()=>{t.genderState=!1},onConfirm:C},null)]}),e(W,{show:t.showSuccess,"z-index":1e3},{default:()=>[e("div",{class:a.showWrap},[e("img",{class:a.showWrapTop,src:de,alt:""},null),e("h2",null,[n("\u606D\u559C\u60A8\u5DF2\u6210\u529F\u767B\u8BB0\u4E3A")]),e("h4",null,[t.schoolName,n(" "),e("span",null,[n("\u3010\u5B66\u5458\u3011")])," "]),e("p",null,[n("\u8BF7\u4E0B\u8F7D\u9177\u4E50\u79C0\u673A\u6784\u7248APP\u8FDB\u884C\u5B66\u4E60")]),e("div",{class:a.downApp,onClick:S},[n("\u7ACB\u5373\u4E0B\u8F7D")])])]}),e(c,{show:t.secondConfirm,position:"center",round:!0,onClose:()=>t.secondConfirm=!1,onClosed:()=>t.secondConfirm=!1},{default:()=>[e("div",{class:a.secondWrap},[e("h2",null,[n("\u63D0\u793A")]),e("p",null,[n("\u5F53\u524D\u8D26\u53F7\u5DF2\u5B58\u5728 "),e("span",null,[n("\u3010"),t.userSchoolName,n("\u3011")])," ",n("\uFF0C\u662F\u5426\u786E\u8BA4\u66F4\u6362\u5230"),e("span",null,[t.schoolName]),n("\u5417?")]),e("div",{class:a.buttonWrap},[e("div",{class:a.closeBtn,onClick:()=>{t.secondConfirm=!1}},[" ",n("\u53D6\u6D88")]),e("div",{class:a.submitBtn,onClick:B},[n("\u786E\u5B9A")])])])]})])])}});export{we as default};