index-legacy.9eb91d86.js 8.4 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 a=null!=arguments[r]?arguments[r]:{};r%2?e(Object(a),!0).forEach((function(e){n(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,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,a,i,c){try{var o=e[i](c),s=o.value}catch(u){return void n(u)}o.done?t(s):Promise.resolve(s).then(r,a)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(a,i){var c=e.apply(t,n);function o(e){r(c,a,i,o,s,"next",e)}function s(e){r(c,a,i,o,s,"throw",e)}o(void 0)}))}}var i=document.createElement("style");i.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(i),System.register(["./index-legacy.47bc1690.js","./index-legacy.a418c316.js","./index-legacy.697c501a.js","./index-legacy.4e015ad0.js","./toolsValidate-legacy.95a8e7c1.js","./create-legacy.eb9aacc9.js","./index-legacy.c2bcae81.js","./index-legacy.bab9fe30.js","./index-legacy.569a2858.js","./index-legacy.92a01198.js","./index-legacy.6bf8fcc4.js","./icon_teacher-legacy.07765f44.js","./index-legacy.57721991.js","./use-tab-status-legacy.7bf91b8c.js","./index-legacy.1900d24e.js","./index-legacy.deb7af23.js","./Checker-legacy.289748ec.js","./index-legacy.0ebc214d.js","./index-legacy.453fd926.js","./index-legacy.4df1d4ab.js","./index-legacy.62a334e5.js","./Picker-legacy.cd27e6c1.js","./index-legacy.00966b07.js","./index-legacy.18044794.js","./index-legacy.21964237.js","./utils-legacy.24861f33.js"],(function(e){"use strict";var n,r,i,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,i=e.r,c=e.$,o=e.c,s=e.aj,u=e.F,l=e.q,m=e.ai,f=e.o,d=e.B,p=e.P,g=e.m,y=e.g},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(){}],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=i({selectItem:{},currentTime:[],minHour:0,minMinute:0,maxHour:24,maxMinute:60,firstTime:null,lastTime:null}),I=function(){var e=a(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,g.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=m(j.trainStartDate).format("YYYY-MM-DD");if("course_start_time"===e.paramName){var r=m(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 a=m(t+" "+e.paramValue);n.maxHour=Number(a.format("HH")),n.lastTime=a}}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=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)}},O=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&&f(n),t},k=function(){var n=a(regeneratorRuntime.mark((function n(){var r,a,i,c,o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!O()){n.next=2;break}return n.abrupt("return");case 2:return n.prev=2,r=j.classPracticeList,a=[],r.forEach((function(e){a.push({classGroupIdList:e.classIdList,courseNum:e.times,startTime:m(e.startTime).format("HH:mm:ss"),endTime:m(e.endTime).format("HH:mm:ss"),singleCourseTime:e.trainTimer})})),i={week:j.week,schoolId:y.user.data.school.id,skipHoliday:!!j.skipHoliday,type:"PRACTISE",startDate:m(j.trainStartDate).format("YYYY-MM-DD"),trainingPlanClassList:a},console.log(i),n.next=10,g.post("/api-school/orchestra/trainingPlanList",{hideLoading:!1,data:t({},i)});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)}}(),D=function(e){return e&&e>=1?v(e):""};return c((function(){I()})),function(){return o("div",{class:Y.practiceDetail},[o(s,null,null),j.classPracticeList.map((function(e){return o(u,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:D,maxlength:3,type:"tel",center:!0},{extra:function(){return o("span",{style:{paddingLeft:"6px"}},[l("分钟")])}}),o(w,{label:"开始时间",placeholder:"请选择开始时间",inputAlign:"right",readonly:!0,isLink:!0,center:!0,modelValue:e.startTime?m(e.startTime).format("HH:mm"):"",onClick:function(){e.trainTimer?(n.selectItem=e,j.timerStatus=!0):f("请输入训练时长")}},null),o(w,{label:"课时数",placeholder:"请输入课时数",inputAlign:"right",modelValue:e.times,"onUpdate:modelValue":function(t){return e.times=t},formatter:D,maxlength:2,center:!0,type:"tel"},{extra:function(){return o("span",{style:{paddingLeft:"6px"}},[l("课时")])}}),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},[l("请选择训练班级")]):o("div",null,[l("已选"),o("span",{style:{padding:"0 4px"}},[e.classIdList.length]),l("个班级")])])}})]}})])})),o(h,{position:"bottom"},{default:function(){return[o("div",{class:"btnGroup"},[o(d,{type:"primary",block:!0,round:!0,onClick:k},{default:function(){return[l("下一步")]}})])]}}),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(p,{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:P,onCancel:function(){return j.timerStatus=!1},onConfirm:function(e){return t=e,void((r=m(m(n.lastTime).format("YYYY-MM-DD")+" "+t.selectedValues.join(":")+":00").add(n.selectItem.trainTimer,"minute")).isAfter(n.lastTime)?f("开始时间超过可选时间范围"):(n.selectItem.startTime=m(m(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)]}})])}}}))}}}))}();