index-legacy.a21b12f0.js 8.5 KB

12
  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 i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,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,i,a,c){try{var o=e[a](c),s=o.value}catch(u){return void n(u)}o.done?t(s):Promise.resolve(s).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,a){var c=e.apply(t,n);function o(e){r(c,i,a,o,s,"next",e)}function s(e){r(c,i,a,o,s,"throw",e)}o(void 0)}))}}var a=document.createElement("style");a.innerHTML="._title_wbqc3_1{display:flex;align-items:center;padding:.32rem .34667rem;font-size:.48rem;font-weight:500;color:#333}._title_wbqc3_1 i{display:inline-block;width:.10667rem;height:.34667rem;background:#ff8057;border-radius:.05333rem;margin-right:.16rem}._cellGroup_wbqc3_17{margin:0 .34667rem .21333rem;border-radius:.26667rem;overflow:hidden}._cellGroup_wbqc3_17 .van-cell{font-size:.42667rem;padding:.48rem .32rem}._cellGroup_wbqc3_17 .van-cell__value{color:#333}._cellGroup_wbqc3_17 ._tips_wbqc3_29{color:#c8c9cc}\n",document.head.appendChild(a),System.register(["./index-legacy.48c8d62c.js","./index-legacy.f3037807.js","./index-legacy.d1078003.js","./index-legacy.8cf5f94f.js","./index-legacy.8895675d.js","./toolsValidate-legacy.95a8e7c1.js","./create-legacy.61029d25.js","./index-legacy.0ab1a3b2.js","./index-legacy.269a0b91.js","./index-legacy.55fe5b03.js","./index-legacy.087e0425.js","./index-legacy.ac2e8bc2.js","./index-legacy.ac553194.js","./index-legacy.c75fe8a2.js","./icon_teacher-legacy.07765f44.js","./index-legacy.04f465c8.js","./use-tab-status-legacy.6949b1de.js","./index-legacy.4e061cf8.js","./index-legacy.23554efd.js","./Checker-legacy.3526dce7.js","./index-legacy.0e0de364.js","./index-legacy.93204044.js","./index-legacy.8429fc95.js","./index-legacy.384d768f.js","./index-legacy.ef66d7bb.js","./index-legacy.71047e87.js","./index-legacy.a2ac81dd.js","./utils-legacy.60f652b8.js"],(function(e){"use strict";var n,r,a,c,o,s,u,l,m,f,d,p,g,y,b,h,x,v,j,_,T,w,H,M;return{setters:[function(e){n=e.d,r=e.ag,a=e.r,c=e.$,o=e.c,s=e.F,u=e.q,l=e.ah,m=e.o,f=e.B,d=e.P,p=e.m,g=e.f},function(e){y=e.O},function(e){b=e.O},function(e){h=e.O},function(e){x=e.f},function(e){v=e.v},function(e){j=e.f},function(e){_=e.P},function(e){T=e.C},function(e){w=e.F},function(e){H=e.C},function(e){M=e.T},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var Y={title:"_title_wbqc3_1",cellGroup:"_cellGroup_wbqc3_17",tips:"_tips_wbqc3_29"};e("default",n({name:"practice-detail",setup:function(){var e=r(),n=a({selectItem:{},currentTime:[],minHour:0,minMinute:0,maxHour:24,maxMinute:60,firstTime:null,lastTime:null}),I=function(){var e=i(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p.get("/api-school/sysParamConfig/queryByParamNameList",{params:{paramNames:"course_start_time,course_end_time"}});case 2:t=e.sent,r=t.data,(r||[]).forEach((function(e){console.log(e.paramValue,"paramValue");var t=l(j.trainStartDate).format("YYYY-MM-DD");if("course_start_time"===e.paramName){var r=l(t+" "+e.paramValue);n.minHour=Number(r.format("HH")),n.minMinute=Number(r.format("mm")),n.firstTime=r}else if("course_end_time"===e.paramName){var i=l(t+" "+e.paramValue);n.maxHour=Number(i.format("HH")),n.lastTime=i}}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(e){if(1!==e.columnIndex){var t=Number(e.selectedValues[0]);t===n.minHour?(n.minMinute=Number(n.firstTime.format("mm")),n.maxMinute=60):t===n.maxHour?(console.log(t,"hour"),n.minMinute=0,n.maxMinute=Number(n.lastTime.format("mm"))):(n.minMinute=0,n.maxMinute=60)}},P=function(){var e=j.classPracticeList,t=!1,n="";return e.forEach((function(e){console.log(e),t||e.trainTimer||(t=!0,n="请输入训练时长"),t||e.startTime||(t=!0,n="请选择开始时间"),t||e.times||(t=!0,n="请输入课时数"),!t&&e.classIdList.length<=0&&(t=!0,n="请选择训练班级")})),t&&m(n),t},D=function(){var n=i(regeneratorRuntime.mark((function n(){var r,i,a,c,o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!P()){n.next=2;break}return n.abrupt("return");case 2:return n.prev=2,r=j.classPracticeList,i=[],r.forEach((function(e){i.push({classGroupIdList:e.classIdList,courseNum:e.times,startTime:l(e.startTime).format("HH:mm:ss"),endTime:l(e.endTime).format("HH:mm:ss"),singleCourseTime:e.trainTimer})})),a={week:j.week,schoolId:g.user.data.school.id,skipHoliday:!!j.skipHoliday,type:"PRACTISE",startDate:l(j.trainStartDate).format("YYYY-MM-DD"),trainingPlanClassList:i},console.log(a),n.next=10,p.post("/api-school/orchestra/trainingPlanList",{hideLoading:!1,data:t({},a)});case 10:c=n.sent,o=c.data,j.selectOrchestraId=null,j.selectClassGroupId=null,j.planList={orchestra:[],classes:{},course:{}},console.log(o,"date"),e.push({path:"/course-preview",query:{cacheId:o}}),n.next=21;break;case 19:n.prev=19,n.t0=n.catch(2);case 21:case"end":return n.stop()}}),n,null,[[2,19]])})));return function(){return n.apply(this,arguments)}}(),L=function(e){return e&&e>=1?v(e):""};return c((function(){I()})),function(){return o("div",{class:Y.practiceDetail},[o(y,null,null),j.classPracticeList.map((function(e){return o(s,null,[o("div",{class:Y.title},[o("i",null,null),x[e.classType]]),o(T,{inset:!0,class:Y.cellGroup},{default:function(){return[o(w,{label:"训练时长",placeholder:"请输入训练时长",inputAlign:"right",modelValue:e.trainTimer,"onUpdate:modelValue":[function(t){return e.trainTimer=t},function(t){console.log(t),e.startTime=null}],formatter:L,maxlength:3,type:"tel",center:!0},{extra:function(){return o("span",{style:{paddingLeft:"6px"}},[u("分钟")])}}),o(w,{label:"开始时间",placeholder:"请选择开始时间",inputAlign:"right",readonly:!0,isLink:!0,center:!0,modelValue:e.startTime?l(e.startTime).format("HH:mm"):"",onClick:function(){e.trainTimer?(n.selectItem=e,j.timerStatus=!0):m("请输入训练时长")}},null),o(w,{label:"课时数",placeholder:"请输入课时数",inputAlign:"right",modelValue:e.times,"onUpdate:modelValue":function(t){return e.times=t},formatter:L,maxlength:2,center:!0,type:"tel"},{extra:function(){return o("span",{style:{paddingLeft:"6px"}},[u("课时")])}}),o(H,{title:"训练班级",isLink:!0,center:!0,onClick:function(){n.selectItem=e,j.classStatus=!0}},{value:function(){return o("div",{class:Y.value},[e.classIdList.length<=0?o("div",{class:Y.tips},[u("请选择训练班级")]):o("div",null,[u("已选"),o("span",{style:{padding:"0 4px"}},[e.classIdList.length]),u("个班级")])])}})]}})])})),o(h,{position:"bottom"},{default:function(){return[o("div",{class:"btnGroup"},[o(f,{type:"primary",block:!0,round:!0,onClick:D},{default:function(){return[u("下一步")]}})])]}}),o(b,{modelValue:j.classStatus,"onUpdate:modelValue":function(e){return j.classStatus=e},position:"bottom",style:{background:"#f6f6f6"},destroy:!0},{default:function(){return[o(_,{onClose:function(){return j.classStatus=!1},classType:n.selectItem.classType,selectItem:n.selectItem.classIdList,onConfirm:function(e){n.selectItem.classIdList=e}},null)]}}),o(d,{show:j.timerStatus,"onUpdate:show":function(e){return j.timerStatus=e},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[o(M,{modelValue:n.currentTime,"onUpdate:modelValue":function(e){return n.currentTime=e},minHour:n.minHour,minMinute:n.minMinute,maxHour:n.maxHour,maxMinute:n.maxMinute,onChange:O,onCancel:function(){return j.timerStatus=!1},onConfirm:function(e){return t=e,void((r=l(l(n.lastTime).format("YYYY-MM-DD")+" "+t.selectedValues.join(":")+":00").add(n.selectItem.trainTimer,"minute")).isAfter(n.lastTime)?m("开始时间超过可选时间范围"):(n.selectItem.startTime=l(l(n.lastTime).format("YYYY-MM-DD")+" "+t.selectedValues.join(":")+":00").format("YYYY-MM-DD HH:mm:ss"),n.selectItem.endTime=r.format("YYYY-MM-DD HH:mm:ss"),j.timerStatus=!1));var t,r}},null)]}})])}}}))}}}))}();