1 |
- !function(){function e(e,t,s,n,o,a,r){try{var l=e[a](r),u=l.value}catch(d){return void s(d)}l.done?t(u):Promise.resolve(u).then(n,o)}function t(t){return function(){var s=this,n=arguments;return new Promise((function(o,a){var r=t.apply(s,n);function l(t){e(r,o,a,l,u,"next",t)}function u(t){e(r,o,a,l,u,"throw",t)}l(void 0)}))}}System.register(["./index-legacy-23bc5b47.js","./three-man-legacy-4fb080c7.js","./index-legacy-f64c151a.js","./index-legacy-885e24f4.js","./index-legacy-17a06d44.js","./index-legacy-5177f82d.js","./index-legacy-020b4d58.js","./index-legacy-dc88a443.js","./index-legacy-f3aba2e3.js","./index-legacy-6c412649.js","./Picker-legacy-02d45d3f.js"],(function(e,s){"use strict";var n,o,a,r,l,u,d,i,c,p,m,h,g,v,S,w,f,C,I,y,x;return{setters:[e=>{n=e.d,o=e.q,a=e.P,r=e.x,l=e.r,u=e.y,d=e.N,i=e.D,c=e.R,p=e.a,m=e.U},e=>{h=e.s,g=e.t},e=>{v=e.O},e=>{S=e.M},e=>{w=e.u},e=>{f=e.u,C=e.b},e=>{I=e.C},e=>{y=e.F},e=>{x=e.P},null,null],execute:function(){const s=[];for(let e=1;e<=40;e++)s.push({text:e+"班",value:e});const P={1:"一年级",2:"二年级",3:"三年级",4:"四年级",5:"五年级",6:"六年级",7:"七年级",8:"八年级",9:"九年级"},L=(e,t)=>{let s=[];const n=[{text:"一年级",value:1,instrumentCode:t},{text:"二年级",value:2,instrumentCode:t},{text:"三年级",value:3,instrumentCode:t},{text:"四年级",value:4,instrumentCode:t},{text:"五年级",value:5,instrumentCode:t}],o=[{text:"六年级",value:6,instrumentCode:t}],a=[{text:"七年级",value:7,instrumentCode:t},{text:"八年级",value:8,instrumentCode:t},{text:"九年级",value:9,instrumentCode:t}];return"FIVE_YEAR_SYSTEM"===e?s.push(...n):"SIX_YEAR_SYSTEM"===e?s.push(...n,...o):"THREE_YEAR_SYSTEM"===e?s.push(...a):"FORE_YEAR_SYSTEM"===e?s.push(...o,...a):s.push(...n,...o,...a),s};e("default",n({name:"pre-register",setup(){const e=f(1e3,{controls:!0});e.pause();const n=o(),E=a(),T=w(),A=r({loading:!0,schoolId:E.query.id,code:null,showPicker:!1,classPicker:!1,gradeStatus:!1,classStatus:!1,gradePopupShow:!1,gradePopupIndex:[],classPopupShow:!1,classPopupIndex:[],gradeList:[],classList:[],schoolInstrumentSetType:null,nameReg:/^[\u4E00-\u9FA5]+$/,openId:"",id:null,videoBrowseData:null,videoBrowsePoint:null,username:"",currentGrade:"",currentClass:"",intervalFnRef:null,applyStatus:!1,isPageHide:!1,parentConferencesAgenda:""}),b=l(!1),R=l(""),B=e=>e?A.nameReg.test(e)?e.length<2||e.length>15?"学员姓名必须为2~15个字":void 0:"学员姓名必须为中文":"请填写学生真实姓名",G=function(){var s=t((function*(){try{var t;if(A.applyStatus)return void d("家长会调查问卷已结束");if(B(A.username))return void d(B(A.username));if(!A.currentGrade)return void d("请选择年级");if(!A.currentClass)return void d("请选择班级");null===(t=A.intervalFnRef)||void 0===t||t.pause(),e.pause(),yield i.post("/edu-app/open/studentBrowseRecord/updateStat",{data:{id:A.id,pageBrowseTime:e.counter.value,username:A.username,currentGrade:A.currentGrade,currentClass:A.currentClass?Number(A.currentClass):null}}),n.push({path:"/pre-register-video",query:{saveId:A.id,id:A.schoolId,openId:A.openId}})}catch(o){var s;null===(s=A.intervalFnRef)||void 0===s||s.resume(),e.resume()}}));return function(){return s.apply(this,arguments)}}(),N=(e,t)=>{let s="";return t.forEach((t=>{t.value==e&&(s=t.text)})),s},j=function(){var e=t((function*(e=10){try{yield i.post("/edu-app/open/studentBrowseRecord/updateStat",{data:{id:A.id,pageBrowseTime:e}})}catch(t){}}));return function(){return e.apply(this,arguments)}}();u(t((function*(){A.openId=T.onWeChatCatchOpenId("GET");try{var t,n;A.schoolId||d("信息获取失败,请联系老师");const{data:r}=yield i.get("/edu-app/open/schoolExtend/detail?id="+A.schoolId),l=r.schoolExtend;A.parentConferencesAgenda=l.parentConferencesAgenda,A.schoolInstrumentSetType=null===(t=r.school)||void 0===t?void 0:t.instrumentSetType;const u=(null===(n=r.school)||void 0===n?void 0:n.schoolInstrumentList)||[];if("SCHOOL"===A.schoolInstrumentSetType){var o,a;const e=null===(o=u[0])||void 0===o?void 0:o.instrumentCode;A.gradeList=L(null===(a=r.school)||void 0===a?void 0:a.gradeYear,e),A.classList=s}else if("GRADE"===A.schoolInstrumentSetType)u.forEach((e=>{A.gradeList.push({text:P[e.gradeNum],value:e.gradeNum,instrumentId:e.instrumentId,instrumentCode:e.instrumentCode})})),A.gradeList.sort(((e,t)=>e.value-t.value)),A.classList=s;else if("CLASS"===A.schoolInstrumentSetType){const e=[];u.forEach((t=>{e.includes(t.gradeNum)||e.push(t.gradeNum)}));const t=[];e.forEach((e=>{const s={text:P[e],value:e,instrumentId:"",instrumentCode:"",instrumentName:"",classList:[]};u.forEach((t=>{e===t.gradeNum&&(s.instrumentId=t.instrumentId,s.instrumentCode=t.instrumentCode,s.instrumentName=t.instrumentName,s.classList.push({text:t.classNum+"班",value:t.classNum,instrumentCode:t.instrumentCode}))})),s.classList.sort(((e,t)=>e.value-t.value)),t.push(s)})),t.sort(((e,t)=>e.value-t.value)),A.gradeList=t,A.classList=[]}else A.gradeList=L(r.school.gradeYear),A.classList=s;const c=(yield i.post("/edu-app/open/studentBrowseRecord/add",{data:{schoolId:A.schoolId,openId:A.openId}})).data;A.currentClass=c.currentClass,A.currentGrade=c.currentGrade,A.openId=c.openId,A.username=c.username,A.videoBrowseData=c.videoBrowseData,A.videoBrowsePoint=c.videoBrowsePoint,A.id=c.id,e.resume(),A.intervalFnRef=C((()=>{e.counter.value=0,e.resume(),j()}),1e4)}catch(r){}})));const V=()=>{console.log(A.isPageHide,"showInfo"),A.isPageHide&&window.location.reload()};window.addEventListener("pageshow",V);const Y=()=>{console.log(A.isPageHide,"showInfo"),A.isPageHide=!0};return window.addEventListener("pagehide",Y),c((()=>{window.removeEventListener("pageshow",V),window.removeEventListener("pagehide",Y)})),()=>p("div",{class:h["per-register-active"]},[p("img",{class:h.imgMan,src:g},null),p("div",{class:h.flowPath},[p("i",{class:h.flowPathTitle},null),p("div",{class:h.flowPathContent,innerHTML:A.parentConferencesAgenda},null)]),p("div",{class:h.signin},[p("i",{class:h.signinTitle},null),p(I,{class:h.cellGroup,border:!1},{default:()=>[p(y,{label:"学生姓名",required:!0,labelAlign:"top",placeholder:"请输入学生姓名",autocomplete:"off",modelValue:A.username,"onUpdate:modelValue":e=>A.username=e,border:!1},null),p(y,{label:"年级",required:!0,labelAlign:"top",placeholder:"请选择年级",rightIcon:A.gradeStatus?"arrow-up":"arrow-down",readonly:!0,border:!1,modelValue:N(A.currentGrade,A.gradeList),clickable:!1,onClick:()=>{A.gradePopupIndex=[A.currentGrade],A.gradeStatus=!0}},null),p(y,{label:"班级",required:!0,labelAlign:"top",placeholder:"请选择班级",rightIcon:A.classStatus?"arrow-up":"arrow-down",readonly:!0,border:!1,modelValue:N(A.currentClass,A.classList),clickable:!1,onClick:()=>{"CLASS"===A.schoolInstrumentSetType&&A.classList.length<=0?d("请先选择年级"):(A.classPopupIndex=[A.currentClass],A.classStatus=!0)}},null),p("div",{class:h.submitBtn,onClick:G},null)]})]),p(v,null,null),p(m,{show:A.gradeStatus,"onUpdate:show":e=>A.gradeStatus=e,position:"bottom",round:!0,safeAreaInsetBottom:!0,lazyRender:!1,class:"popupBottomSearch",onOpen:()=>{A.gradePopupShow=!0},onClosed:()=>{A.gradePopupShow=!1}},{default:()=>[A.gradePopupShow&&p(x,{showToolbar:!0,modelValue:A.gradePopupIndex,"onUpdate:modelValue":e=>A.gradePopupIndex=e,columns:A.gradeList,onCancel:()=>A.gradeStatus=!1,onConfirm:e=>{const t=e.selectedOptions[0];A.currentGrade=t.value,A.gradeStatus=!1,"CLASS"===A.schoolInstrumentSetType&&(A.classList=t.classList),["CLASS","GRADE"].includes(A.schoolInstrumentSetType)&&(A.currentClass="")}},null)]}),p(m,{show:A.classStatus,"onUpdate:show":e=>A.classStatus=e,position:"bottom",round:!0,class:"popupBottomSearch",onOpen:()=>{A.classPopupShow=!0},onClosed:()=>{A.classPopupShow=!1}},{default:()=>[A.classPopupShow&&p(x,{showToolbar:!0,modelValue:A.classPopupIndex,"onUpdate:modelValue":e=>A.classPopupIndex=e,columns:A.classList,onCancel:()=>A.classStatus=!1,onConfirm:({selectedValues:e})=>{A.currentClass=e[0],A.classStatus=!1}},null)]}),p(S,{show:b.value,title:"温馨提示",message:R.value,showCloseButton:!1,showConfirmButton:!1},null)])}}))}}}))}();
|