1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6070998a"],{"09f4":function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),Math.easeInOutQuad=function(e,t,a,s){return e/=s/2,e<1?a/2*e*e+t:(e--,-a/2*(e*(e-2)-1)+t)};var s=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function r(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function i(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function n(e,t,a){var n=i(),o=e-n,l=20,c=0;t="undefined"===typeof t?500:t;var u=function e(){c+=l;var i=Math.easeInOutQuad(c,n,o,t);r(i),c<t?s(e):a&&"function"===typeof a&&a()};u()}},"0d68":function(e,t,a){},"8d2d":function(e,t,a){"use strict";a("0d68")},ac2a:function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"m-container"},[a("h2",[a("el-page-header",{attrs:{content:e.name},on:{back:e.goBack}})],1),e._v(" "),a("div",[a("div",{staticClass:"wrap"},[e.courseType&&"TRIAL"!=e.courseType?a("div",{directives:[{name:"permission",rawName:"v-permission",value:"courseSchedule/practiceGroupTeacherAdjust",expression:"'courseSchedule/practiceGroupTeacherAdjust'"}],staticClass:"newBand",on:{click:e.resetTeachers}},[e._v("\n 课程组调整\n ")]):e._e(),e._v(" "),a("div",{directives:[{name:"permission",rawName:"v-permission",value:{child:"courseSchedule/batchAddCourses",parent:"/accompanys"},expression:"{\n child: 'courseSchedule/batchAddCourses',\n parent: '/accompanys',\n }"}],staticClass:"newBand",on:{click:e.addCourse}},[e._v("\n 网管课加课\n ")]),e._v(" "),e.courseType&&"TRIAL"!=e.courseType?a("div",{directives:[{name:"permission",rawName:"v-permission",value:"courseSchedule/batchUpdateCourseSchedule",expression:"'courseSchedule/batchUpdateCourseSchedule'"}],staticClass:"newBand",on:{click:e.adjustment}},[e._v("\n 批量调整\n ")]):e._e()]),e._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",selectable:e.isDisabled,width:"55"}}),e._v(" "),a("el-table-column",{attrs:{label:"课程编号",align:"center",prop:"id"}}),e._v(" "),a("el-table-column",{attrs:{label:"课程名称",align:"center",prop:"name"}}),e._v(" "),a("el-table-column",{attrs:{label:"主教老师",align:"center",prop:"teacherName"}}),e._v(" "),a("el-table-column",{attrs:{label:"上课日期",align:"center",prop:"classDate"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(e._f("formatTimer")(t.row.classDate))+"\n "+e._s(e._f("timerForMinFormat")(t.row.startClassTimeStr))+"~"+e._s(e._f("timerForMinFormat")(t.row.endClassTimeStr))+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"是否点名",align:"center",prop:"status"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.isCallNames?"是":"否"))]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"课程状态",align:"center",prop:"status"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(e._f("coursesStatus")(t.row.status)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"结算状态",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(t.row.isSettlement?"已结算":"未结算"))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作",width:"250px",align:"center",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[!t.row.isSettlement&&e.permission("courseSchedule/classStartDateAdjust/accompanys")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.resetClass(t.row)}}},[e._v("调整")]):e._e(),e._v(" "),!t.row.isSettlement&&"NOT_START"==t.row.status&&e.permission("accompanys/remove")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.removeClass(t.row)}}},[e._v("删除")]):e._e(),e._v(" "),"NOT_START"==t.row.status&&"TRIAL"!=e.courseType&&e.permission("courseSchedule/practiceCourseTeacherAdjust/3420")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.resetTeacher(t.row)}}},[e._v("更换老师")]):e._e(),e._v(" "),"OVER"==t.row.status&&0==t.row.isSettlement&&e.permission("/accompanys/teacherAttendance/updateTeacherAttendance")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.onMarkAttendance(t.row)}}},[e._v("补考勤")]):e._e(),e._v(" "),"OVER"==t.row.status&&e.permission("/accompanys/studentAttendance/updateStudentAttendances")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.onCallName(t.row)}}},[e._v("点名表")]):e._e(),e._v(" "),!t.row.isSettlement&&e.permission("accompanys/cleanAttendance")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.clearAttend(t.row)}}},[e._v("清除考勤")]):e._e()],1)]}}])})],1)],1)]),e._v(" "),a("el-dialog",{attrs:{title:"补考勤",width:"400px",visible:e.markAttendance.status},on:{"update:visible":function(t){return e.$set(e.markAttendance,"status",t)}}},[a("el-form",[a("el-form-item",{attrs:{label:"签到状态"}},[e._v(e._s(e._f("attendanceType")(e.markAttendance.dataInfo.isSignIn)))]),e._v(" "),a("el-form-item",{attrs:{label:"签到时间"}},[e._v(e._s(e.markAttendance.dataInfo.signInTime))]),e._v(" "),a("el-form-item",{attrs:{label:"签退状态"}},[e._v(e._s(e._f("attendanceOutType")(e.markAttendance.dataInfo.isSignOut)))]),e._v(" "),a("el-form-item",{attrs:{label:"签退时间"}},[e._v(e._s(e.markAttendance.dataInfo.signOutTime))])],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.markAttendance.status=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary",disabled:1==e.markAttendance.dataInfo.isSignIn&&1==e.markAttendance.dataInfo.isSignOut},on:{click:e.batchAdjustmentTime}},[e._v("确定补卡")])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"课程调整",width:"400px","before-close":e.handleClose,visible:e.courseVisible},on:{"update:visible":function(t){e.courseVisible=t}}},[a("el-form",{ref:"maskForm",attrs:{model:e.maskForm,rules:e.maskRules,"label-position":"right","label-width":"80px",inline:!0}},[a("el-form-item",{attrs:{label:"上课日期",prop:"date"}},[a("el-date-picker",{attrs:{type:"date","picker-options":e.courseOption,"value-format":"yyyy-MM-dd",placeholder:"选择日期"},model:{value:e.maskForm.date,callback:function(t){e.$set(e.maskForm,"date","string"===typeof t?t.trim():t)},expression:"maskForm.date"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"开始时间",prop:"startTime",rules:[{required:!0,message:"请选择开始时间",trigger:"change"}]}},[a("el-time-picker",{attrs:{placeholder:"起始时间",format:"HH:mm","value-format":"HH:mm","picker-options":{selectableRange:"06:00:00 - 23:30:00"}},on:{change:e.changeStartTime},model:{value:e.maskForm.startTime,callback:function(t){e.$set(e.maskForm,"startTime",t)},expression:"maskForm.startTime"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"结束时间",prop:"endTime"}},[a("el-time-picker",{attrs:{placeholder:"结束时间",format:"HH:mm","value-format":"HH:mm",disabled:""},model:{value:e.maskForm.endTime,callback:function(t){e.$set(e.maskForm,"endTime",t)},expression:"maskForm.endTime"}})],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.handleClose}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.submitResetClass}},[e._v("确 定")])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:e.isMultiple?"课程组调整":"更换老师",width:"400px","before-close":e.teacherClose,visible:e.teacherVisible},on:{"update:visible":function(t){e.teacherVisible=t}}},[a("el-form",{ref:"teacherForm",attrs:{model:e.teacherForm,rules:e.teacherRules,"label-position":"right","label-width":"100px",inline:!0}},[a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.isMultiple,expression:"isMultiple"}],attrs:{label:"课程班名称"}},[a("el-input",{attrs:{disabled:""},model:{value:e.teacherForm.name,callback:function(t){e.$set(e.teacherForm,"name","string"===typeof t?t.trim():t)},expression:"teacherForm.name"}})],1),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.isMultiple,expression:"isMultiple"}],attrs:{label:"课程组声部"}},[a("el-select",{attrs:{filterable:"",clearable:""},on:{change:e.changeSound},model:{value:e.teacherForm.subjectId,callback:function(t){e.$set(e.teacherForm,"subjectId","string"===typeof t?t.trim():t)},expression:"teacherForm.subjectId"}},e._l(e.subjectList,(function(e,t){return a("el-option",{key:t,attrs:{value:e.id,label:e.name}})})),1)],1),e._v(" "),e.isMultiple?a("el-form-item",{attrs:{label:"课程组老师"}},[a("el-select",{attrs:{filterable:"",clearable:""},model:{value:e.teacherForm.teacher,callback:function(t){e.$set(e.teacherForm,"teacher","string"===typeof t?t.trim():t)},expression:"teacherForm.teacher"}},e._l(e.teacherList,(function(e,t){return a("el-option",{key:t,attrs:{value:e.id,label:e.realName}})})),1)],1):a("el-form-item",{attrs:{label:"指导老师"}},[a("el-select",{attrs:{filterable:"",clearable:""},model:{value:e.teacherForm.teacher,callback:function(t){e.$set(e.teacherForm,"teacher","string"===typeof t?t.trim():t)},expression:"teacherForm.teacher"}},e._l(e.teacherList,(function(e,t){return a("el-option",{key:t,attrs:{value:e.id,label:e.realName}})})),1)],1),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.isMultiple,expression:"isMultiple"}],attrs:{label:"乐团主管"}},[a("el-select",{attrs:{filterable:"",clearable:""},model:{value:e.teacherForm.educationalTeacherId,callback:function(t){e.$set(e.teacherForm,"educationalTeacherId","string"===typeof t?t.trim():t)},expression:"teacherForm.educationalTeacherId"}},e._l(e.selects.roles.EDUCATION,(function(e,t){return a("el-option",{key:t,attrs:{value:e.value,label:e.label}})})),1)],1),e._v(" "),e.isMultiple?a("el-form-item",[a("p",{staticStyle:{color:"#ff5353"}},[e._v("\n *更改课程组老师,将更换全部未开始课程的老师\n ")])]):e._e()],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.teacherVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.subresetTeacher}},[e._v("确 定")])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:e.adjustmentName,width:"800px",visible:e.adjustmentVisible},on:{"update:visible":function(t){e.adjustmentVisible=t}}},[a("el-form",{ref:"adjustmentForm",attrs:{model:e.adjustmentForm,"label-position":"right","label-width":"120px",rules:e.adjustmentRules,inline:!0}},[e.isaddCourse?e._e():a("el-form-item",{attrs:{label:"已选择课时数"}},[a("el-input",{attrs:{disabled:""},model:{value:e.adjustmentForm.count,callback:function(t){e.$set(e.adjustmentForm,"count","string"===typeof t?t.trim():t)},expression:"adjustmentForm.count"}})],1),e._v(" "),e.isaddCourse?a("el-form-item",{attrs:{label:"添加课时数",prop:"addCount"}},[a("el-input",{attrs:{type:"number"},nativeOn:{mousewheel:function(e){e.preventDefault()}},model:{value:e.adjustmentForm.addCount,callback:function(t){e.$set(e.adjustmentForm,"addCount","string"===typeof t?t.trim():t)},expression:"adjustmentForm.addCount"}})],1):e._e(),e._v(" "),a("br"),e._v(" "),a("el-form-item",{attrs:{label:"排课起始时间",prop:"courseTime"}},[a("el-date-picker",{staticStyle:{width:"200px !important"},attrs:{"picker-options":e.pickerOptions,type:"date","value-format":"yyyy-MM-dd",placeholder:"选择日期"},model:{value:e.adjustmentForm.courseTime,callback:function(t){e.$set(e.adjustmentForm,"courseTime","string"===typeof t?t.trim():t)},expression:"adjustmentForm.courseTime"}}),e._v(" "),a("el-checkbox",{staticStyle:{"margin-left":"10px"},model:{value:e.adjustmentForm.checked,callback:function(t){e.$set(e.adjustmentForm,"checked","string"===typeof t?t.trim():t)},expression:"adjustmentForm.checked"}},[e._v("是否跳过节假日")])],1)],1),e._v(" "),a("div",{staticClass:"WeekWrap"},[a("h3",{staticStyle:{"margin-bottom":"20px"}},[e._v("\n 循环次数\n "),a("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"text"},on:{click:e.addWeek}},[e._v("添加")])],1),e._v(" "),a("div",{staticClass:"countWrap",staticStyle:{"margin-bottom":"10px"}},e._l(e.weekList,(function(t,s){return a("div",{key:s,staticClass:"countItem",staticStyle:{"margin-bottom":"20px"}},[a("span",[e._v("循环周期:")]),e._v(" "),a("el-select",{attrs:{filterable:"",clearable:""},model:{value:t.dayOfWeek,callback:function(a){e.$set(t,"dayOfWeek","string"===typeof a?a.trim():a)},expression:"item.dayOfWeek"}},e._l(e.weekDateList,(function(e,t){return a("el-option",{key:t,attrs:{label:e.label,value:e.value}})})),1),e._v(" "),a("span",{staticStyle:{"margin-left":"10px"}},[e._v("开始时间")]),e._v(" "),a("el-time-picker",{staticStyle:{"margin-left":"10px"},attrs:{placeholder:"",format:"HH:mm","value-format":"HH:mm","picker-options":{selectableRange:"06:00:00 - 23:30:00"}},on:{change:function(a){e.changeStartTimes(a,t)}},model:{value:t.startClassTime,callback:function(a){e.$set(t,"startClassTime","string"===typeof a?a.trim():a)},expression:"item.startClassTime"}}),e._v(" "),a("span",{staticStyle:{"margin-left":"10px"}},[e._v("结束时间")]),e._v(" "),a("el-time-picker",{staticStyle:{"margin-left":"10px"},attrs:{placeholder:"",format:"HH:mm","value-format":"HH:mm",disabled:"","picker-options":{selectableRange:"06:00:00 - 23:30:00"}},model:{value:t.endClassTime,callback:function(a){e.$set(t,"endClassTime","string"===typeof a?a.trim():a)},expression:"item.endClassTime"}}),e._v(" "),a("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"danger",icon:"el-icon-delete",circle:""},on:{click:function(a){return e.removeWeek(t)}}})],1)})),0)]),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.adjustmentVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:!e.isaddCourse,expression:"!isaddCourse"}],attrs:{type:"primary"},on:{click:e.submitAdjustment}},[e._v("确 定")]),e._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:e.isaddCourse,expression:"isaddCourse"}],attrs:{type:"primary"},on:{click:e.addCourseSubmit}},[e._v("确 定")])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"点名表",width:"700px",visible:e.rollCall.status},on:{"update:visible":function(t){return e.$set(e.rollCall,"status",t)}}},[a("el-table",{attrs:{data:e.rollCall.gridData,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[a("el-table-column",{attrs:{align:"center",property:"userName",label:"学员姓名"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",property:"phone",label:"手机号"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",property:"subjectName",label:"学员声部"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"到课状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("studentCallName")(t.row.status))+"\n ")]}}])}),e._v(" "),0==e.rollCall.selectItem.isSettlement?a("el-table-column",{attrs:{align:"center",label:"操作",width:"220px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"mini",type:"primary",round:""},on:{click:function(a){return e.onChangeRollCall("TRUANT",t.row)}}},[e._v("未到")]),e._v(" "),a("el-button",{attrs:{size:"mini",type:"warning",round:""},on:{click:function(a){return e.onChangeRollCall("LEAVE",t.row)}}},[e._v("请假")]),e._v(" "),a("el-button",{attrs:{size:"mini",type:"success",round:""},on:{click:function(a){return e.onChangeRollCall("NORMAL",t.row)}}},[e._v("到课")])]}}],null,!1,3627308221)}):e._e()],1),e._v(" "),a("pagination",{attrs:{total:e.rollCall.total,page:e.rollCall.page,limit:e.rollCall.limit,"page-sizes":e.rollCall.page_size},on:{"update:page":function(t){return e.$set(e.rollCall,"page",t)},"update:limit":function(t){return e.$set(e.rollCall,"limit",t)},pagination:e.getCallName}})],1)],1)},r=[],i=(a("28a5"),a("ac6a"),a("7f7f"),a("c80c")),n=(a("96cf"),a("3b8d")),o=a("333d"),l=a("ec8a"),c=a("61f7"),u=a("1cc7"),m=a("7e78"),d=a("7676"),p=a.n(d),h=a("c466"),f=a("5a0c"),b=a.n(f),v={components:{pagination:o["a"]},data:function(){return{adjustmentName:"",isaddCourse:!1,adjustmentVisible:!1,expireVisible:!1,isMultiple:!0,name:"网管课程组",courseVisible:!1,teacherVisible:!1,Frules:null,FsearchForm:null,userId:null,activeRow:null,courseType:null,rules:{limit:20,page:1,total:0,page_size:[10,20,50,100]},tableList:[],teacherList:[],courseData:[],practiceId:null,subjectList:[],maskForm:{date:"",startTime:"",id:"",endTime:""},adjustmentForm:{count:"",courseTime:"",checked:!1,addCount:"",courseType:"",fee:""},startTime:null,expireForm:{coursesExpireDate:null,coursesStartDate:null,tempCoursesExpireDate:null},expireRules:{coursesStartDate:[{required:!0,message:"请选择有效期开始时间",trigger:"blur"}],coursesExpireDate:[{required:!0,message:"请选择有效期结束时间",trigger:"blur"}]},maskRules:{date:[{required:!0,message:"请选择上课时间",trigger:"blur"}]},teacherRules:{teacher:[{required:!0,message:"请选择老师",trigger:"blur"}],subjectId:[{required:!0,message:"请选择声部",trigger:"blur"}],educationalTeacherId:[{required:!0,message:"请选择乐团主管",trigger:"blur"}]},teacherForm:{teacher:null,name:null,subjectId:null,educationalTeacherId:null},courseOption:null,coursesExpireDate:null,adjustmentRules:{courseTime:[{required:!0,message:"请选择开始时间"}],addCount:[{required:!0,message:"请输入加课次数"}],courseType:[{required:!0,message:"请选择课程类型"}],fee:[{required:!0,message:"请输入费用"}]},pickerOptions:{firstDayOfWeek:1,disabledDate:function(e){return e.getTime()+864e5<=(new Date).getTime()}},weekList:[{dayOfWeek:"",startTime:"",endTime:"",moid:(new Date).getTime()}],weekDateList:[{value:"1",label:"星期一"},{value:"2",label:"星期二"},{value:"3",label:"星期三"},{value:"4",label:"星期四"},{value:"5",label:"星期五"},{value:"6",label:"星期六"},{value:"7",label:"星期日"}],activeList:[],timers:null,markAttendance:{status:!1,dataInfo:{}},bigin:this.beginDate(),rollCall:{status:!1,gridData:[],selectItem:{},limit:10,page:1,total:0,page_size:[10,20,40,50]},accompanTime:25,updateCourseStatus:1}},created:function(){this},mounted:function(){var e=Object(n["a"])(Object(i["a"])().mark((function e(){return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.$store.dispatch("setOrganRole");case 2:this.init();case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:{init:function(){var e=this;this.practiceId=this.$route.query.id,this.userId=this.$route.query.userId,this.courseType=this.$route.query.type,this.expireForm.coursesExpireDate=this.$route.query.coursesExpireDate,this.expireForm.coursesStartDate=this.$route.query.coursesStartDate,this.timers=this.$route.query.coursesStartDate+"至"+this.$route.query.coursesExpireDate,Object(u["Pb"])({organId:this.organId}).then((function(t){200==t.code&&(e.teacherList=t.data)})),Object(u["yb"])().then((function(t){200==t.code&&(e.subjectList=t.data)})),this.courseOption=this.coursesDate(),this.getCourseGroup(),this.getList()},onUpdateCourse:function(e){this.updateCourseStatus=e,this.expireVisible=!0},onCallName:function(e){this.rollCall.page=1,this.rollCall.selectItem=e,this.getCallName()},getCallName:function(){var e=this.rollCall,t={page:e.page,rows:e.limit,courseScheduleId:e.selectItem.id};Object(u["H"])(t).then((function(t){var a=t.data;e.status=!0,200==t.code&&(e.gridData=a.rows,e.total=a.total)}))},onChangeRollCall:function(e,t){var a=this,s=this.rollCall,r={courseScheduleId:s.selectItem.id,studentAttendances:[{userId:t.studentId,status:e}]};Object(u["Wc"])(r).then((function(s){200==s.code?(a.$message.success("修改成功"),t.status=e,a.getList()):a.$message.error(s.msg)}))},lookStudents:function(e){var t=this,a=e.id;getStudyStudents({courseScheduleId:a}).then((function(e){200==e.code&&(t.studentList=e.data,t.studentVisible=!0)}))},getCourseGroup:function(){var e=this;Object(u["lc"])({search:this.practiceId}).then((function(t){if(200==t.code&&(e.courseData=t.data.rows,e.courseData.length>0)){e.name=e.courseData[0].name;var a=e.courseData[0].coursesStartDate?new Date(e.courseData[0].coursesStartDate):new Date,s=e.courseData[0].buyMonths;e.accompanTime=e.courseData[0].singleClassMinutes||25;var r=Object(c["c"])(a.getFullYear(),a.getMonth()+s+1);r[2]>=a.getDate()?a.setMonth(a.getMonth()+s):a=new Date(r.join("-")),a.setDate(a.getDate()-1);var i=a.getFullYear()+"-"+(a.getMonth()+1)+"-"+a.getDate();e.expireForm.tempCoursesExpireDate=i}}))},permission:function(e,t){return Object(l["a"])(e,t)},beginDate:function(){var e=this;return{firstDayOfWeek:1,disabledDate:function(t){return e.tableList[e.tableList.length-1].classDate?new Date(e.tableList[e.tableList.length-1].classDate).getTime()>=t.getTime()+864e5:t.getTime()>=Date.now()}}},resetDate:function(){var e=this;return{firstDayOfWeek:1,disabledDate:function(t){return e.tableList[e.tableList.length-1].classDate?new Date(e.tableList[e.tableList.length-1].classDate).getTime()>=t.getTime():t.getTime()>=Date.now()}}},startBigin:function(){var e,t,a;null!==(e=this.tableList[0])&&void 0!==e&&e.classDate&&(t=null===(a=this.tableList[0])||void 0===a?void 0:a.classDate);return{firstDayOfWeek:1,disabledDate:function(e){return t?new Date(t).getTime()<e.getTime():e.getTime()>=Date.now()}}},submitExpireDate:function(){var e=this;this.$refs.expireForm.validate((function(t){t&&(1==e.updateCourseStatus?Object(u["Tc"])({practiceGroupId:e.practiceId,coursesExpireDate:e.expireForm.coursesExpireDate,coursesStartDate:e.expireForm.coursesStartDate}).then((function(t){200==t.code?(e.$message.success("有效期修改成功"),e.$router.push({query:p()(e.$route.query,{coursesStartDate:e.expireForm.coursesStartDate,coursesExpireDate:e.expireForm.coursesExpireDate})}),e.timers=e.expireForm.coursesStartDate+"至"+e.expireForm.coursesExpireDate,e.expireVisible=!1,e.getCourseGroup(),e.getList()):e.$message.error(t.msg)})):2==e.updateCourseStatus&&Object(u["Uc"])({practiceGroupId:e.practiceId,coursesExpireDate:e.expireForm.coursesExpireDate,coursesStartDate:e.expireForm.coursesStartDate}).then((function(t){200==t.code?(e.$message.success("有效期修改成功"),e.$router.push({query:p()(e.$route.query,{coursesStartDate:e.expireForm.coursesStartDate,coursesExpireDate:e.expireForm.coursesExpireDate})}),e.timers=e.expireForm.coursesStartDate+"至"+e.expireForm.coursesExpireDate,e.expireVisible=!1,e.getCourseGroup(),e.getList()):e.$message.error(t.msg)})))}))},onMarkAttendance:function(e){this.markAttendance={status:!0,dataInfo:e}},batchAdjustmentTime:function(){var e=this,t=this.markAttendance.dataInfo,a={teacherId:t.actualTeacherId,courseScheduleId:t.id,signInStatus:1,signOutStatus:1};Object(u["ad"])(a).then((function(t){200==t.code?(e.$message.success("补卡成功"),e.markAttendance.status=!1,e.getList()):e.$message.error(t.msg)}))},getList:function(){var e=this;Object(u["L"])({practiceId:this.practiceId}).then((function(t){200==t.code&&(e.tableList=t.data.pageInfo.rows)}))},goBack:function(){this.$store.dispatch("delVisitedViews",this.$route),this.$router.push({path:"/accompanyManager/accompany"})},teacherClose:function(){this.isMultiple=!1,this.teacherForm.teacher=null,this.teacherVisible=!1},handleClose:function(){this.$refs["maskForm"].resetFields(),this.courseVisible=!1},expireClose:function(){this.expireVisible=!1,this.expireForm.coursesExpireDate=null,this.$refs["expireForm"].resetFields()},submitResetClass:function(){var e=this,t=this.maskForm,a=b()(t.date+" "+t.startTime).diff(new Date,"second");a<=0?this.$message.error("课程开始时间必须大于当前时间"):this.$refs.maskForm.validate((function(t){if(t){var a={startClassTime:b()(e.maskForm.date+" "+e.maskForm.startTime).format("YYYY-MM-DD HH:mm:ss"),id:e.maskForm.id,classDate:e.maskForm.date,groupType:"PRACTICE"};Object(u["uc"])(a).then((function(t){200==t.code&&(e.$message.success("修改成功"),e.courseVisible=!1,e.getList())}))}}))},resetClass:function(e){var t=this;this.$nextTick((function(){t.maskForm={date:b()(e.classDate).format("YYYY-MM-DD"),startTime:e.startClassTimeStr.substring(0,5),endTime:e.endClassTimeStr.substring(0,5),id:e.id}})),this.coursesExpireDate=e.coursesExpireDate,this.courseVisible=!0},resetTeacher:function(e){this.isMultiple=!1,this.activeRow=e,this.teacherForm.teacher=e.actualTeacherId,this.teacherVisible=!0},resetTeachers:function(){this.isMultiple=!0,this.teacherForm.teacher=this.courseData[0].userId,this.teacherForm.name=this.courseData[0].name,this.teacherForm.subjectId=this.courseData[0].subjectId,this.teacherForm.educationalTeacherId=this.courseData[0].educationalTeacherId||null,this.teacherVisible=!0},subresetTeacher:function(){var e=this;this.$refs.teacherForm.validate((function(t){t&&(e.isMultiple?Object(u["nc"])({practiceGroupId:e.practiceId,teacherId:e.teacherForm.teacher,subjectId:e.teacherForm.subjectId,educationalTeacherId:e.teacherForm.educationalTeacherId}).then((function(t){200==t.code&&(e.$message.success("修改成功"),e.getCourseGroup(),e.getList(),e.teacherVisible=!1)})):Object(u["kc"])({courseScheduleId:e.activeRow.id,teacherId:e.teacherForm.teacher}).then((function(t){200==t.code&&(e.$message.success("修改成功"),e.getList(),e.teacherVisible=!1)})))}))},coursesDate:function(){var e=this;return{firstDayOfWeek:1,disabledDate:function(t){var a=e.$helpers.dayjs,s=a(new Date).valueOf()-864e5,r=s;return t.getTime()<r}}},isDisabled:function(e,t){return!e.isSettlement},onCourseExpireDate:function(){},adjustment:function(){this.adjustmentName="批量调整",this.isaddCourse=!1,this.adjustmentForm.count<=0?this.$message.error("请至少勾选一节课"):this.adjustmentVisible=!0},changeSound:function(e){var t=this;e&&this.subjectList.forEach((function(a){if(a.id==e){var s=t.teacherForm.name.split("•");t.teacherForm.name=a.name+"•"+s[1]}}))},addWeek:function(){this.weekList.push({dayOfWeek:"",startClassTime:"",endClassTime:"",id:new Date})},removeWeek:function(e){for(var t in this.weekList)this.weekList[t].id==e.id&&this.weekList.splice(t,1)},submitAdjustment:function(){var e=this;this.$refs["adjustmentForm"].validate((function(t){if(t){var a=e.weekList;if(!a[0]||!a[0].startClassTime||!a[0].dayOfWeek)return void e.$message.error("至少排一节课");var s={},r=e.activeList.map((function(e){return e.id})),i=r;s.courseScheduleIdList=i,s.startDate=e.adjustmentForm.courseTime,s.coursesTimes=e.adjustmentForm.addCount,s.teachingArrangementList=e.weekList,s.isJumpHoliday=e.adjustmentForm.checked,s.musicGroupId=e.practiceId,s.teachMode="ONLINE",s.type="PRACTICE",Object(u["l"])(s).then((function(t){200==t.code&&(e.$message.success("恭喜您修改成功"),e.adjustmentVisible=!1,e.getList())}))}}))},handleSelectionChange:function(e){this.adjustmentForm.count=e.length,this.activeList=e},clearAttend:function(e){var t=this;this.$confirm("是否清除考勤记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(u["u"])({courseScheduleIds:e.id}).then((function(e){200==e.code?(t.$message.success("清除成功"),t.getList()):t.$message.error(e.msg)}))})).catch((function(){}))},addCourse:function(){this.adjustmentName="网管课加课",this.isaddCourse=!0,this.adjustmentVisible=!0},addCourseSubmit:function(){var e=this;this.$refs["adjustmentForm"].validate((function(t){if(t){var a=e.weekList;if(!a[0]||!a[0].startClassTime||!a[0].dayOfWeek)return void e.$message.error("至少排一节课");var s={};s.startDate=e.adjustmentForm.courseTime,s.coursesTimes=e.adjustmentForm.addCount,s.teachingArrangementList=e.weekList,s.isJumpHoliday=e.adjustmentForm.checked,s.musicGroupId=e.practiceId,s.teachMode="ONLINE",s.type="PRACTICE",Object(u["i"])(s).then((function(t){200==t.code&&(e.$message.success("恭喜您添加成功"),e.adjustmentVisible=!1,e.getList())}))}}))},removeClass:function(e){var t=this;this.$confirm("是否删除该课程?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(m["i"])({courseScheduleIds:e.id}).then((function(e){200==e.code&&(t.$message.success("删除成功"),t.getList())}))}))},changeStartTime:function(e){var t=this;this.$nextTick((function(a){e?t.$set(t.maskForm,"endTime",Object(h["d"])(t.maskForm.date,e,t.accompanTime)):t.$set(t.maskForm,"endTime","")}))},changeStartTimes:function(e,t){var a=this;this.$nextTick((function(s){if(e){var r=b()(new Date).format("YYYY-MM-DD");a.$set(t,"endClassTime",Object(h["d"])(r,e,a.accompanTime))}else a.$set(t,"endClassTime","")}))}},filters:{studentCallName:function(e){var t={NORMAL:"到课",TRUANT:"未到",LEAVE:"请假",DROP_OUT:"退学",LATE:"迟到","":"未到"};return t[e]}},watch:{adjustmentVisible:function(e){e||(this.$refs.adjustmentForm&&this.$refs.adjustmentForm.resetFields(),this.weekList=[{dayOfWeek:"",startTime:"",endTime:"",moid:(new Date).getTime()}])}},computed:{}},g=v,k=(a("8d2d"),a("2877")),_=Object(k["a"])(g,s,r,!1,null,"9f2a8b50",null);t["default"]=_.exports},c466:function(e,t,a){"use strict";a.d(t,"n",(function(){return n})),a.d(t,"f",(function(){return o})),a.d(t,"g",(function(){return l})),a.d(t,"h",(function(){return c})),a.d(t,"i",(function(){return u})),a.d(t,"j",(function(){return m})),a.d(t,"e",(function(){return d})),a.d(t,"d",(function(){return p})),a.d(t,"a",(function(){return h})),a.d(t,"b",(function(){return f})),a.d(t,"c",(function(){return b})),a.d(t,"k",(function(){return v})),a.d(t,"l",(function(){return g})),a.d(t,"m",(function(){return k}));a("a481");var s=a("5a0c"),r=a.n(s),i=a("56d7");function n(e){var t=e.getFullYear(),a=e.getMonth()+1,s=e.getDate();return a=a<10?"0"+a:a,s=s<10?"0"+s:s,t+"-"+a+"-"+s}function o(e){return e.setDate(1),e}function l(e){var t=e.getMonth(),a=++t,s=new Date(e.getFullYear(),a,1),r=864e5;return new Date(s-r)}function c(e){var t=new Date(e.replace(/-/g,"/")).getTime(),a=new Date(e);0==a.getDay()&&(t-=6048e5);var s=t-24*(a.getDay()-1)*60*60*1e3,r=new Date(s),i=r.getFullYear(),n=r.getMonth()+1<10?"0"+(r.getMonth()+1):r.getMonth()+1,o=r.getDate()<10?"0"+r.getDate():r.getDate(),l=i+"-"+n+"-"+o;return l}function u(e){var t=new Date(e.replace(/-/g,"/")).getTime(),a=new Date(e),s=7-a.getDay();7==s&&(s=0);var r=t+24*s*60*60*1e3,i=new Date(r),n=i.getFullYear(),o=i.getMonth()+1<10?"0"+(i.getMonth()+1):i.getMonth()+1,l=i.getDate()<10?"0"+i.getDate():i.getDate(),c=n+"-"+o+"-"+l;return c}function m(e){var t=new Date(e.replace(/-/g,"/")).getDay();return 0===t&&(t=7),t}function d(e,t,a){return Math.abs(r()(e+" "+t).diff(e+" "+a,"Minute"))}function p(e,t,a){var s=r()(e+" "+t).add(a,"minute");return r()(e+" 21:00").isBefore(s)?(i["$message"].error("课程结束时间不可超过21:00点,请重新设置开始时间"),""):s.format("HH:mm")}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=r()("2021-12-17 "+e).add(t,"minute");return a.format("HH:mm:ss")}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=r()("2021-12-17 "+e).add(t,"minute").add(1,"second");return a.format("HH:mm:ss")}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=r()("2021-12-17 "+e).add(t,"minute").subtract(1,"second");return a.format("HH:mm:ss")}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=r()("2021-12-17 "+e).subtract(t,"minute");return a.format("HH:mm:ss")}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=r()("2021-12-17 "+e).subtract(t,"minute").add(1,"second");return a.format("HH:mm:ss")}function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=r()("2021-12-17 "+e).subtract(t,"minute").subtract(1,"second");return a.format("HH:mm:ss")}}}]);
|