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,c,o){try{var i=e[c](o),u=i.value}catch(s){return void n(s)}i.done?t(u):Promise.resolve(u).then(r,a)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(a,c){var o=e.apply(t,n);function i(e){r(o,a,c,i,u,"next",e)}function u(e){r(o,a,c,i,u,"throw",e)}i(void 0)}))}}var c=document.createElement("style");c.innerHTML="._courseInfo_6hkyu_1{margin-top:.32rem}._courseInfo_6hkyu_1 .van-cell{padding:0 .32rem;font-size:.42667rem;font-weight:400;color:#333;line-height:1.54667rem;display:flex;flex-direction:row;align-items:center}._courseInfo_6hkyu_1 .van-cell .van-cell__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.42667rem;font-weight:400;color:#333}\n",document.head.appendChild(c),System.register(["./index-legacy.282bd7e4.js","./index-legacy.e2eac9c9.js","./index-legacy.085efe80.js","./index-legacy.bc288812.js","./index-legacy.8594a93e.js","./teacher-list-legacy.a354eb3e.js","./index-legacy.a205cdd8.js","./index-legacy.f9a524b1.js","./index-legacy.51461ba1.js","./index-legacy.c2376ec6.js","./index-legacy.ccf53eaa.js","./index-legacy.c3ffd9ae.js","./index-legacy.c75fe8a2.js","./isSameOrBefore-legacy.3d3f9ce1.js","./index-legacy.84c8cf32.js","./use-tab-status-legacy.ad1296de.js","./index-legacy.6b718bdc.js","./index-legacy.572afe0a.js","./utils-legacy.0365b0c0.js","./index-legacy.ae8a1ad5.js","./index-legacy.43a19553.js","./icon_teacher-legacy.07765f44.js","./index-legacy.3f2335bc.js","./index-legacy.9ae819eb.js","./index-legacy.e2c07903.js","./index-legacy.481310b2.js"],(function(e){"use strict";var n,r,c,o,i,u,s,l,d,f,m,h,p,v,y,g,b,T,D,x,w,j,I,k,P,C,O,S;return{setters:[function(e){n=e.O},function(e){r=e.d,c=e.ag,o=e.aW,i=e.r,u=e.R,s=e.$,l=e.ah,d=e.c,f=e.o,m=e.B,h=e.q,p=e.F,v=e.m,y=e.f,g=e.e,b=e.k,T=e.bx},function(e){D=e.c},function(e){x=e.O},function(e){w=e.C,j=e.T},function(e){I=e.T},function(e){k=e.O},function(e){P=e.C},function(e){C=e.C},function(e){O=e.T},function(e){S=e.F},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var Y={courseInfo:"_courseInfo_6hkyu_1"};e("default",r({name:"course-adjust",setup:function(){var e=c(),r=o(),L=i({id:r.query.id,cacheId:r.query.cacheId,showPopoverTime:!1,showPopoverCourseTime:!1,showPopoverTeacher:!1,currentDate:[],currentCourseDate:[],teachers:[],calendarList:[],calendarDate:null,trainStartTime:null,timerList:{},trainTimer:0,selectItem:{},arrangeType:"STANDARD",isBack:r.query.isBack}),_=i({classDate:"",teacherName:"",teacherId:"",courseScheduleId:"",startTime:"",endTime:""}),M=u({}),R=function(){var e=a(regeneratorRuntime.mark((function e(){var n,r,a,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!L.cacheId){e.next=15;break}return e.next=3,v.get("/api-school/courseSchedule/detailCache",{params:{courseScheduleId:L.id,cacheId:L.cacheId}});case 3:return n=e.sent,r=n.data,M.value=t({},r),L.arrangeType=r.arrangeType||"STANDARD",_.classDate=r.classDate,_.teacherName=r.teacherName,_.teacherId=r.teacherId,_.courseScheduleId=r.id,_.startTime=r.startTime,_.endTime=r.endTime,L.calendarDate=r.classDate,e.abrupt("return");case 15:return e.next=17,v.get("/api-school/courseSchedule/detail/".concat(L.id),{});case 17:a=e.sent,c=a.data,M.value=t({},c),_.classDate=M.value.classDate,_.teacherId=M.value.teacherId,_.teacherName=M.value.teacherName,_.courseScheduleId=M.value.id,_.startTime=M.value.startTime,_.endTime=M.value.endTime,L.calendarDate=c.classDate;case 27:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=function(){var e=a(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.post("/api-school/orchestra/calendarDateQuery",{data:{teacherId:_.teacherId,schoolId:y.user.data.school.id,courseScheduleId:_.courseScheduleId,cacheId:L.cacheId,skipHoliday:!1,calendarDate:l(t).format("YYYY-MM-DD")}});case 3:n=e.sent,r=n.data,L.calendarList=r||[],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(t){return e.apply(this,arguments)}}();s(a(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,R();case 2:return e.next=4,N(_.classDate);case 4:L.calendarList.forEach((function(e){l(e.calendarDate).isSame(_.classDate)&&(L.timerList=t({},e))}));case 5:case"end":return e.stop()}}),e)}))));var H=function(){var t=a(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:g().isApp&&!L.cacheId&&"true"!=L.isBack?b({api:"back"}):e.back();case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),V=function(){var e=a(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log(_),e.prev=1,_.classDate){e.next=5;break}return f("请选择课程开始日期"),e.abrupt("return");case 5:if(_.startTime){e.next=8;break}return f("请选择课程开始时间"),e.abrupt("return");case 8:return e.next=10,v.post("/api-school/courseSchedule/adjust",{data:t(t({},_),{},{cacheId:L.cacheId})});case 10:setTimeout((function(){T("调整成功")}),100),setTimeout((function(){H()}),1100),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(1),f(e.t0.message);case 17:console.log("课程调整");case 18:case"end":return e.stop()}}),e,null,[[1,14]])})));return function(){return e.apply(this,arguments)}}();return function(){return d(p,null,[d("div",{class:Y.courseWrap},[d(n,{border:!1},null),d("div",{class:Y.courseInfo},[d(P,{inset:!0,border:!1},{default:function(){return[d(C,{title:"乐团名称",value:M.value.orchestraName},null),d(C,{title:"课程类型"},{value:function(){return d(O,{type:"primary",size:"medium"},{default:function(){return[D[M.value.type]]}})}}),d(C,{title:"授课老师",value:_.teacherName,onClick:function(){L.showPopoverTeacher=!0},"is-link":!0},null),d(S,{label:"上课日期",inputAlign:"right",readonly:!0,isLink:!0,placeholder:"请选择上课日期",onClick:function(){return L.showPopoverTime=!0},modelValue:_.classDate?l(_.classDate).format("YYYY-MM-DD"):""},null),d(S,{label:"上课时间",inputAlign:"right",readonly:!0,isLink:!0,placeholder:"请选择上课时间",modelValue:_.startTime?l(_.startTime).format("HH:mm"):"",onClick:function(){var e=0;(L.timerList.timeDetailList||[]).forEach((function(t){!0===t.enable&&(e+=1)})),e<=0?f("当前没有可排课时间段,请重新选择课程开始日期"):L.showPopoverCourseTime=!0}},null),d(C,{title:"课程时长",value:(M.value.singleCourseTime||0)+"分钟"},null)]}})]),d(k,{position:"bottom"},{default:function(){return[d("div",{class:["btnGroup btnMore"]},[d(m,{color:"#ccc",round:!0,class:Y.unpassBtn,onClick:function(){return H()}},{default:function(){return[h("取消")]}}),d(m,{color:"#FF8057",round:!0,class:Y.unpassBtn,onClick:function(){return V()}},{default:function(){return[h("确认调整")]}})])]}}),d(x,{modelValue:L.showPopoverTime,"onUpdate:modelValue":function(e){return L.showPopoverTime=e},position:"bottom",destroy:!0},{default:function(){return[d(w,{list:L.calendarList,nextMonth:function(e){return N(e)},prevMonth:function(e){return N(e)},onSelect:function(e){L.showPopoverTime=!1,_.classDate=l(e).format("YYYY-MM-DD"),L.calendarList.forEach((function(n){l(n.calendarDate).isSame(e)&&(L.timerList=t({},n),setTimeout((function(){L.showPopoverCourseTime=!0}),100))})),_.startTime=""},onDestory:function(){_.classDate?N(_.classDate):N()},calendarDate:L.calendarDate,"onUpdate:calendarDate":function(e){return L.calendarDate=e}},null)]}}),d(x,{modelValue:L.showPopoverCourseTime,"onUpdate:modelValue":function(e){return L.showPopoverCourseTime=e},position:"bottom",style:{background:"#F6F6F6"},destroy:!0},{default:function(){return[d(j,{timerList:L.timerList,times:M.value.singleCourseTime||0,onClose:function(){return L.showPopoverCourseTime=!1},onConfirm:function(e){_.startTime=l(e).format("YYYY-MM-DD HH:mm:ss"),_.endTime=l(e).add(M.value.singleCourseTime,"minute").format("YYYY-MM-DD HH:mm:ss")}},null)]}}),d(x,{modelValue:L.showPopoverTeacher,"onUpdate:modelValue":function(e){return L.showPopoverTeacher=e},position:"bottom"},{default:function(){return[d(I,{courseType:M.value.type,removeTeacherId:_.teacherId,onClose:function(){return L.showPopoverTeacher=!1},onSelect:function(e){_.teacherId!==e.id&&(_.classDate="",_.startTime="",_.endTime="",_.teacherId=e.id,_.teacherName=e.nickname,L.calendarDate="",N())}},null)]}})])])}}}))}}}))}();
|