1 |
- !function(){function e(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function n(e,t,n,r,a,i,s){try{var o=e[i](s),u=o.value}catch(c){return void n(c)}o.done?t(u):Promise.resolve(u).then(r,a)}function r(e){return function(){var t=this,r=arguments;return new Promise((function(a,i){var s=e.apply(t,r);function o(e){n(s,a,i,o,u,"next",e)}function u(e){n(s,a,i,o,u,"throw",e)}o(void 0)}))}}var a=document.createElement("style");a.innerHTML="._roomHeader_13gb6_1{background:url(./assets/room_bg.498828a6.png) top center no-repeat;background-size:100%;overflow:hidden}._roomHeader_13gb6_1 .van-row{align-items:center}._countTimer_13gb6_9{padding:.85333rem .64rem .58667rem}._countTimer_13gb6_9 ._timer_13gb6_12{padding-left:.05333rem;font-size:.69333rem;font-weight:600;color:#333;padding-bottom:.26667rem}._countTimer_13gb6_9 ._timer_13gb6_12 span{color:#666;font-size:.37333rem}._countTimer_13gb6_9 ._title_13gb6_23{display:flex;align-items:center;font-size:.32rem;color:#333;line-height:.45333rem}._countTimer_13gb6_9 ._title_13gb6_23 img{width:.4rem;height:.4rem;margin-right:.13333rem}._chargeTimer_13gb6_35 .van-button__text{display:flex;align-items:center;font-weight:600}._chargeTimer_13gb6_35 .van-button__text img{margin-left:.05333rem;width:.26667rem;height:.26667rem}._studentList_13gb6_45{margin:0 .37333rem .4rem;background:#ffffff;border-radius:.26667rem;overflow:hidden}._studentCount_13gb6_51{font-size:.37333rem;font-weight:500;color:#333}._btnGroupInvite_13gb6_56{display:flex;align-items:center;justify-content:space-between;padding-bottom:.10667rem}._btnGroupInvite_13gb6_56 .van-button{width:48%;font-size:.37333rem;font-weight:500;color:#333!important}._btnGroupInvite_13gb6_56 .van-button img{margin-right:.21333rem;width:.53333rem;height:.53333rem}._btnGroupInvite_13gb6_56 .van-button__text{display:flex;align-items:center}._searchList_13gb6_77{display:flex;padding:.32rem .42667rem;background-color:#fff}._dataItem_13gb6_82{font-size:.37333rem;color:#333;padding-right:.64rem}._shareSection_115rh_1{width:8.13333rem;padding:.37333rem;background:url(./assets/share_bg.252c9956.png) center no-repeat #2dc7aa;background-size:cover;overflow:hidden}._shareSection_115rh_1 ._img_115rh_8{width:1.44rem;height:1.44rem;border-radius:50%;margin-right:.32rem}._shareSection_115rh_1 ._name_115rh_14{font-size:.48rem;font-weight:500;color:#1a1a1a;line-height:.48rem;max-width:3.46667rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._shareSection_115rh_1 ._titleTips_115rh_24{padding-top:.13333rem;font-size:.37333rem;color:#8a8a8a;line-height:.48rem}._section_115rh_30{background:#ffffff;border-radius:.29333rem;overflow:hidden;padding:.37333rem .42667rem .53333rem}._txt_115rh_36{font-size:.42667rem;color:#333;line-height:1.5}._txt_115rh_36 span{font-size:.48rem;font-weight:500;color:#2dc7aa}._teacherName_115rh_46{padding-top:.53333rem}._download_115rh_49{margin-top:.26667rem;display:flex;align-items:center;justify-content:space-between}._download_115rh_49 ._logo_115rh_55{font-size:.34667rem;color:#349784;line-height:.48rem}._download_115rh_49 ._logo_115rh_55 img{width:2.48rem;vertical-align:middle;margin-bottom:.29333rem}._download_115rh_49 ._qrcode_115rh_65{position:relative;width:2.02667rem;height:2.02667rem}._download_115rh_49 ._qrcode_115rh_65 ._qrcodeCanvas_115rh_70{width:100%!important;height:100%!important}._download_115rh_49 ._qrcode_115rh_65 ._qrcodeLogo_115rh_74{position:absolute;top:50%;left:50%;margin-left:-.21333rem;margin-top:-.21333rem;width:.42667rem;height:.42667rem;border-radius:.10667rem}._continue_115rh_84{position:absolute;right:.66667rem;top:.53333rem;z-index:2;background:rgba(0,0,0,.23);border-radius:.50667rem;font-size:.37333rem;color:#fff;background:linear-gradient(0deg,#2dc7aa 0%,#32e8c6 100%);padding:.16rem .48rem}._label_v8pn1_1{margin-right:.21333rem;font-size:.37333rem}._label_v8pn1_1 .van-list__loading,._label_v8pn1_1 .van-list__finished-text,._label_v8pn1_1 .van-list__error-text{width:100%}._label_v8pn1_1 .iconfont-down{margin-left:.10667rem}._studentList_v8pn1_13{height:55vh;overflow:auto}._studentList_v8pn1_13 .van-checkbox{justify-content:flex-end}._btnGroup_v8pn1_20{padding:0 .53333rem .37333rem}._confirmTitle_yqlm2_1{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem;padding:.58667rem .58667rem .32rem}._confirmTitle_yqlm2_1 ._timer_yqlm2_8{color:#2dc7aa}._addTitle_yqlm2_11,._calc_yqlm2_12{font-size:.42667rem;color:#666;line-height:.58667rem;padding:.32rem .58667rem 0}._addTitle_yqlm2_11 span,._calc_yqlm2_12 span{color:var(--van-primary)}._addTitle_yqlm2_11 .student,._calc_yqlm2_12 .student{margin:0}._studentList_yqlm2_26{max-height:45vh;overflow:auto}._btnGroup_yqlm2_30{padding:.37333rem .53333rem}\n",document.head.appendChild(a),System.register(["./title_timers-legacy.563f8ecd.js","./icon_name_active-legacy.98cddefe.js","./icon_tips-legacy.1911ff27.js","./ResizeObserver.es-legacy.8d60aee1.js","./index-legacy.87bcd48f.js","./index-legacy.f8f0c467.js","./index-legacy.fd89cccf.js","./index-legacy.610f0a70.js","./index-legacy.c07bb851.js","./index-legacy.e25b6312.js","./index-legacy.fb4c992e.js","./index-legacy.afebcffe.js","./browser-legacy.2ab737c2.js","./html2canvas.esm-legacy.19f9c2b7.js","./icon_teacher-legacy.42ba77b1.js","./index-legacy.897f3849.js","./organ-search-legacy.8734fb40.js","./index-legacy.5e551733.js","./index-legacy.4e5c868b.js","./index-legacy.2c804b14.js","./index-legacy.bbc2b10e.js","./index-legacy.28c9b5a3.js","./use-tab-status-legacy.1f35f332.js","./icon_timer2-legacy.b6c78faa.js","./index-legacy.ce3d9289.js","./index-legacy.78ce4f6b.js","./use-id-legacy.54528695.js","./index-legacy.a85d660d.js","./index-legacy.6a5df59c.js","./icon_student-legacy.49eef9e9.js","./utils-legacy.52f341ca.js","./index-legacy.8b0998bf.js"],(function(t){"use strict";var n,a,i,s,o,u,c,d,l,m,f,h,p,g,_,b,v,S,y,w,x,C,T,I,k,j,L,R,N,U,q,z,Y,A,O,D,M,G,H,E,V,P,$,B,F,Q,J,K,W,X,Z,ee,te,ne,re,ae;return{setters:[function(e){n=e.l,a=e._,i=e.a,s=e.b,o=e.c,u=e.d,c=e.e,d=e.f,l=e.g,m=e.h,f=e.i,h=e.j,p=e.k,g=e.m,_=e.n,b=e.o,v=e.p},function(e){S=e._,y=e.a,w=e.b},function(e){x=e._},function(e){C=e.d,T=e.y,I=e.n,k=e.T,j=e.j,L=e.A,R=e.g,N=e.F,U=e.N,q=e.C,z=e.aS,Y=e.B,A=e.$,O=e.w,D=e.D,M=e.b8},function(e){G=e.C},function(e){H=e.R,E=e.C},function(e){V=e.C},function(e){P=e.C},function(e){$=e.L},function(){},function(e){B=e.A},function(e){F=e.C},function(e){Q=e.b,J=e.i},function(e){K=e.h},function(e){W=e.i},function(e){X=e.S},function(e){Z=e.O},function(e){ee=e.C},function(){},function(e){te=e.S},function(e){ne=e.a,re=e.b},function(e){ae=e.D},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var ie={roomHeader:"_roomHeader_13gb6_1",countTimer:"_countTimer_13gb6_9",timer:"_timer_13gb6_12",title:"_title_13gb6_23",chargeTimer:"_chargeTimer_13gb6_35",studentList:"_studentList_13gb6_45",studentCount:"_studentCount_13gb6_51",btnGroupInvite:"_btnGroupInvite_13gb6_56",searchList:"_searchList_13gb6_77",dataItem:"_dataItem_13gb6_82"},se="_shareSection_115rh_1",oe="_img_115rh_8",ue="_name_115rh_14",ce="_titleTips_115rh_24",de="_section_115rh_30",le="_txt_115rh_36",me="_teacherName_115rh_46",fe="_download_115rh_49",he="_logo_115rh_55",pe="_qrcode_115rh_65",ge="_qrcodeCanvas_115rh_70",_e="_qrcodeLogo_115rh_74",be="_continue_115rh_84",ve=C({name:"share",props:{teacherId:{type:Number}},data:function(){return{qrCode:"",copyQrCode:"",image:null}},mounted:function(){var e=this;return r(regeneratorRuntime.mark((function t(){var n,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e.qrCode=location.origin+"/student/#/inviteTeacher?id="+e.teacherId,t.next=4,T.post("/api-teacher/sysConfig/shortURL",{requestType:"form",data:{orginURL:e.qrCode}});case 4:n=t.sent,e.copyQrCode=n.data,t.next=10;break;case 8:t.prev=8,t.t0=t.catch(0);case 10:a=document.getElementById("canvas"),Q.toCanvas(a,e.qrCode,{margin:1},(function(e){e&&console.log(e),console.log("success")})),e.$nextTick(r(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=document.getElementById("share-preview-container"),K(n,{allowTaint:!0,useCORS:!0}).then((function(t){var n=t.toDataURL("image/png");e.image=n}));case 2:case"end":return t.stop()}}),t)}))));case 13:case"end":return t.stop()}}),t,null,[[0,8]])})))()},methods:{shareShow:function(){var e=this;return r(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(n=e.image)&&I({api:"shareAchievements",content:{title:"我在酷乐秀使用小酷Ai练习乐器",desc:"酷乐秀小酷Ai帮助我自主练习乐器,真的太好用啦!每天都要坚持练习哦~",image:n,video:"",type:"image",button:["copy"],url:e.copyQrCode}},(function(e){e&&e.content&&k(e.content.message||(e.content.status?"分享成功":"分享失败"))}));case 2:case"end":return t.stop()}}),t)})))()}},render:function(){var e=this;return j(N,null,[j("div",{class:be,onClick:function(){e.shareShow()}},[L("分享")]),j("div",{class:se,id:"share-preview-container"},[j("div",{class:de},[j(P,{center:!0,border:!1,style:{padding:0}},{icon:function(){return j("img",{src:R.user.data.heardUrl?R.user.data.heardUrl+"?time="+(new Date).valueOf():W,class:oe,crossorigin:"anonymous"},null)},title:function(){return j("div",null,[j("p",{class:ue},[R.user.data.username]),j("p",{class:ce},[L("酷乐秀入驻老师")])])}}),j("p",{class:[le,me]},[j("span",null,[R.user.data.username]),L("邀请您加入酷乐秀")]),j("p",{class:le},[L("来与我一起踏入音乐殿堂吧!")])]),j("div",{class:[de,fe]},[j("div",{class:he},[j("img",{src:n},null),j("p",null,[L("扫码下载酷乐秀开启学习之旅")])]),j("div",{class:pe},[j("canvas",{id:"canvas",class:ge},null),j("img",{src:J,class:_e},null)])])])])}}),Se="_label_v8pn1_1",ye="_studentList_v8pn1_13",we="_btnGroup_v8pn1_20";var xe=C({name:"myStudent",props:{courseId:Number,onSubmit:{type:Function,default:function(e){}}},data:function(){return{searchStatus:!1,openStatus:!1,subjectList:[],list:[],dataShow:!0,loading:!1,finished:!1,params:{userName:"",subjectName:"全部声部",subjectId:null,page:1,rows:20},interfaceIds:[],userIdList:[]}},mounted:function(){var e=this;return r(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,T.get("/api-teacher/subject/subjectSelect");case 3:n=t.sent,e.subjectList=n.data||[],t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.next=11,e.getExistList();case 11:return t.next=13,e.getList();case 13:case"end":return t.stop()}}),t,null,[[0,7]])})))()},methods:{onSort:function(){this.params.page=1,this.list=[],this.dataShow=!0,this.loading=!1,this.finished=!1,this.searchStatus=!1,this.getList()},onSearch:function(e){this.params.userName=e,this.onSort()},getExistList:function(){var t=this;return r(regeneratorRuntime.mark((function n(){var r,a,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,T.post("/api-teacher/courseSchedule/selectStudent",{data:{courseId:t.courseId,page:1,rows:20}});case 3:r=n.sent,a=r.data.rows||[],i=a.map((function(e){return e.userId})),t.interfaceIds=e(i),t.userIdList=e(i),n.next=12;break;case 10:n.prev=10,n.t0=n.catch(0);case 12:case"end":return n.stop()}}),n,null,[[0,10]])})))()},getList:function(){var e=this;return r(regeneratorRuntime.mark((function t(){var n,r,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,T.post("/api-teacher/courseSchedule/selectStudent",{data:e.params});case 3:if(n=t.sent,e.loading=!1,r=n.data||{},!(e.list.length>0&&1===r.pageNo)){t.next=8;break}return t.abrupt("return");case 8:(a=r.rows||[]).forEach((function(t){e.userIdList.includes(t.userId)?t.checked=!0:t.checked=!1})),e.list=e.list.concat(a||[]),e.finished=r.pageNo>=r.totalPage,e.params.page=r.pageNo+1,e.dataShow=e.list.length>0,t.next=20;break;case 16:t.prev=16,t.t0=t.catch(0),e.dataShow=!1,e.finished=!0;case 20:case"end":return t.stop()}}),t,null,[[0,16]])})))()},equar:function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},nextSubmit:function(){var e=this;if(this.userIdList.length<=0)return k("请至少选择一个学员");if(this.equar(this.interfaceIds,this.userIdList))return k("您未调整学员");var t=this.userIdList.filter((function(t){return!e.interfaceIds.includes(t)&&t})),n=this.interfaceIds.filter((function(t){return!e.userIdList.includes(t)&&t}));console.log(t,n);var r=[],a=[];this.list.forEach((function(e){t.includes(e.userId)&&r.push(e),n.includes(e.userId)&&a.push(e)})),console.log(r,a),this.onSubmit({addStudents:r,removeStudents:a,userIdList:this.userIdList})},onCheckbox:function(e){if(!e.checked&&this.userIdList.length>=7)return k("学生已达上限");e.checked=!e.checked;var t=this.userIdList.includes(e.userId);e.checked?!t&&this.userIdList.push(e.userId):t&&this.userIdList.splice(this.userIdList.indexOf(e.userId),1)}},render:function(){var e,t,n=this;return j(N,null,[j(X,{placeholder:"请输入学员名称",onSearch:this.onSearch},{left:function(){return j("div",{class:Se,onClick:function(){n.searchStatus=!n.searchStatus,n.openStatus=!n.openStatus}},[n.params.subjectName,j(U,{classPrefix:"iconfont",name:"down",size:12,color:"#333"},null)])}}),j("div",{class:ye},[this.dataShow?j($,{loading:this.loading,"onUpdate:loading":function(e){return n.loading=e},finished:this.finished,finishedText:" ",class:["mb12"],immediateCheck:!1,onLoad:this.getList},(t=e=this.list.map((function(e){return j(te,{item:{userName:e.userName,subjectName:e.subjectName,avatar:e.avatar},onClick:function(){n.onCheckbox(e)}},{default:function(){return[j(ee,{modelValue:e.checked,"onUpdate:modelValue":function(t){return e.checked=t},name:e.userId,onClick:function(){n.onCheckbox(e)}},null)]}})})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)?e:{default:function(){return[e]}})):j(q,{btnStatus:!1,classImgSize:"SMALL",tips:"暂无学员"},null)]),j(z,{show:this.searchStatus,position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0,onClose:function(){return n.searchStatus=!1},onClosed:function(){return n.openStatus=!1}},{default:function(){return[n.openStatus&&j(Z,{subjectList:n.subjectList,onSort:n.onSort,isReset:!0,modelValue:n.params.subjectId,"onUpdate:modelValue":function(e){return n.params.subjectId=e},subjectName:n.params.subjectName,"onUpdate:subjectName":function(e){return n.params.subjectName=e}},null)]}}),j("div",{class:we},[j(Y,{type:"primary",round:!0,block:!0,onClick:this.nextSubmit},{default:function(){return[L("下一步")]}})])])}}),Ce={confirmTitle:"_confirmTitle_yqlm2_1",timer:"_timer_yqlm2_8",addTitle:"_addTitle_yqlm2_11",calc:"_calc_yqlm2_12",studentList:"_studentList_yqlm2_26",btnGroup:"_btnGroup_yqlm2_30"},Te=C({name:"studentConfirm",props:{courseInfo:{type:Object,default:{}},studentObject:{type:Object,default:{}},onSubmit:{type:Function,default:function(e){}}},computed:{timer:function(){var e=this.courseInfo;return O(e.startTime).format("YYYY/MM/DD HH:mm")+" ~ "+O(e.endTime).format("HH:mm")},addStudents:function(){var e=this.studentObject.addStudents;return e||[]},removeStudents:function(){var e=this.studentObject.removeStudents;return e||[]},calcTimer:function(){var e=this.studentObject,t=e.addStudents,n=e.removeStudents,r=this.courseInfo,a=r.singleCourseTime,i=r.studentCount,s=t.length-n.length;console.log(s,a,this.courseInfo);var o=s>=0?"add":"remove";console.log(t,n,"addStudents",s,o,i);var u=i*a,c=Math.abs(Math.abs(s+i)*a);return{type:o,mins:Math.abs(u-c)}}},render:function(){var e=this;return j("div",{class:Ce.studentConfirm},[j("div",{class:[Ce.confirmTitle,"van-hairline--bottom"]},[j("p",null,[L("您将为"),this.courseInfo.groupName]),j("p",{class:Ce.timer},[this.timer])]),j("div",{class:Ce.studentList},[this.addStudents.length>0&&j(N,null,[j("p",{class:Ce.addTitle},[L("添加学员 "),j("span",null,[this.addStudents.length]),L(" 名")]),this.addStudents.map((function(e){return j(te,{border:!1,item:e},null)}))]),this.removeStudents.length>0&&j(N,null,[j("p",{class:Ce.addTitle},[L("移除学员 "),j("span",null,[this.removeStudents.length]),L(" 名")]),this.removeStudents.map((function(e){return j(te,{border:!1,item:e},null)}))])]),j("p",{class:Ce.calc},[L("调整后将"),"remove"===this.calcTimer.type?"释放":"冻结"," ",j("span",null,[this.calcTimer.mins]),L(" 分钟")]),j("div",{class:Ce.btnGroup},[j(Y,{type:"primary",round:!0,block:!0,onClick:function(){var t=e.studentObject.userIdList;e.onSubmit(t)}},{default:function(){return[L("确认调整")]}})])])}});var Ie=t("getAssetsHomeFile",(function(e){var t="./images/".concat(e);return{"./images/icon_arrow.png":a,"./images/icon_class_plan.png":i,"./images/icon_education.png":S,"./images/icon_education_active.png":y,"./images/icon_freeze_timer.png":s,"./images/icon_invite_student.png":o,"./images/icon_last_timer.png":u,"./images/icon_message.png":c,"./images/icon_music_account.png":d,"./images/icon_name_active.png":w,"./images/icon_num.png":l,"./images/icon_timers.png":m,"./images/icon_tips.png":x,"./images/logo.png":f,"./images/paino_bg.png":h,"./images/room_bg.png":p,"./images/select_timers.png":g,"./images/select_timers_bg.png":_,"./images/share_bg.png":b,"./images/title_timers.png":v}[t].default}));t("default",C({name:"PianoRoom",data:function(){return{shareStatus:!1,teacherId:0,typeStatus:!1,courseTxt:"所有课程",actions:[{name:"所有课程"},{name:"未开始",status:"NOT_START"},{name:"进行中",status:"ING"},{name:"已完成",status:"COMPLETE"},{name:"已取消",status:"CANCEL"}],remain:{frozenTime:0,remainTime:0,studentCount:0},list:[],dataShow:!0,loading:!1,finished:!1,monthTxt:O().format("YYYY年MM月"),month:new Date,params:{status:"",month:O().format("YYYY-MM"),page:1,rows:20},timeShow:!1,timeUpdateStatus:!1,timeUpdateInfo:{},timeUpdateTimer:new Date,studentStatus:!1,studentConfirm:!1,studentChangeObject:{},background:"transparent",setLoading:!1,startClassTime:"",endClassTime:"",minDate:new Date,checked:!0}},mounted:function(){var e=this;return r(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e._init();case 2:return t.next=4,e.getBaseData();case 4:return t.next=6,e.getList();case 6:ne(document,"scroll",(function(t){re().y.value>45?e.background="#fff":e.background="transparent"}));case 7:case"end":return t.stop()}}),t)})))()},methods:{_init:function(){var e=this;return r(regeneratorRuntime.mark((function t(){var n,r,a,i,s,o,u;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,T.post("/api-teacher/open/appVersion",{data:{platform:"STUDENT"===R.platformType?"ios-student":"ios-teacher",version:R.version}});case 3:return n=t.sent,e.checked=!!n.data.check,t.next=7,T.get("/api-teacher/courseSchedule/selectRemainTime");case 7:r=t.sent,a=r.data||{},i=a.frozenTime,s=a.remainTime,o=a.studentCount,u=a.teacherId,e.remain={frozenTime:i||0,remainTime:s||0,studentCount:o||0},e.teacherId=u,t.next=15;break;case 13:t.prev=13,t.t0=t.catch(0);case 15:case"end":return t.stop()}}),t,null,[[0,13]])})))()},getBaseData:function(){var e=this;return r(regeneratorRuntime.mark((function t(){var n,r,a,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,T.get("/api-teacher/sysConfig/queryByParamNameList",{params:{paramNames:"course_start_setting,course_end_setting"}});case 3:for(n=t.sent,r=n.data,a=0,i=r.length;a<i;a++)"course_start_setting"===r[a].paramName&&(e.startClassTime=r[a].paramValue?r[a].paramValue.split(":"):[]),"course_end_setting"===r[a].paramName&&(e.endClassTime=r[a].paramValue?r[a].paramValue.split(":"):[]);console.log(e.startClassTime,e.endClassTime),t.next=11;break;case 9:t.prev=9,t.t0=t.catch(0);case 11:case"end":return t.stop()}}),t,null,[[0,9]])})))()},onSearch:function(){this.dataShow=!0,this.loading=!1,this.finished=!1,this.list=[],this.params.page=1,this.getList()},onSelect:function(e){this.courseTxt=e.name,this.params.status=e.status||"",this._init(),this.onSearch()},getList:function(){var e=this;return r(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!e.setLoading){t.next=3;break}return t.abrupt("return");case 3:return e.setLoading=!0,t.next=6,T.post("/api-teacher/courseSchedule/selectCourseList",{data:e.params});case 6:if(n=t.sent,e.setLoading=!1,e.loading=!1,r=n.data||{},!(e.list.length>0&&1===r.pageNo)){t.next=12;break}return t.abrupt("return");case 12:e.list=e.list.concat(r.rows||[]),e.finished=r.pageNo>=r.totalPage,e.params.page=r.pageNo+1,e.dataShow=e.list.length>0,t.next=22;break;case 18:t.prev=18,t.t0=t.catch(0),e.dataShow=!1,e.finished=!0;case 22:case"end":return t.stop()}}),t,null,[[0,18]])})))()},onCourseDelete:function(e){var t=this;return r(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:try{D.confirm({title:"提示",message:"确定删除该课程吗?",confirmButtonColor:"var(--van-primary)"}).then(r(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,T.post("/api-teacher/courseSchedule/deleteCourse",{data:{courseId:e.courseId}});case 2:console.log("删除成功"),k("课程删除成功"),t._init(),t.onSearch();case 6:case"end":return n.stop()}}),n)}))))}catch(a){}case 1:case"end":return n.stop()}}),n)})))()},onTimeUpdateChange:function(e){var t=this;try{D.confirm({title:"提示",message:"确定调整该课程吗?",confirmButtonColor:"var(--van-primary)"}).then(r(regeneratorRuntime.mark((function n(){var r,a,i,s,o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=t.timeUpdateInfo,a=r.courseId,i=r.singleCourseTime,s=O(e).format("YYYY-MM-DD HH:mm:ss"),o=O(e).add(i,"minute").format("YYYY-MM-DD HH:mm:ss"),n.next=5,T.post("/api-teacher/courseSchedule/updateCourseTime",{data:{courseId:a,startTime:s,endTime:o}});case 5:t.timeUpdateStatus=!1,k("课程调整成功"),t.onSearch();case 8:case"end":return n.stop()}}),n)}))))}catch(n){}},onStudentChange:function(e){var t=this;return r(regeneratorRuntime.mark((function n(){var a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,a=t.timeUpdateInfo.courseId,n.next=4,T.post("/api-teacher/courseSchedule/updateCourseStudent",{data:{studentIds:e,courseId:a}});case 4:t.studentConfirm=!1,k("学生调整成功"),setTimeout(r(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t._init();case 2:t.onSearch();case 3:case"end":return e.stop()}}),e)}))),1e3),n.next=11;break;case 9:n.prev=9,n.t0=n.catch(0);case 11:case"end":return n.stop()}}),n,null,[[0,9]])})))()},onTeacherAuth:function(e){var t=R.user.data;"PASS"===t.entryStatus?e&&e():"DOING"===t.entryStatus?k("认证审核中,请稍后再试"):this.$router.push("/teacherCert")},filterDate:function(e,t){var n=this,r=0;if(this.$refs.datetime){var a,i=this.$refs.datetime.getPicker();r=(null===(a=i.getValues()[3])||void 0===a?void 0:a.split("时")[0])||0}return"hour"==e?t.filter((function(e){return Number(n.startClassTime[0])<=Number(e)&&Number(n.endClassTime[0])>=Number(e)})):"minute"===e?t.filter((function(e){return Number(n.startClassTime[1])<=Number(e)&&Number(n.endClassTime[1])>=Number(e)||r!=Number(n.endClassTime[0])})):t}},render:function(){var e,t,n=this;return j(N,null,[j("div",{class:ie.roomHeader},[j(G,{background:this.background,rightText:"课程记录",onClickRight:function(){n.$router.push("/courseRecord")},border:!1},null),j(H,{class:ie.countTimer},{default:function(){return[j(E,{span:9},{default:function(){return[j("p",{class:ie.timer},[n.remain.remainTime,j("span",null,[L("分钟")])]),j("p",{class:ie.title},[j("img",{src:Ie("icon_last_timer.png")},null),j("span",null,[L("琴房剩余时长")])])]}}),j(E,{span:9},{default:function(){return[j("p",{class:ie.timer},[n.remain.frozenTime,j("span",null,[L("分钟")])]),j("p",{class:ie.title},[j("img",{src:Ie("icon_freeze_timer.png")},null),j("span",null,[L("冻结时长")])])]}}),j(E,{span:6},{default:function(){return[!n.checked&&j(Y,{type:"primary",round:!0,size:"small",class:ie.chargeTimer,onClick:function(){n.onTeacherAuth((function(){n.$router.push({path:"/accountRechargeTimer"})}))}},{default:function(){return[L("时长充值"),j("img",{src:Ie("icon_arrow.png")},null)]}})]}})]}}),j(V,{class:ie.studentList,border:!1},{default:function(){return[j(P,{title:"我的学员 ".concat(n.remain.studentCount," 人"),titleClass:ie.studentCount,isLink:!0,to:"/myStudent",border:!1},null),j(P,{valueClass:ie.btnGroupInvite},{default:function(){return[j(Y,{color:"#E0F7F3",round:!0,block:!0,onClick:function(){n.onTeacherAuth((function(){n.shareStatus=!0}))}},{default:function(){return[j("img",{src:Ie("icon_invite_student.png")},null),L("邀请学员")]}}),j(Y,{color:"#E0F7F3",round:!0,block:!0,onClick:function(){n.onTeacherAuth((function(){n.$router.push("/classArrangement")}))}},{default:function(){return[j("img",{src:Ie("icon_class_plan.png")},null),L("排课")]}})]}})]}})]),j("div",{class:ie.searchList},[j("div",{class:ie.dataItem,onClick:function(){n.timeShow=!0}},[this.monthTxt,j(U,{classPrefix:"iconfont",name:"down",size:8,style:{marginLeft:"4px"},color:"#CCCCCC"},null)]),j("div",{class:ie.dataItem,onClick:function(){n.typeStatus=!0}},[this.courseTxt,j(U,{classPrefix:"iconfont",name:"down",size:8,style:{marginLeft:"4px"},color:"#CCCCCC"},null)])]),this.dataShow?j($,{loading:this.loading,"onUpdate:loading":function(e){return n.loading=e},finished:this.finished,finishedText:" ",class:[ie.liveList,"mb12"],immediateCheck:!1,onLoad:this.getList},(t=e=this.list.map((function(e){return j(F,{item:e,operation:"NOT_START"===e.status,onCourseDelete:n.onCourseDelete,onStudentAdjust:function(e){n.timeUpdateInfo=e,n.studentStatus=!0},onTimeAdjust:function(e){n.timeUpdateInfo=e,n.timeUpdateTimer=O(e.startTime).toDate(),n.timeUpdateStatus=!0}},null)})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)?e:{default:function(){return[e]}})):j(q,{btnStatus:!1,classImgSize:"SMALL",tips:"暂无课程"},null),j(z,{position:"bottom",show:this.timeShow,"onUpdate:show":function(e){return n.timeShow=e},round:!0},{default:function(){return[j("div",{class:ie.picker},[j(ae,{modelValue:n.month,"onUpdate:modelValue":function(e){return n.month=e},type:"year-month",formatter:M,onConfirm:function(e){n.monthTxt=O(e).format("YYYY年MM月"),n.params.month=O(e).format("YYYY-MM"),n.timeShow=!1,n.onSearch()},onCancel:function(){return n.timeShow=!1}},null)])]}}),j(z,{position:"bottom",show:this.timeUpdateStatus,"onUpdate:show":function(e){return n.timeUpdateStatus=e},round:!0},{default:function(){return[j("div",{class:ie.picker},[j(ae,{modelValue:n.timeUpdateTimer,"onUpdate:modelValue":function(e){return n.timeUpdateTimer=e},type:"datetime",minDate:n.minDate,formatter:M,filter:n.filterDate,ref:"datetime",onConfirm:function(e){n.onTimeUpdateChange(e)},onCancel:function(){return n.timeUpdateStatus=!1}},null)])]}}),j(B,{show:this.typeStatus,"onUpdate:show":function(e){return n.typeStatus=e},actions:this.actions,closeOnClickAction:!0,cancelText:"取消",onSelect:this.onSelect,onCancel:function(){n.typeStatus=!1}},null),j(z,{show:this.shareStatus,"onUpdate:show":function(e){return n.shareStatus=e},round:!0},{default:function(){return[j(ve,{teacherId:n.teacherId},null)]}}),j(z,{show:this.studentStatus,"onUpdate:show":function(e){return n.studentStatus=e},position:"bottom",round:!0},{default:function(){return[n.studentStatus&&j(xe,{courseId:n.timeUpdateInfo.courseId,onSubmit:function(e){n.studentChangeObject=e,n.studentStatus=!1,n.studentConfirm=!0}},null)]}}),j(z,{show:this.studentConfirm,"onUpdate:show":function(e){return n.studentConfirm=e},position:"bottom",round:!0,closeable:!0},{default:function(){return[j(Te,{courseInfo:n.timeUpdateInfo,studentObject:n.studentChangeObject,onSubmit:(e=r(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.onStudentChange(t);case 2:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)})},null)];var e}})])}}))}}}))}();
|