chunk-4859b1e9.177a82b9.js 24 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4859b1e9"],{"02ce":function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"maskForm",staticClass:"maskForm",attrs:{model:t.maskForm,rules:t.maskRules,"label-position":"right","label-width":"120px",inline:!0}},[a("el-form-item",{attrs:{label:"主教老师",prop:"teacher"}},[a("el-select",{staticStyle:{width:"220px!important"},attrs:{clearable:"",filterable:""},on:{change:t.changeTeacher},model:{value:t.maskForm.teacher,callback:function(e){t.$set(t.maskForm,"teacher","string"===typeof e?e.trim():e)},expression:"maskForm.teacher"}},t._l(t.teacherList,(function(t,e){return a("el-option",{key:e,attrs:{value:t.id,label:t.realName}})})),1)],1),t._v(" "),"MUSIC_NETWORK"!=t.maskForm.type&&"HIGH_ONLINE"!=t.maskForm.type&&"MUSIC"==t.maskForm.groupType?a("el-form-item",{attrs:{label:"助教老师",prop:"assistant"}},[a("el-select",{staticStyle:{width:"220px!important"},attrs:{clearable:"",filterable:"",multiple:"","collapse-tags":""},model:{value:t.maskForm.assistant,callback:function(e){t.$set(t.maskForm,"assistant","string"===typeof e?e.trim():e)},expression:"maskForm.assistant"}},t._l(t.teacherList,(function(t,e){return a("el-option",{key:e,attrs:{value:t.id,label:t.realName}})})),1)],1):t._e(),t._v(" "),a("el-form-item",{attrs:{label:"上课日期",prop:"date"}},[a("el-date-picker",{attrs:{type:"date","picker-options":{firstDayOfWeek:1},"value-format":"yyyy-MM-dd",placeholder:"选择日期"},model:{value:t.maskForm.date,callback:function(e){t.$set(t.maskForm,"date","string"===typeof e?e.trim():e)},expression:"maskForm.date"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"课程时长(分钟)",prop:"timer"}},[a("el-input",{staticStyle:{width:"220px!important"},attrs:{type:"number",disabled:t.isDisabled},model:{value:t.maskForm.timer,callback:function(e){t.$set(t.maskForm,"timer",e)},expression:"maskForm.timer"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"开始时间",prop:"startTime"}},[a("el-time-picker",{attrs:{placeholder:"起始时间",format:"HH:mm","value-format":"HH:mm","picker-options":{selectableRange:"04:30:00 - 23:30:00"}},on:{change:t.changeStartTime},model:{value:t.maskForm.startTime,callback:function(e){t.$set(t.maskForm,"startTime","string"===typeof e?e.trim():e)},expression:"maskForm.startTime"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"结束时间",prop:"endTime"}},[a("el-time-picker",{attrs:{placeholder:"结束时间",disabled:"",format:"HH:mm","value-format":"HH:mm","picker-options":{start:"04:30",step:"00:05",end:"23:30",minTime:t.maskForm.startTime}},model:{value:t.maskForm.endTime,callback:function(e){t.$set(t.maskForm,"endTime","string"===typeof e?e.trim():e)},expression:"maskForm.endTime"}})],1),t._v(" "),"VIP"==t.maskForm.type?a("el-form-item",{attrs:{label:"课程类型",prop:"courseType"}},[a("el-select",{staticStyle:{width:"220px!important"},attrs:{clearable:""},model:{value:t.maskForm.teachMode,callback:function(e){t.$set(t.maskForm,"teachMode","string"===typeof e?e.trim():e)},expression:"maskForm.teachMode"}},[a("el-option",{attrs:{label:"线上课",value:"ONLINE"}}),t._v(" "),a("el-option",{attrs:{label:"线下课",value:"OFFLINE"}})],1)],1):t._e(),t._v(" "),"OFFLINE"==t.maskForm.teachMode&&"VIP"==t.maskForm.type?a("el-form-item",{attrs:{label:"教学地点"}},[a("el-select",{staticStyle:{width:"220px!important"},attrs:{filterable:"",clearable:""},model:{value:t.maskForm.address,callback:function(e){t.$set(t.maskForm,"address","string"===typeof e?e.trim():e)},expression:"maskForm.address"}},t._l(t.schoolList,(function(t,e){return a("el-option",{key:e,attrs:{value:t.id,label:t.name}})})),1)],1):t._e()],1),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:t.$listeners.closeReset}},[t._v("取 消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.submitResetClass}},[t._v("确 定")])],1)],1)},n=[],s=a("c466"),i=a("1cc7"),o=a("8018"),c=a("e3eb"),u=a.n(c),l=a("5a0c"),d=a.n(l),m={props:["show","id","isDisabled"],data:function(){return{courseVisible:!1,maskForm:{teacher:null,assistant:null,date:null,timer:null,startTime:null,endTime:null},maskRules:{teacher:[{required:!0,message:"请选择主教老师名称",trigger:"blur"}],date:[{required:!0,message:"请选择上课时间",trigger:"blur"}],startTime:[{required:!0,message:"请选择上课开始时间",trigger:"blur"}],endTime:[{required:!0,message:"请选择上课结束时间",trigger:"blur"}]},teacherList:[],schoolList:[]}},mounted:function(){var t=this;Object(i["tb"])().then((function(e){200==e.code&&(t.teacherList=e.data)})),this.getDetail(this.id)},methods:{submitResetClass:function(){var t=this,e=this.maskForm;e.startTime&&e.endTime?this.$confirm("是否确定?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a=e.assistant.join(",");if(a.length<=0);var r={actualTeacherId:e.teacher,startClassTimeStr:e.startTime,endClassTimeStr:e.endTime,id:e.id,teachingTeacherIdList:a,classDate:e.date,type:e.type,groupType:e.groupType,schoolId:t.maskForm.address,teachMode:t.maskForm.teachMode};Object(i["Ub"])(u()(r)).then((function(e){200==e.code&&(t.$message.success("修改成功"),t.$emit("getList"),t.$emit("closeReset"))}))})).catch((function(){})):this.$message.error("请填写开始时间或结束时间")},changeStartTime:function(t){var e=this;this.$nextTick((function(a){console.log(e.maskForm.date,t,e.maskForm.timer),console.log(Object(s["a"])(e.maskForm.date,t,e.maskForm.timer)),t?e.$set(e.maskForm,"endTime",Object(s["a"])(e.maskForm.date,t,e.maskForm.timer)):e.$set(e.maskForm,"endTime","")}))},changeTeacher:function(t){var e=this;t&&(Object(o["f"])({userId:t}).then((function(t){200==t.code&&(e.schoolList=t.data)})),this.maskForm.address="")},getDetail:function(t){var e=this;Object(i["R"])({courseScheduleId:t}).then((function(t){if(200==t.code){for(var a in console.log(t.data.groupType),e.maskForm={id:t.data.id,teacher:t.data.actualTeacherId,assistant:[],date:d()(t.data.classDate).format("YYYY-MM-DD"),startTime:d()(t.data.startClassTime).format("HH:mm"),endTime:d()(t.data.endClassTime).format("HH:mm"),timer:null,type:t.data.type,groupType:t.data.groupType,schoolId:t.data.schoolId,teachMode:t.data.teachMode},e.maskForm.assistant=[],t.data.teachingTeachers)"TEACHING"==t.data.teachingTeachers[a].teacherRole&&e.maskForm.assistant.push(t.data.teachingTeachers[a].userId);var r=Object(s["b"])(d()(t.data.classDate).format("YYYY-MM-DD"),d()(t.data.startClassTime).format("HH:mm"),d()(t.data.endClassTime).format("HH:mm"));console.log(d()(t.data.startClassTime).format("HH:mm")),e.maskForm.timer=r,e.maskForm.teacher&&Object(o["f"])({userId:e.maskForm.teacher}).then((function(t){200==t.code&&(e.schoolList=t.data)}))}}))}},watch:{id:function(t){t&&this.getDetail(t)},"maskForm.timer":function(t){var e=this;this.$nextTick((function(a){t?e.$set(e.maskForm,"endTime",Object(s["a"])(e.maskForm.date,e.maskForm.startTime,t)):e.$set(e.maskForm,"endTime","")}))}}},h=m,p=(a("7b1a"),a("2877")),f=Object(p["a"])(h,r,n,!1,null,"8420dd2c",null);e["a"]=f.exports},"09f4":function(t,e,a){"use strict";a.d(e,"a",(function(){return i})),Math.easeInOutQuad=function(t,e,a,r){return t/=r/2,t<1?a/2*t*t+e:(t--,-a/2*(t*(t-2)-1)+e)};var r=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function n(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function s(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function i(t,e,a){var i=s(),o=t-i,c=20,u=0;e="undefined"===typeof e?500:e;var l=function t(){u+=c;var s=Math.easeInOutQuad(u,i,o,e);n(s),u<e?r(t):a&&"function"===typeof a&&a()};l()}},1353:function(t,e,a){},1963:function(t,e,a){},5120:function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.tableList.length>0?a("div",{staticClass:"tableWrap"},[a("el-table",{attrs:{data:t.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[a("el-table-column",{attrs:{align:"center",prop:"organName",label:"分部名称"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",width:"130px",prop:"musicGroupId",label:"乐团/课程组编号"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"id",label:"课程编号"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",width:"200px",label:"时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.startClassTime?e.row.startClassTime.substr(0,16):"")+"-"+t._s(e.row.endClassTime?e.row.endClassTime.substr(11,5):""))]}}],null,!1,2248027327)}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"studentId",label:"学生ID"},scopedSlots:t._u([{key:"default",fn:function(e){return["MUSIC"!=e.row.groupType?a("div",[t._v(t._s(e.row.studentId))]):t._e()]}}],null,!1,3891686512)}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"subjectName",label:"声部"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"name",label:"课程名称"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"课程类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(t._f("coursesType")(e.row.type)))])]}}],null,!1,2613307558)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"教学模式"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(t._f("teachMode")(e.row.teachMode)))])]}}],null,!1,465778248)}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"schoolName",label:"教学点"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(e.row.schoolName?e.row.schoolName:"网络教室"))])]}}],null,!1,699114148)}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"courseScheduleStatus",label:"课程状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(t._f("coursesStatus")(e.row.status)))])]}}],null,!1,3895776102)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作",fixed:"right",width:"180px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[!e.row.isSettlement&&t.permission("courseSchedule/classStartDateAdjust")&&"MUSIC"===e.row.groupType?a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.resetClass(e.row)}}},[t._v("调整")]):t._e(),t._v(" "),!e.row.isSettlement&&t.permission("courseSchedule/classStartDateAdjust")&&"VIP"===e.row.groupType?a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.resetClass(e.row)}}},[t._v("调整")]):t._e(),t._v(" "),!e.row.isSettlement&&t.permission("courseSchedule/practiceCourseAdjust")&&"PRACTICE"===e.row.groupType?a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.resetClass(e.row)}}},[t._v("调整")]):t._e(),t._v(" "),"PRACTICE"===e.row.groupType&&"NOT_START"==e.row.status&&"TRIAL"!=e.row.practiceGroup["type"]&&t.permission("courseSchedule/practiceCourseTeacherAdjust")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.resetTeacher(e.row)}}},[t._v("更换老师")]):t._e()],1)]}}],null,!1,326255397)})],1),t._v(" "),a("pagination",{attrs:{total:t.rules.total,page:t.rules.page,limit:t.rules.limit,"page-sizes":t.rules.page_size},on:{"update:page":function(e){return t.$set(t.rules,"page",e)},"update:limit":function(e){return t.$set(t.rules,"limit",e)},pagination:t.getList}})],1):t._e(),t._v(" "),a("el-dialog",{attrs:{title:"老师调整",width:"400px",visible:t.teacherVisible},on:{"update:visible":function(e){t.teacherVisible=e}}},[a("el-form",{ref:"teacherForm",attrs:{model:t.teacherForm,rules:t.teacherRules,"label-position":"right","label-width":"80px;",inline:!0}},[a("el-form-item",{attrs:{label:"指导老师"}},[a("el-select",{attrs:{filterable:"",clearable:""},model:{value:t.teacherForm.teacher,callback:function(e){t.$set(t.teacherForm,"teacher","string"===typeof e?e.trim():e)},expression:"teacherForm.teacher"}},t._l(t.teacherList,(function(t,e){return a("el-option",{key:e,attrs:{value:t.id,label:t.realName}})})),1)],1)],1),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.teacherVisible=!1}}},[t._v("取 消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.subresetTeacher}},[t._v("确 定")])],1)],1),t._v(" "),a("el-dialog",{attrs:{visible:t.show,width:"400px"},on:{"update:visible":function(e){t.show=e}}},[a("resetClass",{attrs:{show:t.show,id:t.id,isDisabled:!0},on:{closeReset:t.closeReset,getList:t.getList}})],1)],1)},n=[],s=(a("a481"),a("1cc7")),i=(a("c466"),a("8018"),a("333d")),o=a("ec8a"),c=a("02ce"),u=(a("5a0c"),{components:{pagination:i["a"],resetClass:c["a"]},props:["startTimes"],data:function(){return{startCourseTime:"",endCourseTime:"",startTime:this.startTimes,endTime:this.startTimes,teacherVisible:!1,teacherList:[],teacherForm:{teacher:null,courseScheduleId:null},teacherRules:{teacher:[{required:!0,message:"请选择老师",trigger:"blur"}],educationalTeacherId:[{required:!0,message:"请选择教务老师",trigger:"blur"}]},tableList:[],rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]},show:!1,id:null,teacherIdList:null}},mounted:function(){var t=this;this.teacherIdList=this.$route.query.teacherId,this.value=new Date,this.getList(),Object(s["tb"])().then((function(e){200==e.code&&(t.teacherList=e.data)}))},methods:{getList:function(){var t=this;this.$emit("getCalendatList"),this.startTime&&this.endTime&&Object(s["nc"])({teacherIdList:this.teacherIdList,page:this.rules.page,rows:this.rules.limit,startTime:this.startTime,endTime:this.endTime}).then((function(e){200==e.code&&(t.tableList=e.data.rows,t.rules.total=e.data.total)}))},setCourseList:function(t){console.LOG(t)},closeReset:function(){this.show=!1},permission:function(t,e){return Object(o["a"])(t,e)},resetClass:function(t){this.id=t.id,this.show=!0,this.value=new Date(t.classDate.replace(/-/g,"/"))},resetTeacher:function(t){this.teacherForm.teacher=t.actualTeacherId,this.teacherForm.courseScheduleId=t.id,this.teacherVisible=!0},subresetTeacher:function(){var t=this;this.$refs.teacherForm.validate((function(e){e&&Object(s["Mb"])({courseScheduleId:t.teacherForm.courseScheduleId,teacherId:t.teacherForm.teacher}).then((function(e){200==e.code&&(t.$message.success("修改成功"),t.teacherVisible=!1,t.getList())}))}))}},watch:{startTimes:function(t){this.startTime=t,this.endTime=t,this.getList()}}}),l=u,d=a("2877"),m=Object(d["a"])(l,r,n,!1,null,"2ab78664",null);e["a"]=m.exports},"7b1a":function(t,e,a){"use strict";var r=a("1353"),n=a.n(r);n.a},8018:function(t,e,a){"use strict";a.d(e,"w",(function(){return o})),a.d(e,"t",(function(){return c})),a.d(e,"g",(function(){return u})),a.d(e,"e",(function(){return l})),a.d(e,"i",(function(){return d})),a.d(e,"v",(function(){return m})),a.d(e,"u",(function(){return h})),a.d(e,"n",(function(){return p})),a.d(e,"B",(function(){return f})),a.d(e,"C",(function(){return g})),a.d(e,"y",(function(){return b})),a.d(e,"x",(function(){return v})),a.d(e,"A",(function(){return T})),a.d(e,"f",(function(){return y})),a.d(e,"q",(function(){return k})),a.d(e,"z",(function(){return _})),a.d(e,"s",(function(){return w})),a.d(e,"h",(function(){return L})),a.d(e,"m",(function(){return F})),a.d(e,"r",(function(){return D})),a.d(e,"a",(function(){return C})),a.d(e,"l",(function(){return O})),a.d(e,"o",(function(){return j})),a.d(e,"p",(function(){return I})),a.d(e,"k",(function(){return S})),a.d(e,"d",(function(){return M})),a.d(e,"c",(function(){return x})),a.d(e,"j",(function(){return $})),a.d(e,"b",(function(){return A}));var r=a("b775"),n=a("4328"),s=a.n(n),i="/api-web";function o(t){return Object(r["a"])({url:i+"/teacher/queryPage",method:"get",params:t})}function c(t){return Object(r["a"])({url:i+"/teacher/get",method:"get",params:t})}function u(t){return Object(r["a"])({url:i+"/teacher/getTeacherMusicClass",method:"get",params:t})}function l(t){return Object(r["a"])({url:i+"/demoGroup/findTeacherDemoGroups",method:"get",params:t})}function d(t){return Object(r["a"])({url:i+"/teacherAttendance/getTeacherPersonalAttendances",method:"get",params:t})}function m(t){return Object(r["a"])({url:i+"/teacher/queryCloses",method:"get",params:t})}function h(t){return Object(r["a"])({url:i+"/teacherLeaveRecord/queryPage",method:"get",params:t})}function p(t){return Object(r["a"])({url:i+"/teacher/sumTeacherNoPay",method:"get",params:t})}function f(t){return Object(r["a"])({url:i+"/teacherDefaultVipGroupSalary/queryPageByTeacherId",method:"get",params:t})}function g(t){return Object(r["a"])({url:i+"/teacherDefaultVipGroupSalary/upSet",method:"post",data:t})}function b(t){return Object(r["a"])({url:i+"/teacherDefaultMusicGroupSalary/queryPage",method:"get",params:t})}function v(t){return Object(r["a"])({url:i+"/teacherDefaultMusicGroupSalary/batchUpset",method:"post",data:t})}function T(t){return Object(r["a"])({url:i+"/courseSchedule/updateTeacherCoursesSalary",method:"post",data:s.a.stringify(t)})}function y(t){return Object(r["a"])({url:i+"/school/findVipSchoolByTeacher",method:"get",params:t})}function k(t){return Object(r["a"])({url:i+"/teacher/add",method:"post",data:s.a.stringify(t)})}function _(t){return Object(r["a"])({url:i+"/teacher/update",method:"post",data:s.a.stringify(t)})}function w(t){return Object(r["a"])({url:i+"/teacherFreeTime/query",method:"get",params:t})}function L(t){return Object(r["a"])({url:i+"/teacherAttendance/getTeacherPersonalAttendanceDetail",method:"get",params:t})}function F(t){return Object(r["a"])({url:i+"/teacherFreeTime/updateSet",method:"post",data:s.a.stringify(t)})}function D(t){return Object(r["a"])({url:i+"/teacherDefaultPracticeGroupSalary/queryPageByTeacherId",method:"get",params:t})}function C(t){return Object(r["a"])({url:i+"/teacherDefaultPracticeGroupSalary/update",method:"post",data:t})}function O(t){return Object(r["a"])({url:i+"/sysTenantAccount/queryTenantAccountDetail",method:"get",params:t})}function j(t){return Object(r["a"])({url:i+"/sysTenantAccount/addMinutes",method:"post",data:s.a.stringify(t)})}function I(t){return Object(r["a"])({url:i+"/sysTenantAccount/subtractMinutes",method:"post",data:s.a.stringify(t)})}function S(t){return Object(r["a"])({url:i+"/sysTenantAccount/get",method:"get",params:t})}function M(t){return Object(r["a"])({url:i+"/coursesGroupController/findTeacherCourseGroupsWithWeb",method:"get",params:t})}function x(t){return Object(r["a"])({url:i+"/courseSchedule/classGroupTeacherAdjust",method:"post",data:s.a.stringify(t)})}function $(t){return Object(r["a"])({url:i+"/teacher/queryStudent",method:"get",params:t})}function A(t){return Object(r["a"])({url:i+"/studentManage/batchUpdateAdviser",method:"post",data:s.a.stringify(t)})}},c466:function(t,e,a){"use strict";a.d(e,"h",(function(){return i})),a.d(e,"c",(function(){return o})),a.d(e,"d",(function(){return c})),a.d(e,"e",(function(){return u})),a.d(e,"f",(function(){return l})),a.d(e,"g",(function(){return d})),a.d(e,"b",(function(){return m})),a.d(e,"a",(function(){return h}));a("a481");var r=a("5a0c"),n=a.n(r),s=a("56d7");function i(t){var e=t.getFullYear(),a=t.getMonth()+1,r=t.getDate();return a=a<10?"0"+a:a,r=r<10?"0"+r:r,e+"-"+a+"-"+r}function o(t){return t.setDate(1),t}function c(t){var e=t.getMonth(),a=++e,r=new Date(t.getFullYear(),a,1),n=864e5;return new Date(r-n)}function u(t){var e=new Date(t.replace(/-/g,"/")).getTime(),a=new Date(t);0==a.getDay()&&(e-=6048e5);var r=e-24*(a.getDay()-1)*60*60*1e3,n=new Date(r),s=n.getFullYear(),i=n.getMonth()+1<10?"0"+(n.getMonth()+1):n.getMonth()+1,o=n.getDate()<10?"0"+n.getDate():n.getDate(),c=s+"-"+i+"-"+o;return c}function l(t){var e=new Date(t.replace(/-/g,"/")).getTime(),a=new Date(t),r=7-a.getDay();7==r&&(r=0);var n=e+24*r*60*60*1e3,s=new Date(n),i=s.getFullYear(),o=s.getMonth()+1<10?"0"+(s.getMonth()+1):s.getMonth()+1,c=s.getDate()<10?"0"+s.getDate():s.getDate(),u=i+"-"+o+"-"+c;return u}function d(t){var e=new Date(t.replace(/-/g,"/")).getDay();return 0===e&&(e=7),e}function m(t,e,a){return Math.abs(n()(t+" "+e).diff(t+" "+a,"Minute"))}function h(t,e,a){var r=n()(t+" "+e).add(a,"minute");return console.log(),n()(t+" 23:59").isBefore(r)?(s["$message"].error("课程时间无法跨天请重新设置开始时间"),""):r.format("HH:mm")}},ccd0:function(t,e,a){"use strict";var r=a("1963"),n=a.n(r);n.a},ec8a:function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));a("6762"),a("2fdb"),a("28a5");function r(t,e){var a=window.localStorage.getItem("permission");return a=a.split(","),e=e||null,!(!a.includes(t)||e)||!(!a.includes(t)||!a.includes(e))}},ef40:function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"m-container"},[a("el-calendar",{staticStyle:{minWidth:"810px"},scopedSlots:t._u([{key:"dateCell",fn:function(e){return[a("div",{staticStyle:{height:"100%"},on:{click:function(a){return t.showDate(e)}}},[a("p",[t._v("\n "+t._s(e.data.day.substring(8))+"\n ")]),t._v(" "),a("div",[t._l(t.newList,(function(r,n){return r.classDate.substring(0,10)===e.data.day&&"PRACTICE"===r.groupType?a("span",{key:r.id,staticClass:"newDot"},[t._v("\n 网\n ")]):t._e()})),t._v(" "),t._l(t.vipList,(function(r,n){return r.classDate.substring(0,10)===e.data.day&&"VIP"===r.groupType?a("span",{key:r.id,staticClass:"vipDot"},[t._v("\n vip\n ")]):t._e()})),t._v(" "),t._l(t.teamList,(function(r,n){return r.classDate.substring(0,10)===e.data.day&&"MUSIC"===r.groupType?a("span",{key:r.id,staticClass:"teamDot"},[t._v("\n 乐\n ")]):t._e()}))],2)])]}}])}),t._v(" "),a("resetList",{attrs:{startTimes:t.startTime},on:{getCalendatList:t.getCalendatList}})],1)},n=[],s=a("1cc7"),i=a("c466"),o=(a("8018"),a("5120")),c=a("ec8a"),u={components:{resetList:o["a"]},data:function(){return{dataList:[],value:new Date,teacherIdList:"",vipList:[],teamList:[],newList:[],startTime:""}},mounted:function(){var t=this;this.teacherIdList=this.$route.query.teacherId,this.getCalendatList(),this.$nextTick((function(){var e=document.querySelector(".el-calendar__button-group .el-button-group>button:nth-child(1)");e.addEventListener("click",(function(){t.value=new Date(t.value.setMonth(t.value.getMonth()+-1,1)),t.setCourseList(t.value)}));var a=document.querySelector(".el-calendar__button-group .el-button-group>button:nth-child(2)");a.addEventListener("click",(function(){t.value=new Date,t.setCourseList(t.value)}));var r=document.querySelector(".el-calendar__button-group .el-button-group>button:nth-child(3)");r.addEventListener("click",(function(){t.value=new Date(t.value.setMonth(t.value.getMonth()+1,1)),t.setCourseList(t.value)}))}))},activated:function(){},methods:{getCalendatList:function(){var t=this;this.teacherIdList=this.$route.query.teacherId;var e=Object(i["h"])(Object(i["c"])(this.value)),a=Object(i["h"])(Object(i["d"])(this.value));Object(s["nc"])({teacherIdList:this.teacherIdList,rows:9999,page:1,startTime:e,endTime:a}).then((function(e){if(200===e.code){for(var a in t.dataList=e.data.rows,t.vipList=[],t.teamList=[],t.newList=[],t.dataList)"VIP"===t.dataList[a].groupType&&t.vipList.push(t.dataList[a]),"MUSIC"===t.dataList[a].groupType&&t.teamList.push(t.dataList[a]),"PRACTICE"===t.dataList[a].groupType&&t.newList.push(t.dataList[a]);t.vipList=t.reduceArray(t.vipList,"classDate"),t.teamList=t.reduceArray(t.teamList,"classDate"),t.newList=t.reduceArray(t.newList,"classDate")}}))},showDate:function(t){this.startTime=t.data.day,this.endTime=t.data.day,this.value=t.date,"next-month"!==t.data.type&&"prev-month"!==t.data.type||this.getCalendatList()},reduceArray:function(t,e){var a={};return t=t.reduce((function(t,r){return!a[r[e]]&&(a[r[e]]=t.push(r)),t}),[]),t},setCourseList:function(t){this.startTime=Object(i["h"])(t),this.endTime=Object(i["h"])(t),this.getCalendatList()},permission:function(t,e){return Object(c["a"])(t,e)}}},l=u,d=(a("ccd0"),a("2877")),m=Object(d["a"])(l,r,n,!1,null,"cd4b7950",null);e["default"]=m.exports}}]);