index-legacy.6cc2dcfa.js 6.0 KB

1
  1. !function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r<arguments.length;r++){var s=null!=arguments[r]?arguments[r]:{};r%2?e(Object(s),!0).forEach((function(e){n(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):e(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t,n,r,s,a,o){try{var c=e[a](o),i=c.value}catch(l){return void n(l)}c.done?t(i):Promise.resolve(i).then(r,s)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(s,a){var o=e.apply(t,n);function c(e){r(o,s,a,c,i,"next",e)}function i(e){r(o,s,a,c,i,"throw",e)}c(void 0)}))}}var a=document.createElement("style");a.innerHTML="._cellGroup_1fnws_1{margin:.32rem .34667rem}._cellGroup_1fnws_1 .van-cell{padding:.32rem .4rem}._cellGroup_1fnws_1 ._classType_1fnws_7{display:flex;align-items:center;font-size:.42667rem;font-weight:600;color:#333;line-height:.58667rem}._cellGroup_1fnws_1 ._classType_1fnws_7 ._classNum_1fnws_15{margin-left:.16rem}._cellGroup_1fnws_1 ._classTime_1fnws_18{font-size:.37333rem;font-weight:500;color:#333;line-height:.53333rem}._cellGroup_1fnws_1 ._orchestra_1fnws_24{font-size:.37333rem;color:#333}._cellGroup_1fnws_1 ._orchestra_1fnws_24 ._name_1fnws_28{color:#777;line-height:.53333rem;padding-bottom:.08rem;font-weight:400}._cellGroup_1fnws_1 ._orchestra_1fnws_24 span{padding:0 .13333rem;font-size:.53333rem;color:#f67146}\n",document.head.appendChild(a),System.register(["./index-legacy.ea1cf20b.js","./index-legacy.a9944503.js","./index-legacy.81fd4e6f.js","./index-legacy.00d82922.js","./index-legacy.5ee1edf1.js","./create-legacy.1c633555.js","./index-legacy.75e78f7b.js","./index-legacy.16d013c6.js","./index-legacy.c74636d9.js","./index-legacy.819d05e3.js"],(function(e){"use strict";var n,r,a,o,c,i,l,u,f,p,d,m,_,g,h,y,w,v,T,b;return{setters:[function(e){n=e.O},function(e){r=e.d,a=e.ag,o=e.r,c=e.$,i=e.c,l=e.q,u=e.ah,f=e.ai,p=e.B,d=e.m,m=e.f},function(e){_=e.O},function(e){g=e.O},function(e){h=e.f},function(e){y=e.f,w=e.w},function(e){v=e.C},function(e){T=e.C},function(e){b=e.T},function(){}],execute:function(){var L={cellGroup:"_cellGroup_1fnws_1",classType:"_classType_1fnws_7",classNum:"_classNum_1fnws_15",classTime:"_classTime_1fnws_18",orchestra:"_orchestra_1fnws_24",name:"_name_1fnws_28"};e("default",r({name:"train-content",setup:function(){var e=a(),r=o({dialogStatus:!1,dialogMessage:"",contentList:[],SINGLE_DELIVERY:{SINGLE:120,MUSIC_THEORY:120},MULTIPLE_DELIVERY:{SINGLE:45,MUSIC_THEORY:60,INSTRUMENTAL_ENSEMBLE:60},MULTIPLE_DELIVERY_SCHOOL:{SINGLE:60,MUSIC_THEORY:60,INSTRUMENTAL_ENSEMBLE:60},disabled:!1}),E=function(){var e=s(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,d.get("/api-school/orchestra/trainingContent/"+m.user.data.school.id);case 3:t=e.sent,n=t.data,r.contentList=n||[],e.next=10;break;case 8:e.prev=8,e.t0=e.catch(0);case 10:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),O=function(){var n=s(regeneratorRuntime.mark((function n(){var s,a,o,c;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,!(r.contentList.length<=0)){n.next=5;break}return r.dialogStatus=!0,r.dialogMessage="暂无可排课班级",n.abrupt("return");case 5:return s=r.contentList,a=[],console.log(y,"forms"),s.forEach((function(e){a.push({orchestraId:e.orchestraId,classGroupIdList:e.classGroupIdList,courseNum:y.times,startTime:u(y.trainStartTime).format("HH:mm:ss"),endTime:u(y.trainStartTime).add(120,"minute").format("HH:mm:ss"),singleCourseTime:r[e.deliveryType][e.classType]})})),o={week:y.week,schoolId:m.user.data.school.id,skipHoliday:!!y.skipHoliday,type:"STANDARD",startDate:u(y.trainStartDate).format("YYYY-MM-DD"),trainingPlanClassList:a},n.next=12,d.post("/api-school/orchestra/trainingPlanList",{hideLoading:!1,data:t({},o)});case 12:if(999!==(c=n.sent).code){n.next=17;break}return r.dialogStatus=!0,r.dialogMessage=c.message,n.abrupt("return");case 17:y.selectOrchestraId=null,y.selectClassGroupId=null,console.log(c.data,"date"),e.push({path:"/course-preview",query:{cacheId:c.data}}),n.next=25;break;case 23:n.prev=23,n.t0=n.catch(0);case 25:case"end":return n.stop()}}),n,null,[[0,23]])})));return function(){return n.apply(this,arguments)}}();return c((function(){E()})),function(){return i("div",{class:r.contentList.length<=0&&"emptyRootContainer"},[i(_,null,null),r.contentList.map((function(e){return i(v,{inset:!0,class:L.cellGroup},{default:function(){return[i(T,{center:!0},{title:function(){return i("div",{class:L.classType},[h[e.classType],i(b,{round:!0,type:"primary",size:"medium",class:L.classNum},{default:function(){return[y.times,l("课时")]}})])},value:function(){return i("span",{class:L.classTime},[l("每"),w(y.week),l(" "),u(y.trainStartTime||"").format("HH:mm"),l("-"),u(y.trainStartTime||"").add(r[e.deliveryType][e.classType],"minute").format("HH:mm")])}}),i(T,{center:!0},{title:function(){return i("div",{class:L.orchestra},[i("p",{class:L.name},[e.orchestraName]),i("p",{class:L.class},[l("共"),i("span",null,[e.classGroupIdList&&e.classGroupIdList.length]),l("个班级")])])}})]}})})),r.contentList&&r.contentList.length<=0&&i(f,{btnStatus:!1,tips:"暂无训练内容"},null),i(g,{position:"bottom"},{default:function(){return[i("div",{class:"btnGroup"},[i(p,{round:!0,type:"primary",block:!0,onClick:O},{default:function(){return[l("下一步")]}})])]}}),i(n,{title:"提示",show:r.dialogStatus,"onUpdate:show":function(e){return r.dialogStatus=e},message:r.dialogMessage,confirmButtonText:"确定",onConfirm:function(){e.back()}},null)])}}}))}}}))}();