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(["./ResizeObserver.es-legacy.9ef5ac8c.js","./index-legacy.263428a7.js","./index-legacy.bc6a9c7f.js","./index-legacy.e9381954.js","./index-legacy.b5b73462.js","./index-legacy.b0e8bd5d.js","./index-legacy.5893ff71.js","./index-legacy.6faf7cc4.js","./index-legacy.31c9aada.js","./icon_tips-legacy.1911ff27.js","./index-legacy.a455b978.js","./index-legacy.402479d8.js","./index-legacy.46228add.js","./index-legacy.cb998bd0.js","./index-legacy.49dc34f1.js","./index-legacy.9fab68bf.js","./index-legacy.8802e914.js","./checkbox_default-legacy.bcfda9cf.js","./index-legacy.40bbaa1c.js","./index-legacy.5ed99b3c.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,R,B,M,D,V,H,A,E,Y,U,F,G,q,J;return{setters:[function(e){n=e.d,i=e.T,a=e.j,u=e.A,c=e.F,s=e.aT,l=e.N,d=e.C,f=e.B,_=e.U,m=e.S,p=e.V,h=e.s,b=e.aS,g=e.y,v=e.W,y=e.a8,k=e.w,x=e.a3,j=e.bd,w=e.Q,C=e.g,T=e.D,S=e.X},function(e){L=e.C},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){R=e.S},function(e){B=e.T},function(e){M=e.i},function(e){D=e.C},function(e){V=e.C},function(e){H=e.S},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.b},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=n({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)||i("乐器最多选择".concat(this.max,"个")),this.checkboxRefs[e].toggle()):"Radio"===this.selectType&&(this.radio=e)}},render:function(){var e=this;return a("div",{class:$},[a("div",{class:oe},[u("全部声部")]),a("div",{class:K},[this.subjectList.length?"Checkbox"===this.selectType?a(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?a(c,null,[a("div",{class:Z},[t.name]),a("div",{class:ee},[t.subjects&&t.subjects.map((function(t){return a("div",{class:te,onClick:function(){return e.onSelect(t.id)}},[a(U,{src:t.img||"xxx",width:"100%",height:"100%",fit:"cover"},{loading:function(){return a(s,{type:"spinner",size:20},null)}}),a("div",{class:ne},[a(A,{name:t.id,class:re,disabled:!0,ref:function(n){return e.checkboxRefs[t.id]=n}},{icon:function(e){return a(l,{name:e.checked?F:G,size:"20"},null)}}),a("p",{class:ie},[t.name])])])}))])]):null})),e.single?a("div",{class:ee},[e.subjectList.map((function(t){return a("div",{class:te,onClick:function(){return e.onSelect(t.id)}},[a(U,{src:t.img||"xxx",width:"100%",height:"100%",fit:"cover"},{loading:function(){return a(s,{type:"spinner",size:20},null)}}),a("div",{class:ne},[a(A,{name:t.id,class:re,disabled:!0,ref:function(n){return e.checkboxRefs[t.id]=n}},{icon:function(e){return a(l,{name:e.checked?F:G,size:"20"},null)}}),a("p",{class:ie},[t.name])])])}))]):null]}}):a(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?a(c,null,[a("div",{class:Z},[t.name]),a("div",{class:ee},[t.subjects&&t.subjects.map((function(t){return a("div",{class:te,onClick:function(){return e.onSelect(t.id)}},[a(U,{src:t.img||"xxx",width:"100%",height:"100%",fit:"cover"},{loading:function(){return a(s,{type:"spinner",size:20},null)}}),a("div",{class:ne},[a(O,{name:t.id,class:re},{icon:function(e){return a(l,{name:e.checked?F:G,size:"20"},null)}}),a("p",{class:ie},[t.name])])])}))])]):null})),e.single?a("div",{class:ee},[e.subjectList.map((function(t){return a("div",{class:te,onClick:function(){return e.onSelect(t.id)}},[a(U,{src:t.img||"xxx",width:"100%",height:"100%",fit:"cover"},{loading:function(){return a(s,{type:"spinner",size:20},null)}}),a("div",{class:ne},[a(O,{name:t.id,class:re},{icon:function(e){return a(l,{name:e.checked?F:G,size:"20"},null)}}),a("p",{class:ie},[t.name])])])}))]):null]}}):a(d,{tips:"暂无声部数据",btnStatus:!1},null)]),this.subjectList.length>0&&a(E,{offsetBottom:0,position:"bottom"},{default:function(){return[a("div",{class:["btnGroup",ae]},[a(f,{round:!0,block:!0,onClick:function(){e.checkBox=[],e.radio="",e.onChoice()}},{default:function(){return[u("重置")]}}),a(f,{round:!0,block:!0,type:"primary",onClick:function(){return e.onChoice("Checkbox"===e.selectType?e.checkBox:e.radio)}},{default:function(){return[u("确定")]}})])]}})])}}),ce=n({name:"SelectStudents",props:{subjectList:{type:Array,default:[]},onSetStudents:{type:Function,default:function(e){}}},setup:function(e,n){var r=n.expose,c=_(!1),s=_("全部声部"),d=m({courseId:void 0,subjectId:void 0,userName:void 0}),v=_([]),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,g.post("/api-teacher/courseSchedule/selectStudent",{data:t({},d)});case 3:n=e.sent,r=n.code,i=n.data,200===r&&(i.rows.forEach((function(e){return e.checked=!1})),v.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)}}();p((function(){y()}));var k=function(e){d.userName=e||"",y()};return r({onDelete:function(e){v.value.forEach((function(t){t.userId===e.userId&&(t.checked=!1)}))}}),function(){return a("div",{class:X.container},[a(E,{offsetTop:0},{default:function(){return[a(V,{title:"选择学员"},null),a(H,{placeholder:"请输入学员名称",onSearch:k},{left:function(){return a("div",{class:X.label,onClick:function(){c.value=!0}},[s.value,a(l,{classPrefix:"iconfont",name:"down",size:12,color:"#333"},null)])}})]}}),v.value.map((function(e){return a("div",{onClick:function(){!function(e){var t=v.value.filter((function(e){return e.checked}));7!==t.length||e.checked?e.checked=!e.checked:i("最多选择7个学员")}(e)}},[a(Y,{item:e},{default:function(){return[a("div",{class:X.check},[a(A,{modelValue:e.checked,name:e.userId},null)])]}})])})),a("div",{class:X.btnGroup},[a(f,{block:!0,round:!0,class:X.confirmBtn,type:"primary",onClick:function(){var t=h(v.value.filter((function(e){return e.checked})));e.onSetStudents&&e.onSetStudents(t)}},{default:function(){return[u("确认")]}})]),a(b,{show:c.value,"onUpdate:show":function(e){return c.value=e},position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0},{default:function(){return[a(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:"全部声部"};d.subjectId=n.id,s.value=n.name,c.value=!1,y()}},null)]}})])}}}),se={"is-link":!0,readonly:!0,"arrow-direction":"down"},le=(e("C",n({name:"ClassArrangement",props:{onSubmit:{type:Function,default:function(){}}},setup:function(e){var t=_(!1);Q=m({courseName:"",classNum:1,singleClassTime:"",freeCourseMinutes:"",studentIds:[],subjectId:0,subjectName:"",week:"",isSkipHolidays:!0,startTime:"",endTime:""});var n=_(""),r=_([]),i=function(e){r.value=e,Q.studentIds=r.value,t.value=!1},s=_(!1),l=_([]),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,g.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)}}();p((function(){d()}));var h=_([]),k=_(!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,g.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){}h.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=v((function(){var e=[];return h.value.forEach((function(t){e.push({name:t.courseMinutes+"分钟"})})),e}));return p((function(){x()})),_(""),function(){return a(c,null,[a(J,{scrollToError:!0,onSubmit:function(){e.onSubmit&&e.onSubmit(Q)}},{default:function(){return[a("div",{class:W.container},[a(P,{label:"课程名称",placeholder:"请输入课程名称",maxlength:20,name:"courseName",modelValue:Q.courseName,"onUpdate:modelValue":function(e){return Q.courseName=e},rules:[{required:!0,message:"请输入您的课程名称"}]},null),a(P,y({label:"训练声部",placeholder:"请选择训练声部"},se,{name:"subjectName",modelValue:Q.subjectName,onClick:function(){return s.value=!0},rules:[{required:!0,message:"请选择训练声部"}]}),null),a(I,{style:{padding:0}},{default:function(){return[a(P,y({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?a("div",{class:W.tags},[r.value.map((function(e,t){return a(B,{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]}}),a(P,{label:"课时数",placeholder:"请输入课时数"},{input:function(){return a(R,{"disable-input":!0,modelValue:Q.classNum,"onUpdate:modelValue":function(e){return Q.classNum=e}},null)}}),a(P,y({class:W.singleClassTime,label:"单课时时长"},se,{modelValue:Q.singleClassTime,onClick:function(){return k.value=!0},rules:[{required:!0,message:"请选择单课时时长"}]}),null),a(I,{title:"是否跳过节假日"},{value:function(){return a(z,{class:W.holdays,modelValue:Q.isSkipHolidays,"onUpdate:modelValue":function(e){return Q.isSkipHolidays=e}},{default:function(){return[a(O,{name:!0,style:{marginRight:"10px"}},{default:function(){return[u("是")]}}),a(O,{name:!1},{default:function(){return[u("否")]}})]}})}}),a(I,null,{title:function(){return a("div",{class:W.tips},[a("img",{class:W.icon,src:M},null),a("span",null,[u("温馨提醒")])])},label:function(){return a("div",{class:W.tipsContent},[u("1、云酷琴房时长按课程学生人数扣减,以45分钟1对2课程为例,课程结束后将消耗时长:2人*45分钟=90分钟;"),a("br",null,null),a("br",null,null),u("2、每节线上课平台赠送10分钟免费时长,分别为课前5分钟及课后5分钟,赠送时长不计算费用;"),a("br",null,null),a("br",null,null),u("3、课程消耗时长按排课人数计算,无论实际到课人数是否为排课人数,都会按照排课人数扣费;"),a("br",null,null),a("br",null,null),u("4、课程结束后费用立即结算;"),a("br",null,null),a("br",null,null),u("5、琴房时长不足时,您将无法排课,请确保琴房剩余时长充足。")])}}),a(f,{block:!0,type:"primary",round:!0,nativeType:"submit",style:{margin:"0 auto",width:"90%",marginTop:"20px"}},{default:function(){return[u("下一步")]}})])]}}),a(b,{show:s.value,"onUpdate:show":function(e){return s.value=e},position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0,class:W.voicePopup},{default:function(){return[a(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,s.value=!1):(Q.subjectId=0,Q.subjectName="")}},null)]}}),a(D,{modelValue:t.value,"onUpdate:modelValue":function(e){return t.value=e}},{default:function(){return[a(ce,{ref:n,subjectList:l.value,onSetStudents:i},null)]}}),a(N,{show:k.value,"onUpdate:show":function(e){return k.value=e},actions:j.value,cancelText:"取消",closeOnClickAction:!0,onSelect:function(e,t){Q.singleClassTime=h.value[t].courseMinutes,Q.freeCourseMinutes=h.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=n({name:"CourseSchedule",props:{curriculum:{type:Array,default:[]},onClose:{type:Function,default:function(e){}},onComfirm:{type:Function,default:function(e){}}},setup:function(e){var t=v((function(){return Q.studentIds.map((function(e){return e.userName})).join("、")}));return function(){var n=Q.studentIds.length;return a("div",{class:je},[a("div",{class:Ce},[a("div",{class:Te},null),u("课程预览")]),a("div",{class:we},[a("div",{class:Se},[a("div",null,[u("您将为学员:"),a("span",{style:{color:"var(--van-primary)"}},[t.value])]),a("div",null,[u("排"),a("span",{style:{color:"#FF4E19",margin:"0 10px"}},[Q.classNum,u("节 "),Q.singleClassTime,u("分钟")]),u("课程")])]),a("div",{class:Le},[a("div",{class:Ne},[u("上课时间:")]),e.curriculum.map((function(e){return a("div",{class:Ie},[k(e.startTime||new Date).format("YYYY-MM-DD")," ",k(e.startTime||new Date).format("HH:mm"),u("~"),k(e.endTime||new Date).format("HH:mm")])}))]),a("div",{style:{color:"#999999"}},[u("以上课程预计将消耗琴房时长")," ",Math.ceil(n*Q.classNum*parseInt(Q.singleClassTime))," ",u("分钟 "),a("br",null,null),u("确认排课后时长冻结 "),a("br",null,null),u("实际消耗时长以扣减结果为准 "),a("br",null,null)])]),a("div",{class:Pe},[a(f,{block:!0,round:!0,onClick:function(){return e.onClose()}},{default:function(){return[u("重新选择")]}}),a(f,{block:!0,round:!0,type:"primary",onClick:function(){return e.onComfirm()}},{default:function(){return[u("确认排课")]}})])])}}}),Oe=e("a",n({name:"createClass",props:{active:{type:Number,default:1},onBack:{type:Function,default:function(){return function(){return{}}}}},setup:function(e){x((function(){return e.active}),(function(e){2===e&&s()}));var n=m({calendarList:{},selectList:[]}),s=function(){var e=o(regeneratorRuntime.mark((function e(r){var i,a,o,u,c,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r||k().add(1,"day").toDate(),a={day:k(i).format("DD"),month:k(i).format("MM"),year:k(i).format("YYYY")},e.prev=2,e.next=5,g.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})),n.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)}}(),l=function(e){e.sort((function(e,t){return e.startTime>t.startTime?1:e.startTime<t.startTime?-1:0})),n.selectList=e},d=v((function(){var e=r(n.selectList);return e.forEach((function(e){e.title=k(e.startTime).format("YYYY-MM-DD")+" "+j(k(e.startTime).day())+" "+e.start+"~"+e.end})),e})),p=v((function(){return n.selectList.length<Q.classNum?"noEnough":"enough"})),h=_(!1),y=function(){var e=o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n.selectList.length<=0)){e.next=3;break}return i("请选择课程时间"),e.abrupt("return");case 3:if(!(n.selectList.length<Q.classNum)){e.next=6;break}return h.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,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("noEnough"!==p.value){e.next=10;break}return r=[],n.selectList.forEach((function(e){r.push({startTime:e.startTime,endTime:e.endTime})})),console.log(n.selectList),e.next=6,g.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(r)}});case 6:200===(i=e.sent).code&&(i.data.forEach((function(e){e.start=k(e.startTime).format("HH:mm"),e.end=k(e.endTime).format("HH:mm")})),n.selectList=i.data),e.next=12;break;case 10:h.value=!1,S((function(){z.value=!0}));case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=w(),z=_(!1),O=function(){var e=o(regeneratorRuntime.mark((function e(){var t,r,a,o,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.selectList,r=Q.studentIds.length,e.prev=2,e.next=5,g.post("/api-teacher/courseSchedule/arrangeCourse",{data:{classNum:Q.classNum,consumeTime:Math.ceil(r*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:a=e.sent,o=a.code,u=a.data,200===o&&(z.value=!1,u?setTimeout((function(){i({message:u,duration:1500,onClose:function(){P.back()}})}),100):setTimeout((function(){i({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 a("div",{class:le},[2===e.active&&a(L,{maxDays:Q.classNum,list:n.calendarList,prevMonth:function(e){return s(e)},nextMonth:function(e){return s(e)},selectDay:l,selectList:n.selectList,isSkipHolidays:Q.isSkipHolidays},null),a(I,{class:[de,"mb12"]},{title:function(){return a("div",{class:fe},[a("span",null,[u("已选择课程时间")])])},label:function(){return a("div",{class:_e},[d.value.map((function(e){return a(c,null,[a(B,{plain:!0,round:!0,closeable:!0,size:"large",type:"primary",class:me,onClose:function(){return function(e){T.confirm({title:"提示",message:"您是否要删除该选择的课程?",confirmButtonColor:"var(--van-primary)"}).then((function(){var t=n.selectList.findIndex((function(t){return t.startTime===e.startTime}));n.selectList.splice(t,1)}))}(e)}},{default:function(){return[e.title]}}),a("br",null,null)])}))])}}),a(E,{offsetBottom:0,position:"bottom"},{default:function(){return[a("div",{class:["btnGroup","btnMore"]},[a(f,{block:!0,round:!0,type:"primary",plain:!0,onClick:function(){e.onBack&&e.onBack(),n.selectList=[]}},{default:function(){return[u("上一步")]}}),a(f,{block:!0,round:!0,type:"primary",onClick:function(){return y()}},{default:function(){return[u("下一步")]}})])]}}),a(b,{show:h.value,class:pe},{default:function(){return[a("div",{class:he},[a("div",{class:fe},[a("span",null,[u("提示")])]),a("div",{class:be},[a("p",{class:ge},["noEnough"===p.value?"您所选择的上课时间未达到您输入的课时数,系统根据已选时间将自动按周顺延排课。":"您已选择以下上课时间段,时间段会暂时锁定,锁定期间学员不可购买该时间段课程。"]),"enough"===p.value&&a("p",{class:ve},[n.selectList.map((function(e){return a("span",null,[k(e.startTime||new Date).format("YYYY-MM-DD")," ",k(e.startTime||new Date).format("HH:mm"),u("~"),k(e.endTime||new Date).format("HH:mm")])}))])]),a("div",{class:ye},[a(f,{class:ke,type:"primary",round:!0,block:!0,plain:!0,onClick:function(){return h.value=!1}},{default:function(){return["noEnough"===p.value?"继续选择":"重新选择"]}}),a(f,{class:ke,type:"primary",round:!0,block:!0,onClick:function(){return N()}},{default:function(){return[u("确认")]}})])])]}}),a(b,{position:"bottom",class:xe,show:z.value,"onUpdate:show":function(e){return z.value=e},closeable:!0,round:!0},{default:function(){return[a(ze,{curriculum:n.selectList,onClose:function(){z.value=!1},onComfirm:function(){O()}},null)]}})])}}})),Re=Object.freeze(Object.defineProperty({__proto__:null,default:Oe},Symbol.toStringTag,{value:"Module"}));e("i",Re)}}}))}();
|