!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(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(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 r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)A.status=!0;else if(A.classType.length<=0)f("请选择课程类型");else if(A.trainStartDate)if(A.week)if(e.address){var n=[];A.classType.forEach((function(e){n.push({classType:e,startTime:null,endTime:null,trainTimer:null,times:null,classIdList:[]})})),A.classPracticeList=n,t.push("/practice-detail")}else f("您所在的学校暂未设置地址");else f("请选择周次");else f("请选择课程开始日期")};return l((function(){})),function(){return c("div",{class:$.practice,style:{minHeight:"calc(100vh - var(--header-height) - var(--van-tabs-line-height))",overflow:"hidden"}},[c("div",{class:$.tips},[c(s,{name:"warning",class:$.icon},null),u("自定义训练可对任意班级进行排课,课程类型可多选")]),c(F,{inset:!0,class:$.cellGroup},{default:function(){return[c(D,{title:"课程类型",titleClass:$.classType},{value:function(){return c(L,{"checked-color":"#FF8057",modelValue:A.classType,"onUpdate:modelValue":function(e){return A.classType=e},direction:"horizontal"},{default:function(){return[c(I,{size:"large",type:"primary",color:A.classType.includes("SINGLE")?"#FF8057":"#EAEAEA",textColor:A.classType.includes("SINGLE")?"#FFF":"#AAA",class:$.radioSection},{default:function(){return[c(G,{class:$.radioItem,name:"SINGLE"},null),u("声部课")]}}),c(I,{size:"large",type:"primary",color:A.classType.includes("MUSIC_THEORY")?"#FF8057":"#EAEAEA",textColor:A.classType.includes("MUSIC_THEORY")?"#FFF":"#AAA",class:$.radioSection},{default:function(){return[c(G,{class:$.radioItem,name:"MUSIC_THEORY"},null),u("乐理课")]}}),c(I,{size:"large",type:"primary",color:A.classType.includes("INSTRUMENTAL_ENSEMBLE")?"#FF8057":"#EAEAEA",textColor:A.classType.includes("INSTRUMENTAL_ENSEMBLE")?"#FFF":"#AAA",class:$.radioSection},{default:function(){return[c(G,{class:$.radioItem,name:"INSTRUMENTAL_ENSEMBLE"},null),u("合奏课")]}})]}})}}),c(O,{label:"课程开始日期",inputAlign:"right",placeholder:"请选择课程开始日期",readonly:!0,isLink:!0,modelValue:A.trainStartDate?d(A.trainStartDate).format("YYYY年MM月DD日"):"",onClick:function(){return A.calendarTimeStatus=!0}},null),c(O,{label:"课程周次",inputAlign:"right",placeholder:"请选择课程周次",readonly:!0,modelValue:C(A.week),onClick:function(){A.trainStartDate||f("请选择课程开始日期")}},null),c(D,{title:"跳过节假日"},{value:function(){return c(H,{"checked-color":"#FF8057",modelValue:A.skipHoliday,"onUpdate:modelValue":function(e){return A.skipHoliday=e},direction:"horizontal"},{default:function(){return[c(I,{size:"large",type:"primary",color:1!==A.skipHoliday?"#EAEAEA":"#FF8057",textColor:1!==A.skipHoliday?"#AAA":"#FFF",class:$.radioSection,round:!0},{default:function(){return[c(V,{class:$.radioItem,name:1},null),u("是")]}}),c(I,{size:"large",type:"primary",color:0!==A.skipHoliday?"#EAEAEA":"#FF8057",textColor:0!==A.skipHoliday?"#AAA":"#FFF",class:$.radioSection,round:!0},{default:function(){return[c(V,{class:$.radioItem,name:0},null),u("否")]}})]}})}})]}}),c(T,{position:"bottom",class:$.informationBottom},{default:function(){return[c("div",{class:"btnGroup",style:{marginTop:"24px"}},[c(p,{type:"primary",block:!0,round:!0,onClick:n},{default:function(){return[u("下一步")]}})])]}}),c(m,{show:A.weekStatus,"onUpdate:show":function(e){return A.weekStatus=e},position:"bottom",round:!0,class:"popupBottomSearch",teleport:"body"},{default:function(){return[c(N,{columns:j,onCancel:function(){return A.weekStatus=!1},onConfirm:function(e){A.week=e.selectedValues[0],A.weekStatus=!1}},null)]}}),c(m,{show:A.calendarTimeStatus,"onUpdate:show":function(e){return A.calendarTimeStatus=e},position:"bottom",round:!0,class:"popupBottomSearch",teleport:"body"},{default:function(){return[c(U,{minDate:new Date,modelValue:A.classDate,"onUpdate:modelValue":function(e){return A.classDate=e},formatter:h,onCancel:function(){return A.calendarTimeStatus=!1},onConfirm:function(e){A.calendarTimeStatus=!1,A.trainStartDate=e.selectedValues.join("-");var t=d(A.trainStartDate).day(),n=j[0===t?6:t-1];A.week=n.value}},null)]}})])}}}),Z="_classList_13nhk_1",J="_cell_13nhk_1",K="_content_13nhk_7",Q="_title_13nhk_7",X="_name_13nhk_22",ee="_teacherName_13nhk_29",te=a({name:"class-list",props:{classList:{type:Array,default:function(){return[]}}},emits:["close","confirm"],setup:function(e,t){t.slots,t.attrs;var r=t.emit,a=_({teacherStatus:!1,list:[],isClick:!1,selectItem:{}}),o=function(){var e=i(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t=[],a.list.forEach((function(e){e.teacherId&&t.push({classGroupId:e.id,teacherId:e.teacherId})})),!(t.length<=0)){e.next=6;break}return r("close"),e.abrupt("return");case 6:return a.isClick=!0,e.next=9,v.post("/api-school/classGroup/updateTeacher",{data:t});case 9:a.isClick=!1,r("confirm"),r("close"),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),a.isClick=!1;case 17:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(){return e.apply(this,arguments)}}();return y((function(){return e.classList}),(function(){a.list=n(e.classList)})),l((function(){a.list=n(e.classList)})),function(){return c("div",{class:[Z,a.list.length<=0&&"emptyRootContainer"]},[c(x,{title:"指定伴学指导",desotry:!1},null),a.list.map((function(e){return c(D,{class:J,center:!0,isLink:!0,onClick:function(){a.selectItem=e,a.teacherStatus=!0},valueClass:[ee,"van-ellipsis"]},{title:function(){return c("div",{class:K},[c("div",{class:Q},[c("i",null,null),e.name]),c("div",{class:[X,"van-ellipsis"]},[e.orchestraName])])},value:function(){return c("div",{style:{color:e.teacherName?"":"var(--van-primary)"}},[e.teacherName?e.teacherName:"去设置"])}})})),e.classList.length<=0&&c(g,{btnStatus:!1,tips:"暂无班级"},null),c(P,{position:"bottom",style:{width:"100%"}},{default:function(){return[c("div",{class:"btnGroup"},[c(p,{round:!0,block:!0,type:"primary",onClick:o,disabled:a.isClick},{default:function(){return[u("完成")]}})])]}}),c(m,{show:a.teacherStatus,"onUpdate:show":function(e){return a.teacherStatus=e},position:"bottom",round:!0,style:{height:"80%"}},{default:function(){return[c(B,{header:!1,mode:"sticky",courseType:a.selectItem.courseType,onClose:function(){return a.teacherStatus=!1},onSelect:function(e){a.selectItem.teacherId=e.id,a.selectItem.teacherName=e.nickname}},null)]}})])}}}),ne="_standard_8h5p6_1",re="_tips_8h5p6_4",ae="_icon_8h5p6_14",ie="_informationBottom_8h5p6_18",oe="_cellGroup_8h5p6_21",le="_radioSection_8h5p6_36",ce="_radioItem_8h5p6_41",se="_dialogTitle_8h5p6_52",ue=a({name:"standard",props:{address:{type:String,default:""}},setup:function(n){b();var r=o(),a=function(){var e=i(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/trainingPlanTime",{data:{schoolId:k.user.data.school.id,skipHoliday:!!A.skipHoliday,type:"STANDARD",calendarDate:d(t).format("YYYY-MM-DD")}});case 3:n=e.sent,r=n.data,A.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)}}(),h=function(){var e=i(regeneratorRuntime.mark((function e(){var t,n,r,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=!(a.length>0&&void 0!==a[0])||a[0],e.prev=1,e.next=4,v.post("/api-school/classGroup/page",{data:{page:1,rows:200,schoolId:k.user.data.school.id,hasTeacher:!1,orchestraType:"DELIVERY"}});case 4:n=e.sent,r=n.data,A.classList=r.rows||[],A.classList.length>0&&t&&(A.status=!0),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(1);case 12:case"end":return e.stop()}}),e,null,[[1,10]])})));return function(){return e.apply(this,arguments)}}(),_=function(){var e=i(regeneratorRuntime.mark((function e(){var t,n,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.get("/api-school/orchestra/semesterStandardCourseNum/"+k.user.data.school.id);case 3:for(t=e.sent,n=t.data,r=Number(A.pickerNum-n),A.times=r,a=0;a0?A.status=!0:A.trainStartDate?A.trainStartTime?A.week?n.address?r.push("/train-content"):f("您所在的学校暂未设置地址"):f("请选择周次"):f("请选择训练开始时间"):f("请选择训练开始日期")};return l((function(){a(A.calendarDate||new Date),h(),_()})),function(){return c("div",{class:ne,style:{minHeight:"calc(100vh - var(--header-height) - var(--van-tabs-line-height))",overflow:"hidden"}},[c("div",{class:re},[c(s,{name:"warning",class:ae},null),u("标准训练可对交付团进行整学期标准训练排课")]),c(F,{inset:!0,class:oe},{default:function(){return[c(D,{title:"跳过节假日"},{value:function(){return c(H,{"checked-color":"#FF8057",modelValue:A.skipHoliday,"onUpdate:modelValue":function(e){return A.skipHoliday=e},direction:"horizontal",onChange:function(){A.trainStartDate=null,A.trainStartTime=null,A.calendarDate=null,a()}},{default:function(){return[c(I,{size:"large",type:"primary",color:1!==A.skipHoliday?"#EAEAEA":"#FF8057",textColor:1!==A.skipHoliday?"#AAA":"#FFF",class:le,round:!0},{default:function(){return[c(V,{class:ce,name:1},null),u("是")]}}),c(I,{size:"large",type:"primary",color:0!==A.skipHoliday?"#EAEAEA":"#FF8057",textColor:0!==A.skipHoliday?"#AAA":"#FFF",class:le,round:!0},{default:function(){return[c(V,{class:ce,name:0},null),u("否")]}})]}})}}),c(O,{label:"训练开始日期",placeholder:"请选择训练开始日期",isLink:!0,readonly:!0,inputAlign:"right",onClick:function(){return A.calendarStatus=!0},modelValue:A.trainStartDate?d(A.trainStartDate).format("YYYY年MM月DD日"):""},null),c(O,{label:"训练开始时间",isLink:!0,readonly:!0,placeholder:"请选择训练开始日期",inputAlign:"right",modelValue:A.trainStartTime?d(A.trainStartTime).format("HH:mm"):"",onClick:function(){A.trainStartDate?A.timerStatus=!0:f("请选择训练开始日期")}},null),c(D,{title:"训练时长",value:A.trainTimer+"分钟"},{"right-icon":function(){return c(s,{class:"van-cell__right-icon",name:"arrow",color:"#fff"},null)}}),c(O,{label:"训练周次",isLink:!0,clickable:!1,placeholder:"请选择训练周次",modelValue:C(A.week),inputAlign:"right",class:"form-control-icon",readonly:!0},null),c(D,{title:"训练次数",isLink:!(A.times<=0),value:A.times+"次",onClick:function(){A.times<=0||(A.numberStatus=!0)}},null)]}}),c(T,{position:"bottom",class:ie},{default:function(){return[c("div",{class:"btnGroup",style:{marginTop:"24px"}},[c(p,{type:"primary",block:!0,round:!0,onClick:y},{default:function(){return[u("下一步")]}})])]}}),c(m,{show:A.weekStatus,"onUpdate:show":function(e){return A.weekStatus=e},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[c(N,{columns:j,onCancel:function(){return A.weekStatus=!1},onConfirm:function(e){A.week=e.selectedValues[0],A.weekStatus=!1}},null)]}}),c(z,{modelValue:A.calendarStatus,"onUpdate:modelValue":function(e){return A.calendarStatus=e},position:"bottom",destroy:!0,teleport:"body"},{default:function(){return[c(R,{list:A.calendarList,nextMonth:function(e){return a(e)},prevMonth:function(e){return a(e)},toDayMonth:function(e){return a(e)},onSelect:function(n){A.calendarStatus=!1,A.trainStartDate=n,A.trainStartTime=null;var r=d(n).day(),a=j[0===r?6:r-1];A.week=a.value,A.calendarList.forEach((function(r){d(r.calendarDate).isSame(n)&&(A.timerList=function(n){for(var r=1;r'.concat(A.classList.length,"个班级尚未指定伴学指导,请完成指定后再进行训练规划。"),messageAlign:"left",allowHtml:!0,confirmButtonText:"去设置",cancelButtonText:"暂不设置",teleport:"body",showCancelButton:!0,onConfirm:function(){A.classStatus=!0}},{title:function(){return c("div",{class:se},[c("i",null,null),u("指定伴学指导")])}}),c(S,{show:A.numberDialogStatus,"onUpdate:show":function(e){return A.numberDialogStatus=e},message:"暂无可训练次数",messageAlign:"center",confirmButtonText:"确定",teleport:"body"},{title:function(){return c("div",{class:se},[c("i",null,null),u("训练次数")])}}),c(z,{modelValue:A.classStatus,"onUpdate:modelValue":function(e){return A.classStatus=e},position:"bottom",style:{background:"#F6F6F6"},destroy:!0,teleport:"body"},{default:function(){return[c(te,{classList:A.classList,onClose:function(){return A.classStatus=!1},onConfirm:function(){h(!1)}},null)]}})])}}}),de="_train_r2wxa_1";r("default",a({name:"train-planning",setup:function(){var e=sessionStorage.getItem("trainType"),t=w(e||"standard"),n=w(""),r=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.prev=0,e.next=3,v.get("/api-school/school/detail/".concat(k.user.data.school.id));case 3:t=e.sent,r=t.data,n.value=r.address||"",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)}}(),a=w(0);return l((function(){r()})),function(){return c("div",{class:de},[c(T,{position:"top",onGetHeight:function(e){console.log(e,"height"),a.value=e,document.documentElement.style.setProperty("--header-height",e+"px")}},{default:function(){return[c(x,{border:!1},null)]}}),c(Y,{sticky:!0,lineWidth:20,lineHeight:4,swipeable:!0,animated:!0,offsetTop:a.value,active:t.value,"onUpdate:active":function(e){return t.value=e},onChange:function(e){E(),sessionStorage.setItem("trainType",e)}},{default:function(){return[c(W,{title:"标准训练",name:"standard"},{default:function(){return["standard"===t.value&&c(ue,{address:n.value},null)]}}),c(W,{title:"自定义训练",name:"practice"},{default:function(){return["practice"===t.value&&c(q,{address:n.value},null)]}})]}})])}}}))}}}))}();