1 |
- !function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function t(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e,t,n,o,s,r,a){try{var l=e[r](a),u=l.value}catch(i){return void n(i)}l.done?t(u):Promise.resolve(u).then(o,s)}function o(e){return function(){var t=this,o=arguments;return new Promise((function(s,r){var a=e.apply(t,o);function l(e){n(a,s,r,l,u,"next",e)}function u(e){n(a,s,r,l,u,"throw",e)}l(void 0)}))}}System.register(["./index-legacy-5f8741ef.js","./three-man-legacy-4fb080c7.js","./index-legacy-516ae484.js","./index-legacy-05664b88.js","./index-legacy-a478a846.js","./index-legacy-f3466ba9.js","./index-legacy-ce9ea9ba.js","./index-legacy-c9322ea3.js","./Picker-legacy-94493745.js"],(function(n,s){"use strict";var r,a,l,u,i,d,c,p,m,g,h,v,f,w,S,y,I,C,P,b,x,L,E,j,O;return{setters:[e=>{r=e.d,a=e.q,l=e.P,u=e.x,i=e.r,d=e.y,c=e.N,p=e.D,m=e.V,g=e.b$,h=e.Z,v=e.Y,f=e.R,w=e.a,S=e.U,y=e.a0,I=e.c1},e=>{C=e.s,P=e.t},e=>{b=e.M},e=>{x=e.u,L=e.b},e=>{E=e.C},e=>{j=e.F},e=>{O=e.P},null,null],execute:function(){const s=[];for(let e=1;e<=40;e++)s.push({text:e+"班",value:e});const T={1:"一年级",2:"二年级",3:"三年级",4:"四年级",5:"五年级",6:"六年级",7:"七年级",8:"八年级",9:"九年级"},A=(e,t)=>{let n=[];const o=[{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}],s=[{text:"六年级",value:6,instrumentCode:t}],r=[{text:"七年级",value:7,instrumentCode:t},{text:"八年级",value:8,instrumentCode:t},{text:"九年级",value:9,instrumentCode:t}];return"FIVE_YEAR_SYSTEM"===e?n.push(...o):"SIX_YEAR_SYSTEM"===e?n.push(...o,...s):"THREE_YEAR_SYSTEM"===e?n.push(...r):"FORE_YEAR_SYSTEM"===e?n.push(...s,...r):n.push(...o,...s,...r),n};n("default",r({name:"pre-register",setup(){const n=x(1e3,{controls:!0});n.pause();const r=a(),R=l(),B=u({loading:!0,schoolId:R.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:""}),N=i(!1),G=i(""),V=e=>e?B.nameReg.test(e)?e.length<2||e.length>15?"学员姓名必须为2~15个字":void 0:"学员姓名必须为中文":"请填写学生真实姓名",Y=function(){var e=o((function*(){try{var e;if(B.applyStatus)return void c("家长会调查问卷已结束");if(V(B.username))return void c(V(B.username));if(!B.currentGrade)return void c("请选择年级");if(!B.currentClass)return void c("请选择班级");null===(e=B.intervalFnRef)||void 0===e||e.pause(),n.pause(),yield p.post("/edu-app/open/studentBrowseRecord/updateStat",{data:{id:B.id,pageBrowseTime:n.counter.value,username:B.username,currentGrade:B.currentGrade,currentClass:B.currentClass?Number(B.currentClass):null}}),r.push({path:"/pre-register-video",query:{saveId:B.id,id:B.schoolId,openId:B.openId}})}catch(o){var t;null===(t=B.intervalFnRef)||void 0===t||t.resume(),n.resume()}}));return function(){return e.apply(this,arguments)}}(),k=(e,t)=>{let n="";return t.forEach((t=>{t.value==e&&(n=t.text)})),n},D=function(){var e=o((function*(e=10){try{yield p.post("/edu-app/open/studentBrowseRecord/updateStat",{data:{id:B.id,pageBrowseTime:e}})}catch(t){}}));return function(){return e.apply(this,arguments)}}();d(o((function*(){try{var e,t;B.schoolId||c("信息获取失败,请联系老师");const{data:a}=yield p.get("/edu-app/open/schoolExtend/detail?id="+B.schoolId),l=a.schoolExtend;B.parentConferencesAgenda=l.parentConferencesAgenda,B.schoolInstrumentSetType=null===(e=a.school)||void 0===e?void 0:e.instrumentSetType;const u=(null===(t=a.school)||void 0===t?void 0:t.schoolInstrumentList)||[];if("SCHOOL"===B.schoolInstrumentSetType){var o,r;const e=null===(o=u[0])||void 0===o?void 0:o.instrumentCode;B.gradeList=A(null===(r=a.school)||void 0===r?void 0:r.gradeYear,e),B.classList=s}else if("GRADE"===B.schoolInstrumentSetType)u.forEach((e=>{B.gradeList.push({text:T[e.gradeNum],value:e.gradeNum,instrumentId:e.instrumentId,instrumentCode:e.instrumentCode})})),B.gradeList.sort(((e,t)=>e.value-t.value)),B.classList=s;else if("CLASS"===B.schoolInstrumentSetType){const e=[];u.forEach((t=>{e.includes(t.gradeNum)||e.push(t.gradeNum)}));const t=[];e.forEach((e=>{const n={text:T[e],value:e,instrumentId:"",instrumentCode:"",instrumentName:"",classList:[]};u.forEach((t=>{e===t.gradeNum&&(n.instrumentId=t.instrumentId,n.instrumentCode=t.instrumentCode,n.instrumentName=t.instrumentName,n.classList.push({text:t.classNum+"班",value:t.classNum,instrumentCode:t.instrumentCode}))})),n.classList.sort(((e,t)=>e.value-t.value)),t.push(n)})),t.sort(((e,t)=>e.value-t.value)),B.gradeList=t,B.classList=[]}else B.gradeList=A(a.school.gradeYear),B.classList=s;if(!B.code)return;const i=(yield p.post("/edu-app/open/studentBrowseRecord/add",{data:{schoolId:B.schoolId,code:B.code,openId:B.openId}})).data;B.currentClass=i.currentClass,B.currentGrade=i.currentGrade,B.openId=i.openId,B.username=i.username,B.videoBrowseData=i.videoBrowseData,B.videoBrowsePoint=i.videoBrowsePoint,B.id=i.id,sessionStorage.setItem("active-open-id",i.openId),sessionStorage.removeItem("isWxcode"),console.log(B,"forms"),n.resume(),B.intervalFnRef=L((()=>{n.counter.value=0,n.resume(),D()}),1e4)}catch(a){}})));const H=function(){var e=o((function*(e){try{const{data:t}=yield p.get("/edu-app/open/paramConfig/wechatAppId");t&&(sessionStorage.setItem("isWxcode","1"),y(),I(t,e))}catch(t){console.log(t)}}));return function(t){return e.apply(this,arguments)}}();if(m().weixin){const n=sessionStorage.getItem("active-open-id");B.openId=n;const o=g();console.log(o,"code");const s=sessionStorage.getItem("isWxcode");if(!o||"1"!==s){const n=h()+window.location.pathname+"#"+R.path+"?"+v.stringify(function(n){for(var o=1;o<arguments.length;o++){var s=null!=arguments[o]?arguments[o]:{};o%2?e(Object(s),!0).forEach((function(e){t(n,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):e(Object(s)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(s,e))}))}return n}({},R.query));return H(n),""}B.code=o}const q=()=>{console.log(B.isPageHide,"showInfo"),B.isPageHide&&window.location.reload()};window.addEventListener("pageshow",q);const F=()=>{console.log(B.isPageHide,"showInfo"),B.isPageHide=!0};return window.addEventListener("pagehide",F),f((()=>{window.removeEventListener("pageshow",q),window.removeEventListener("pagehide",F)})),()=>w("div",{class:C["per-register-active"]},[w("img",{class:C.imgMan,src:P},null),w("div",{class:C.flowPath},[w("i",{class:C.flowPathTitle},null),w("div",{class:C.flowPathContent,innerHTML:B.parentConferencesAgenda},null)]),w("div",{class:C.signin},[w("i",{class:C.signinTitle},null),w(E,{class:C.cellGroup,border:!1},{default:()=>[w(j,{label:"学生姓名",required:!0,labelAlign:"top",placeholder:"请输入学生姓名",autocomplete:"off",modelValue:B.username,"onUpdate:modelValue":e=>B.username=e,border:!1},null),w(j,{label:"年级",required:!0,labelAlign:"top",placeholder:"请选择年级",rightIcon:B.gradeStatus?"arrow-up":"arrow-down",readonly:!0,border:!1,modelValue:k(B.currentGrade,B.gradeList),clickable:!1,onClick:()=>{B.gradePopupIndex=[B.currentGrade],B.gradeStatus=!0}},null),w(j,{label:"班级",required:!0,labelAlign:"top",placeholder:"请选择班级",rightIcon:B.classStatus?"arrow-up":"arrow-down",readonly:!0,border:!1,modelValue:k(B.currentClass,B.classList),clickable:!1,onClick:()=>{"CLASS"===B.schoolInstrumentSetType&&B.classList.length<=0?c("请先选择年级"):(B.classPopupIndex=[B.currentClass],B.classStatus=!0)}},null),w("div",{class:C.submitBtn,onClick:Y},null)]})]),w(S,{show:B.gradeStatus,"onUpdate:show":e=>B.gradeStatus=e,position:"bottom",round:!0,safeAreaInsetBottom:!0,lazyRender:!1,class:"popupBottomSearch",onOpen:()=>{B.gradePopupShow=!0},onClosed:()=>{B.gradePopupShow=!1}},{default:()=>[B.gradePopupShow&&w(O,{showToolbar:!0,modelValue:B.gradePopupIndex,"onUpdate:modelValue":e=>B.gradePopupIndex=e,columns:B.gradeList,onCancel:()=>B.gradeStatus=!1,onConfirm:e=>{const t=e.selectedOptions[0];B.currentGrade=t.value,B.gradeStatus=!1,"CLASS"===B.schoolInstrumentSetType&&(B.classList=t.classList),["CLASS","GRADE"].includes(B.schoolInstrumentSetType)&&(B.currentClass="")}},null)]}),w(S,{show:B.classStatus,"onUpdate:show":e=>B.classStatus=e,position:"bottom",round:!0,class:"popupBottomSearch",onOpen:()=>{B.classPopupShow=!0},onClosed:()=>{B.classPopupShow=!1}},{default:()=>[B.classPopupShow&&w(O,{showToolbar:!0,modelValue:B.classPopupIndex,"onUpdate:modelValue":e=>B.classPopupIndex=e,columns:B.classList,onCancel:()=>B.classStatus=!1,onConfirm:({selectedValues:e})=>{B.currentClass=e[0],B.classStatus=!1}},null)]}),w(b,{show:N.value,title:"温馨提示",message:G.value,showCloseButton:!1,showConfirmButton:!1},null)])}}))}}}))}();
|