index-legacy.a9b56f05.js 30 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 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){return function(e){if(Array.isArray(e))return i(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 i(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 i(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 i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t,n,r,i,a,o){try{var u=e[a](o),c=u.value}catch(s){return void n(s)}u.done?t(c):Promise.resolve(c).then(r,i)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function u(e){a(o,r,i,u,c,"next",e)}function c(e){a(o,r,i,u,c,"throw",e)}u(void 0)}))}}var u=document.createElement("style");u.innerHTML='._container_5bgh5_1{padding:.34667rem .37333rem}._container_5bgh5_1 .van-cell{border-radius:.10667rem;margin-bottom:.26667rem}._container_5bgh5_1 .van-field__label{border-right:.02667rem solid #dfdfdf;font-size:.42667rem;color:#333}._tips_5bgh5_13{display:flex;align-items:center;font-size:.42667rem;color:#1a1a1a;font-weight:500}._tips_5bgh5_13 ._icon_5bgh5_20{width:.50667rem;height:.50667rem;margin-right:.18667rem}._tipsContent_5bgh5_25{font-size:.37333rem;color:#696969;line-height:.56rem}._week_5bgh5_30{display:flex;justify-content:space-between}._week_5bgh5_30 .van-radio__icon{display:none}._week_5bgh5_30 .van-radio__label{display:flex;align-items:center;justify-content:center;width:1.04rem;height:1.04rem;background:#f5f8fb;border-radius:.16rem;font-size:.32rem;font-weight:500;color:var(--van-primary);margin:0}._week_5bgh5_30 .van-radio[aria-checked=true] .van-radio__label{background-color:var(--van-primary);color:#fff}._week_5bgh5_30 .van-radio.van-radio--disabled .van-radio__label{color:#cdced0}._holdays_5bgh5_57{display:flex;justify-content:flex-end}._holdays_5bgh5_57 .van-radio__icon{display:none}._holdays_5bgh5_57 .van-radio__label{display:flex;align-items:center;justify-content:center;width:1.01333rem;height:.58667rem;background:#f5f8fb;border-radius:.08rem;border:.02667rem solid #999999;font-size:.32rem;font-weight:500;color:#999;margin:0}._holdays_5bgh5_57 .van-radio[aria-checked=true] .van-radio__label{background-color:var(--van-primary);border-color:var(--van-primary);color:#fff}._coursePopup_5bgh5_83{min-height:10.96rem;border-radius:.21333rem;padding:.48rem .37333rem;box-sizing:border-box}._tags_5bgh5_89{display:flex;flex-wrap:wrap;padding:.32rem}._tags_5bgh5_89 .van-tag{padding:.05333rem .13333rem;border-radius:.08rem;border:.02667rem solid var(--van-primary);background-color:#e0f7f3;color:var(--van-primary);margin-right:.21333rem;margin-bottom:.21333rem;font-size:.32rem;line-height:.45333rem;font-weight:500}._pickerTitle_5bgh5_106{justify-content:center;font-size:.48rem;color:#000;font-weight:500;text-align:center}._student_5bgh5_113{margin:0!important}._student_5bgh5_113 .van-field__control{opacity:0!important}._container_1df8b_1{background-color:#f7f8f9;min-height:100vh;padding-bottom:1.86667rem;box-sizing:border-box}._label_1df8b_7{margin-right:.21333rem;font-size:.37333rem}._label_1df8b_7 .van-list__loading,._label_1df8b_7 .van-list__finished-text,._label_1df8b_7 .van-list__error-text{width:100%}._label_1df8b_7 .iconfont-down{margin-left:.10667rem}._btnGroup_1df8b_19{position:fixed;left:0;right:0;bottom:0;padding:.26667rem .74667rem;background-color:#fff}._btnGroup_1df8b_19 button{height:1.33333rem;line-height:1.33333rem}._check_1df8b_31{display:flex;justify-content:flex-end}._subjects_1uhdv_1 ._subjectContainer_1uhdv_1{height:45vh;overflow-y:auto}._subjects_1uhdv_1 ._title_1uhdv_5{padding:.32rem 0;margin:0 .4rem;color:#333;font-size:.42667rem}._subjects_1uhdv_1 ._title_1uhdv_5:before{content:" ";display:inline-block;width:.08rem;height:.42667rem;background:#2dc7aa;border-radius:.08rem;margin-right:.21333rem;vertical-align:text-bottom}._subjects_1uhdv_1 ._subject-list_1uhdv_21{display:flex;align-items:center;flex-wrap:wrap;padding:0 .26667rem}._subjects_1uhdv_1 ._subject-list_1uhdv_21 ._subject-item_1uhdv_27{position:relative;width:2.88rem;height:2.88rem;margin-right:.13333rem;margin-left:.13333rem;margin-bottom:.26667rem;border-radius:.18667rem;overflow:hidden}._subjects_1uhdv_1 ._subject-list_1uhdv_21 ._topBg_1uhdv_37{position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(180deg,rgba(0,0,0,0) 0%,rgba(0,0,0,.54) 100%)}._subjects_1uhdv_1 ._subject-list_1uhdv_21 ._checkbox_1uhdv_45{position:absolute;right:.18667rem;top:.18667rem}._subjects_1uhdv_1 ._subject-list_1uhdv_21 ._name_1uhdv_50{position:absolute;bottom:.18667rem;left:.18667rem;font-size:.42667rem;font-weight:500;color:#fff;line-height:.58667rem}._subjects_1uhdv_1 ._subject-list_1uhdv_21 .van-checkbox__icon,._subjects_1uhdv_1 ._subject-list_1uhdv_21 .van-radio__icon{height:.58667rem}._subjects_1uhdv_1 ._subject-list_1uhdv_21 .van-checkbox__icon .van-icon,._subjects_1uhdv_1 ._subject-list_1uhdv_21 .van-radio__icon .van-icon{border:0;background-color:transparent}._subjects_1uhdv_1 ._subject-list_1uhdv_21 .van-checkbox__icon--checked .van-icon,._subjects_1uhdv_1 ._subject-list_1uhdv_21 .van-radio__icon--checked .van-icon{background-color:transparent;border:transparent}._btns_1uhdv_73{display:flex;justify-content:space-around}._btns_1uhdv_73 .van-button{width:45%}._filterTitle_1uhdv_80{font-size:.48rem;font-weight:500;color:#000;line-height:.66667rem;text-align:center;padding:.53333rem 0}._createClass_129c1_1{padding:.34667rem .37333rem}._arrangeCell_129c1_4{margin:.26667rem 0 0;width:auto;border-radius:.26667rem;overflow:hidden}._rTitle_129c1_10{display:flex;align-items:center;font-size:.42667rem;color:#333;font-weight:500}._rTitle_129c1_10:before{margin-right:.21333rem;content:" ";display:inline-block;width:.10667rem;height:.45333rem;background:linear-gradient(180deg,#59e5d5 0%,#2dc7aa 100%);border-radius:.08rem}._rTag_129c1_26{padding:.26667rem 0}._rTag_129c1_26 ._tag_129c1_29{background:#e9fff8;margin-bottom:.21333rem}._selectPopup_129c1_33{width:8.32rem;background:#ffffff;border-radius:.21333rem}._selectPopup_129c1_33 ._selectContainer_129c1_38{padding:.48rem .37333rem}._selectPopup_129c1_33 ._rTitle_129c1_10{font-size:.48rem}._selectPopup_129c1_33 ._selectPopupContent_129c1_44{padding:.53333rem 0}._selectPopup_129c1_33 ._desc_129c1_47,._selectPopup_129c1_33 ._times_129c1_48{font-size:.37333rem;color:#666;line-height:.53333rem}._selectPopup_129c1_33 ._times_129c1_48{padding-top:.4rem}._selectPopup_129c1_33 ._times_129c1_48 span{display:block}._selectPopup_129c1_33 ._selectBtn_129c1_59{display:flex;align-items:center;justify-content:space-between}._selectPopup_129c1_33 ._selectBtn_129c1_59 ._btn_129c1_64{width:48%}._coursePopup_129c1_67{min-height:10.96rem;border-radius:.21333rem;padding:.48rem .37333rem;box-sizing:border-box}._box_12gfu_1{font-size:.37333rem;line-height:.53333rem}._wrap_12gfu_5{max-height:50vh;overflow-y:auto}._title_12gfu_9{position:relative;display:flex;align-items:center;padding:.21333rem 0;font-size:.48rem;font-weight:500;color:#333;line-height:.8rem}._leftIcon_12gfu_19{width:.10667rem;height:.48rem;background:linear-gradient(180deg,#59e5d5 0%,#2dc7aa 100%);border-radius:.08rem;margin-right:.16rem}._stu_12gfu_26{color:#333;font-weight:400}._timeBox_12gfu_30{height:3.57333rem;overflow-y:auto;background-color:#f7f8f9;border-radius:.21333rem;margin:.26667rem 0;padding:.18667rem .21333rem}._timeTitle_12gfu_38{color:#333;font-weight:500}._timeItem_12gfu_42{color:#666;line-height:.64rem}._footer_12gfu_46{display:flex;justify-content:space-evenly;padding:.26667rem 0}._footer_12gfu_46 button{width:3.62667rem}\n',document.head.appendChild(u),System.register(["./index-legacy.1ca26581.js","./index-legacy.f8641610.js","./index-legacy.40132992.js","./index-legacy.fc510843.js","./index-legacy.8a3dede6.js","./index-legacy.1dea7f77.js","./index-legacy.aee47fad.js","./index-legacy.e0697bba.js","./index-legacy.28050159.js","./icon_tips-legacy.1911ff27.js","./index-legacy.a47aea4d.js","./index-legacy.78c8492b.js","./index-legacy.e8dcdcc8.js","./index-legacy.421c6f71.js","./index-legacy.4ddb0119.js","./index-legacy.fc4b9b47.js","./index-legacy.c8b60294.js","./checkbox_default-legacy.16e4afe4.js","./index-legacy.d8170ee0.js","./index-legacy.3442906b.js"],(function(e){"use strict";var n,i,a,u,c,s,l,d,f,_,m,p,h,b,g,v,y,k,x,j,w,C,T,S,L,N,I,P,z,O,B,R,M,D,V,H,A,E,Y,U,F,G,q,J;return{setters:[function(e){n=e.C},function(e){i=e.d,a=e.T,u=e.i,c=e.A,s=e.F,l=e.aS,d=e.N,f=e.C,_=e.B,m=e.U,p=e.S,h=e.V,b=e.k,g=e.aT,v=e.e,y=e.W,k=e.a8,x=e.x,j=e.a3,w=e.Q,C=e.s,T=e.b7,S=e.D,L=e.X},function(e){N=e.A},function(e){I=e.C},function(e){P=e.F},function(e){z=e.R,O=e.a},function(){},function(e){B=e.S},function(e){R=e.T},function(e){M=e.i},function(e){D=e.C},function(e){V=e.C},function(e){H=e.C},function(e){A=e.C},function(e){E=e.S},function(e){Y=e.S},function(e){U=e.I},function(e){F=e.c,G=e.a},function(e){q=e.C},function(e){J=e.F}],execute:function(){var Q,W={container:"_container_5bgh5_1",tips:"_tips_5bgh5_13",icon:"_icon_5bgh5_20",tipsContent:"_tipsContent_5bgh5_25",week:"_week_5bgh5_30",holdays:"_holdays_5bgh5_57",coursePopup:"_coursePopup_5bgh5_83",tags:"_tags_5bgh5_89",pickerTitle:"_pickerTitle_5bgh5_106",student:"_student_5bgh5_113"},X={container:"_container_1df8b_1",label:"_label_1df8b_7",btnGroup:"_btnGroup_1df8b_19",check:"_check_1df8b_31"},$="_subjects_1uhdv_1",K="_subjectContainer_1uhdv_1",Z="_title_1uhdv_5",ee="_subject-list_1uhdv_21",te="_subject-item_1uhdv_27",ne="_topBg_1uhdv_37",re="_checkbox_1uhdv_45",ie="_name_1uhdv_50",ae="_btns_1uhdv_73",oe="_filterTitle_1uhdv_80",ue=i({name:"SubjectList",props:{onChoice:{type:Function,default:function(e){}},choiceSubjectIds:{type:Array,default:[]},subjectList:{type:Array,default:[]},max:{type:Number,default:5},selectType:{type:String,default:"Checkbox"},single:{type:Boolean,default:!1}},data:function(){return{checkBox:[],checkboxRefs:[],radio:null}},mounted:function(){var e=this;return o(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.checkBox=e.choiceSubjectIds;case 1:case"end":return t.stop()}}),t)})))()},watch:{choiceSubjectIds:function(e,t){this.checkBox=r(e)}},methods:{onSelect:function(e){"Checkbox"===this.selectType?(this.max!==this.checkBox.length||this.checkBox.includes(e)||a("乐器最多选择".concat(this.max,"个")),this.checkboxRefs[e].toggle()):"Radio"===this.selectType&&(this.radio=e)}},render:function(){var e=this;return u("div",{class:$},[u("div",{class:oe},[c("全部声部")]),u("div",{class:K},[this.subjectList.length?"Checkbox"===this.selectType?u(q,{modelValue:this.checkBox,"onUpdate:modelValue":function(t){return e.checkBox=t},max:this.max},{default:function(){return[!e.single&&e.subjectList.map((function(t){return t.subjects&&t.subjects.length>0?u(s,null,[u("div",{class:Z},[t.name]),u("div",{class:ee},[t.subjects&&t.subjects.map((function(t){return u("div",{class:te,onClick:function(){return e.onSelect(t.id)}},[u(U,{src:t.img||"xxx",width:"100%",height:"100%",fit:"cover"},{loading:function(){return u(l,{type:"spinner",size:20},null)}}),u("div",{class:ne},[u(A,{name:t.id,class:re,disabled:!0,ref:function(n){return e.checkboxRefs[t.id]=n}},{icon:function(e){return u(d,{name:e.checked?F:G,size:"20"},null)}}),u("p",{class:ie},[t.name])])])}))])]):null})),e.single?u("div",{class:ee},[e.subjectList.map((function(t){return u("div",{class:te,onClick:function(){return e.onSelect(t.id)}},[u(U,{src:t.img||"xxx",width:"100%",height:"100%",fit:"cover"},{loading:function(){return u(l,{type:"spinner",size:20},null)}}),u("div",{class:ne},[u(A,{name:t.id,class:re,disabled:!0,ref:function(n){return e.checkboxRefs[t.id]=n}},{icon:function(e){return u(d,{name:e.checked?F:G,size:"20"},null)}}),u("p",{class:ie},[t.name])])])}))]):null]}}):u(z,{modelValue:this.radio,"onUpdate:modelValue":function(t){return e.radio=t}},{default:function(){return[!e.single&&e.subjectList.map((function(t){return t.subjects&&t.subjects.length>0?u(s,null,[u("div",{class:Z},[t.name]),u("div",{class:ee},[t.subjects&&t.subjects.map((function(t){return u("div",{class:te,onClick:function(){return e.onSelect(t.id)}},[u(U,{src:t.img||"xxx",width:"100%",height:"100%",fit:"cover"},{loading:function(){return u(l,{type:"spinner",size:20},null)}}),u("div",{class:ne},[u(O,{name:t.id,class:re},{icon:function(e){return u(d,{name:e.checked?F:G,size:"20"},null)}}),u("p",{class:ie},[t.name])])])}))])]):null})),e.single?u("div",{class:ee},[e.subjectList.map((function(t){return u("div",{class:te,onClick:function(){return e.onSelect(t.id)}},[u(U,{src:t.img||"xxx",width:"100%",height:"100%",fit:"cover"},{loading:function(){return u(l,{type:"spinner",size:20},null)}}),u("div",{class:ne},[u(O,{name:t.id,class:re},{icon:function(e){return u(d,{name:e.checked?F:G,size:"20"},null)}}),u("p",{class:ie},[t.name])])])}))]):null]}}):u(f,{tips:"暂无声部数据",btnStatus:!1},null)]),this.subjectList.length>0&&u(E,{offsetBottom:0,position:"bottom"},{default:function(){return[u("div",{class:["btnGroup",ae]},[u(_,{round:!0,block:!0,onClick:function(){e.checkBox=[],e.radio="",e.onChoice()}},{default:function(){return[c("重置")]}}),u(_,{round:!0,block:!0,type:"primary",onClick:function(){return e.onChoice("Checkbox"===e.selectType?e.checkBox:e.radio)}},{default:function(){return[c("确定")]}})])]}})])}}),ce=i({name:"SelectStudents",props:{subjectList:{type:Array,default:[]},onSetStudents:{type:Function,default:function(e){}}},setup:function(e,n){var r=n.expose,i=m(!1),s=m("全部声部"),l=p({courseId:void 0,subjectId:void 0,userName:void 0}),f=m([]),y=function(){var e=o(regeneratorRuntime.mark((function e(){var n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.post("/api-teacher/courseSchedule/selectStudent",{data:t({},l)});case 3:n=e.sent,r=n.code,i=n.data,200===r&&(i.rows.forEach((function(e){return e.checked=!1})),f.value=i.rows),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(0);case 11:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}();h((function(){y()}));var k=function(e){l.userName=e||"",y()};return r({onDelete:function(e){f.value.forEach((function(t){t.userId===e.userId&&(t.checked=!1)}))}}),function(){return u("div",{class:X.container},[u(E,{offsetTop:0},{default:function(){return[u(V,{title:"选择学员"},null),u(H,{placeholder:"请输入学员名称",onSearch:k},{left:function(){return u("div",{class:X.label,onClick:function(){i.value=!0}},[s.value,u(d,{classPrefix:"iconfont",name:"down",size:12,color:"#333"},null)])}})]}}),f.value.map((function(e){return u("div",{onClick:function(){!function(e){var t=f.value.filter((function(e){return e.checked}));7!==t.length||e.checked?e.checked=!e.checked:a("最多选择7个学员")}(e)}},[u(Y,{item:e},{default:function(){return[u("div",{class:X.check},[u(A,{modelValue:e.checked,name:e.userId},null)])]}})])})),u("div",{class:X.btnGroup},[u(_,{block:!0,round:!0,class:X.confirmBtn,type:"primary",onClick:function(){var t=b(f.value.filter((function(e){return e.checked})));e.onSetStudents&&e.onSetStudents(t)}},{default:function(){return[c("确认")]}})]),u(g,{show:i.value,"onUpdate:show":function(e){return i.value=e},position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0},{default:function(){return[u(ue,{class:X.voicePopupContent,single:!0,selectType:"Radio",subjectList:e.subjectList,onChoice:function(t){var n=e.subjectList.filter((function(e){return e.id===t}))[0]||{name:"全部声部"};l.subjectId=n.id,s.value=n.name,i.value=!1,y()}},null)]}})])}}}),se={"is-link":!0,readonly:!0,"arrow-direction":"down"},le=(e("C",i({name:"ClassArrangement",props:{onSubmit:{type:Function,default:function(){}}},setup:function(e){var t=m(!1);Q=p({courseName:"",classNum:1,singleClassTime:"",freeCourseMinutes:"",studentIds:[],subjectId:0,subjectName:"",week:"",isSkipHolidays:!0,startTime:"",endTime:""});var n=m(""),r=m([]),i=function(e){r.value=e,Q.studentIds=r.value,t.value=!1},a=m(!1),l=m([]),d=function(){var e=o(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.post("/api-teacher/teacher/querySubject");case 3:t=e.sent,l.value=t.data||[],e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}();h((function(){d()}));var f=m([]),b=m(!1),x=function(){var e=o(regeneratorRuntime.mark((function e(){var t,n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.get("/api-teacher/sysConfig/queryByParamNameList",{params:{paramNames:"course_start_setting,course_end_setting,piano_time_setting"}});case 3:if(200===(t=e.sent).code)for(n=0,r=t.data.length;n<r;n++)if("course_start_setting"===t.data[n].paramName&&(Q.startTime=t.data[n].paramValue),"course_end_setting"===t.data[n].paramName&&(Q.endTime=t.data[n].paramValue),"course_start_setting"===t.data[n].paramName&&(Q.startTime=t.data[n].paramValue),"piano_time_setting"===t.data[n].paramName){i=[];try{i=JSON.parse(t.data[n].paramValue)}catch(a){}f.value=i}e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),j=y((function(){var e=[];return f.value.forEach((function(t){e.push({name:t.courseMinutes+"分钟"})})),e}));return h((function(){x()})),m(""),function(){return u(s,null,[u(J,{scrollToError:!0,onSubmit:function(){e.onSubmit&&e.onSubmit(Q)}},{default:function(){return[u("div",{class:W.container},[u(P,{label:"课程名称",placeholder:"请输入课程名称",maxlength:20,name:"courseName",modelValue:Q.courseName,"onUpdate:modelValue":function(e){return Q.courseName=e},rules:[{required:!0,message:"请输入您的课程名称"}]},null),u(P,k({label:"训练声部",placeholder:"请选择训练声部"},se,{name:"subjectName",modelValue:Q.subjectName,onClick:function(){return a.value=!0},rules:[{required:!0,message:"请选择训练声部"}]}),null),u(I,{style:{padding:0}},{default:function(){return[u(P,k({name:"students",class:W.student,border:!1,label:"上课学员",placeholder:"请选择上课学员",modelValue:r.value.length},se,{onClick:function(){return t.value=!0},rules:[{required:!0,validator:function(){return!!r.value.length},message:"请选择上课学员"}]}),null),r.value.length?u("div",{class:W.tags},[r.value.map((function(e,t){return u(R,{closeable:!0,onClose:function(){return function(e){var t=r.value.splice(e,1)[0];null==n||n.value.onDelete(t)}(t)}},{default:function(){return[e.userName]}})}))]):null]}}),u(P,{label:"课时数",placeholder:"请输入课时数"},{input:function(){return u(B,{"disable-input":!0,modelValue:Q.classNum,"onUpdate:modelValue":function(e){return Q.classNum=e}},null)}}),u(P,k({class:W.singleClassTime,label:"单课时时长"},se,{modelValue:Q.singleClassTime,onClick:function(){return b.value=!0},rules:[{required:!0,message:"请选择单课时时长"}]}),null),u(I,{title:"是否跳过节假日"},{value:function(){return u(z,{class:W.holdays,modelValue:Q.isSkipHolidays,"onUpdate:modelValue":function(e){return Q.isSkipHolidays=e}},{default:function(){return[u(O,{name:!0,style:{marginRight:"10px"}},{default:function(){return[c("是")]}}),u(O,{name:!1},{default:function(){return[c("否")]}})]}})}}),u(I,null,{title:function(){return u("div",{class:W.tips},[u("img",{class:W.icon,src:M},null),u("span",null,[c("温馨提醒")])])},label:function(){return u("div",{class:W.tipsContent},[c("1、云酷琴房时长按课程学生人数扣减,以45分钟1对2课程为例,课程结束后将消耗时长:2人*45分钟=90分钟;"),u("br",null,null),u("br",null,null),c("2、每节线上课平台赠送10分钟免费时长,分别为课前5分钟及课后5分钟,赠送时长不计算费用;"),u("br",null,null),u("br",null,null),c("3、课程消耗时长按排课人数计算,无论实际到课人数是否为排课人数,都会按照排课人数扣费;"),u("br",null,null),u("br",null,null),c("4、课程结束后费用立即结算;"),u("br",null,null),u("br",null,null),c("5、琴房时长不足时,您将无法排课,请确保琴房剩余时长充足。")])}}),u(_,{block:!0,type:"primary",round:!0,nativeType:"submit",style:{margin:"0 auto",width:"90%",marginTop:"20px"}},{default:function(){return[c("下一步")]}})])]}}),u(g,{show:a.value,"onUpdate:show":function(e){return a.value=e},position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0,class:W.voicePopup},{default:function(){return[u(ue,{class:W.voicePopupContent,single:!0,selectType:"Radio",subjectList:l.value,onChoice:function(e){var t=l.value.filter((function(t){return t.id===e}))[0];t?(Q.subjectId=t.id,Q.subjectName=t.name,a.value=!1):(Q.subjectId=0,Q.subjectName="")}},null)]}}),u(D,{modelValue:t.value,"onUpdate:modelValue":function(e){return t.value=e}},{default:function(){return[u(ce,{ref:n,subjectList:l.value,onSetStudents:i},null)]}}),u(N,{show:b.value,"onUpdate:show":function(e){return b.value=e},actions:j.value,cancelText:"取消",closeOnClickAction:!0,onSelect:function(e,t){Q.singleClassTime=f.value[t].courseMinutes,Q.freeCourseMinutes=f.value[t].freeMinutes}},null)])}}})),"_createClass_129c1_1"),de="_arrangeCell_129c1_4",fe="_rTitle_129c1_10",_e="_rTag_129c1_26",me="_tag_129c1_29",pe="_selectPopup_129c1_33",he="_selectContainer_129c1_38",be="_selectPopupContent_129c1_44",ge="_desc_129c1_47",ve="_times_129c1_48",ye="_selectBtn_129c1_59",ke="_btn_129c1_64",xe="_coursePopup_129c1_67",je="_box_12gfu_1",we="_wrap_12gfu_5",Ce="_title_12gfu_9",Te="_leftIcon_12gfu_19",Se="_stu_12gfu_26",Le="_timeBox_12gfu_30",Ne="_timeTitle_12gfu_38",Ie="_timeItem_12gfu_42",Pe="_footer_12gfu_46",ze=i({name:"CourseSchedule",props:{curriculum:{type:Array,default:[]},onClose:{type:Function,default:function(e){}},onComfirm:{type:Function,default:function(e){}}},setup:function(e){var t=y((function(){return Q.studentIds.map((function(e){return e.userName})).join("、")}));return function(){var n=Q.studentIds.length;return u("div",{class:je},[u("div",{class:Ce},[u("div",{class:Te},null),c("课程预览")]),u("div",{class:we},[u("div",{class:Se},[u("div",null,[c("您将为学员:"),u("span",{style:{color:"var(--van-primary)"}},[t.value])]),u("div",null,[c("排"),u("span",{style:{color:"#FF4E19",margin:"0 10px"}},[Q.classNum,c("节 "),Q.singleClassTime,c("分钟")]),c("课程")])]),u("div",{class:Le},[u("div",{class:Ne},[c("上课时间:")]),e.curriculum.map((function(e){return u("div",{class:Ie},[x(e.startTime||new Date).format("YYYY-MM-DD")," ",x(e.startTime||new Date).format("HH:mm"),c("~"),x(e.endTime||new Date).format("HH:mm")])}))]),u("div",{style:{color:"#999999"}},[c("以上课程预计将消耗琴房时长")," ",Math.ceil(n*Q.classNum*parseInt(Q.singleClassTime))," ",c("分钟 "),u("br",null,null),c("确认排课后时长冻结 "),u("br",null,null),c("实际消耗时长以扣减结果为准 "),u("br",null,null)])]),u("div",{class:Pe},[u(_,{block:!0,round:!0,onClick:function(){return e.onClose()}},{default:function(){return[c("重新选择")]}}),u(_,{block:!0,round:!0,type:"primary",onClick:function(){return e.onComfirm()}},{default:function(){return[c("确认排课")]}})])])}}}),Oe=e("a",i({name:"createClass",props:{active:{type:Number,default:1},onBack:{type:Function,default:function(){return function(){}}}},setup:function(e){j((function(){return e.active}),(function(e){2===e&&l()}));var i=p({calendarList:{},selectList:[]}),l=function(){var e=o(regeneratorRuntime.mark((function e(n){var r,a,o,u,c,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n||x().add(1,"day").toDate(),a={day:x(r).format("DD"),month:x(r).format("MM"),year:x(r).format("YYYY")},e.prev=2,e.next=5,v.post("/api-teacher/courseSchedule/createLiveCourseCalendar",{data:t(t({},a),{},{singleCourseMinutes:Q.singleClassTime,freeCourseMinutes:Q.freeCourseMinutes,teacherId:null===(o=C.user.data)||void 0===o?void 0:o.userId})});case 5:u=e.sent,c=u.data||[],s={},c.forEach((function(e){s[e.date]=e})),i.calendarList=s,e.next=14;break;case 12:e.prev=12,e.t0=e.catch(2);case 14:case"end":return e.stop()}}),e,null,[[2,12]])})));return function(t){return e.apply(this,arguments)}}(),d=function(e){e.sort((function(e,t){return e.startTime>t.startTime?1:e.startTime<t.startTime?-1:0})),i.selectList=e},f=y((function(){var e=r(i.selectList);return e.forEach((function(e){e.title=x(e.startTime).format("YYYY-MM-DD")+" "+T(x(e.startTime).day())+" "+e.start+"~"+e.end})),e})),h=y((function(){return i.selectList.length<Q.classNum?"noEnough":"enough"})),b=m(!1),k=function(){var e=o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(i.selectList.length<=0)){e.next=3;break}return a("请选择课程时间"),e.abrupt("return");case 3:if(!(i.selectList.length<Q.classNum)){e.next=6;break}return b.value=!0,e.abrupt("return");case 6:z.value=!0;case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=function(){var e=o(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("noEnough"!==h.value){e.next=10;break}return n=[],i.selectList.forEach((function(e){n.push({startTime:e.startTime,endTime:e.endTime})})),console.log(i.selectList),e.next=6,v.post("/api-teacher/courseGroup/lockCourseToCache",{data:{courseNum:Q.classNum,courseType:"PIANO_ROOM_CLASS",loop:1,teacherId:null===(t=C.user.data)||void 0===t?void 0:t.userId,timeList:[].concat(n)}});case 6:200===(r=e.sent).code&&(r.data.forEach((function(e){e.start=x(e.startTime).format("HH:mm"),e.end=x(e.endTime).format("HH:mm")})),i.selectList=r.data),e.next=12;break;case 10:b.value=!1,L((function(){z.value=!0}));case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=w(),z=m(!1),O=function(){var e=o(regeneratorRuntime.mark((function e(){var t,n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.selectList,n=Q.studentIds.length,e.prev=2,e.next=5,v.post("/api-teacher/courseSchedule/arrangeCourse",{data:{classNum:Q.classNum,consumeTime:Math.ceil(n*Q.classNum*parseInt(Q.singleClassTime)),courseName:Q.courseName,singleClssTime:Q.singleClassTime,studentIds:Q.studentIds.map((function(e){return e.userId})),subjectId:Q.subjectId,timeList:t}});case 5:r=e.sent,o=r.code,r.data,200===o&&(z.value=!1,setTimeout((function(){a({icon:"success",message:"排课成功",duration:1500,onClose:function(){P.back()}})}),100)),e.next=13;break;case 11:e.prev=11,e.t0=e.catch(2);case 13:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(){return e.apply(this,arguments)}}();return function(){return u("div",{class:le},[2===e.active&&u(n,{maxDays:Q.classNum,list:i.calendarList,prevMonth:function(e){return l(e)},nextMonth:function(e){return l(e)},selectDay:d,selectList:i.selectList,isSkipHolidays:Q.isSkipHolidays},null),u(I,{class:[de,"mb12"]},{title:function(){return u("div",{class:fe},[u("span",null,[c("已选择课程时间")])])},label:function(){return u("div",{class:_e},[f.value.map((function(e){return u(s,null,[u(R,{plain:!0,round:!0,closeable:!0,size:"large",type:"primary",class:me,onClose:function(){return function(e){S.confirm({title:"提示",message:"您是否要删除该选择的课程?",confirmButtonColor:"var(--van-primary)"}).then((function(){var t=i.selectList.findIndex((function(t){return t.startTime===e.startTime}));i.selectList.splice(t,1)}))}(e)}},{default:function(){return[e.title]}}),u("br",null,null)])}))])}}),u(E,{offsetBottom:0,position:"bottom"},{default:function(){return[u("div",{class:["btnGroup","btnMore"]},[u(_,{block:!0,round:!0,type:"primary",plain:!0,onClick:function(){e.onBack&&e.onBack(),i.selectList=[]}},{default:function(){return[c("上一步")]}}),u(_,{block:!0,round:!0,type:"primary",onClick:function(){return k()}},{default:function(){return[c("下一步")]}})])]}}),u(g,{show:b.value,class:pe},{default:function(){return[u("div",{class:he},[u("div",{class:fe},[u("span",null,[c("提示")])]),u("div",{class:be},[u("p",{class:ge},["noEnough"===h.value?"您所选择的上课时间未达到您输入的课时数,系统根据已选时间将自动按周顺延排课。":"您已选择以下上课时间段,时间段会暂时锁定,锁定期间学员不可购买该时间段课程。"]),"enough"===h.value&&u("p",{class:ve},[i.selectList.map((function(e){return u("span",null,[x(e.startTime||new Date).format("YYYY-MM-DD")," ",x(e.startTime||new Date).format("HH:mm"),c("~"),x(e.endTime||new Date).format("HH:mm")])}))])]),u("div",{class:ye},[u(_,{class:ke,type:"primary",round:!0,block:!0,plain:!0,onClick:function(){return b.value=!1}},{default:function(){return["noEnough"===h.value?"继续选择":"重新选择"]}}),u(_,{class:ke,type:"primary",round:!0,block:!0,onClick:function(){return N()}},{default:function(){return[c("确认")]}})])])]}}),u(g,{position:"bottom",class:xe,show:z.value,"onUpdate:show":function(e){return z.value=e},closeable:!0,round:!0},{default:function(){return[u(ze,{curriculum:i.selectList,onClose:function(){z.value=!1},onComfirm:function(){O()}},null)]}})])}}})),Be=Object.freeze(Object.defineProperty({__proto__:null,default:Oe},Symbol.toStringTag,{value:"Module"}));e("i",Be)}}}))}();