chunk-543ac94a.d40a2614.js 17 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-543ac94a"],{"02ce":function(e,t,r){"use strict";var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-form",{ref:"maskForm",staticClass:"maskForm",attrs:{model:e.maskForm,rules:e.maskRules,"label-position":"right","label-width":"120px",inline:!0}},["VIP"==e.maskForm.type?r("el-form-item",{attrs:{label:"主教老师",prop:"teacher"}},[r("remote-search",{attrs:{commit:"setTeachers",width:220},on:{change:e.changeTeacher},model:{value:e.maskForm.teacher,callback:function(t){e.$set(e.maskForm,"teacher",t)},expression:"maskForm.teacher"}})],1):r("el-form-item",{attrs:{label:"主教老师",prop:"teacher"}},[r("remote-search",{attrs:{commit:"setTeachers",width:220},model:{value:e.maskForm.teacher,callback:function(t){e.$set(e.maskForm,"teacher",t)},expression:"maskForm.teacher"}})],1),e._v(" "),"MUSIC_NETWORK"!=e.maskForm.type&&"HIGH_ONLINE"!=e.maskForm.type&&"MUSIC"==e.maskForm.groupType&&e.$helpers.permission("is/teacher/findTeachers")?r("el-form-item",{attrs:{label:"助教老师",prop:"assistant"}},[r("remote-search",{attrs:{commit:"setTeachers",width:220,multiple:!0},model:{value:e.maskForm.assistant,callback:function(t){e.$set(e.maskForm,"assistant",t)},expression:"maskForm.assistant"}})],1):e._e(),e._v(" "),r("el-form-item",{attrs:{label:"上课日期",prop:"date"}},[r("el-date-picker",{attrs:{type:"date","picker-options":e.bigin,"value-format":"yyyy-MM-dd",placeholder:"选择日期",clearable:""},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(" "),r("el-form-item",{attrs:{label:"课程时长",prop:"timer"}},[r("el-select",{staticStyle:{width:"220px !important"},attrs:{clearable:""},on:{change:e.changeTime},model:{value:e.maskForm.timer,callback:function(t){e.$set(e.maskForm,"timer",t)},expression:"maskForm.timer"}},e._l(e.typeTimeList,(function(t,a){return r("el-option",{key:a,attrs:{disabled:t>e.baseTimer,value:parseInt(t),label:t}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{label:"开始时间",prop:"startTime"}},[r("el-time-picker",{attrs:{placeholder:"起始时间",format:"HH:mm","value-format":"HH:mm","picker-options":{selectableRange:"06:00:00 - 23:30:00"},clearable:""},on:{change:e.changeStartTime},model:{value:e.maskForm.startTime,callback:function(t){e.$set(e.maskForm,"startTime","string"===typeof t?t.trim():t)},expression:"maskForm.startTime"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"结束时间",prop:"endTime"}},[r("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:e.maskForm.startTime},clearable:""},model:{value:e.maskForm.endTime,callback:function(t){e.$set(e.maskForm,"endTime","string"===typeof t?t.trim():t)},expression:"maskForm.endTime"}})],1),e._v(" "),"VIP"==e.maskForm.type?r("el-form-item",{attrs:{label:"课程类型",prop:"courseType"}},[r("el-select",{staticStyle:{width:"220px !important"},attrs:{clearable:""},on:{change:e.typeChange},model:{value:e.maskForm.teachMode,callback:function(t){e.$set(e.maskForm,"teachMode","string"===typeof t?t.trim():t)},expression:"maskForm.teachMode"}},[r("el-option",{attrs:{label:"线上课",value:"ONLINE"}}),e._v(" "),r("el-option",{attrs:{label:"线下课",value:"OFFLINE"}})],1)],1):e._e(),e._v(" "),"HIGH"==e.maskForm.type||"HIGH_ONLINE"==e.maskForm.type?r("el-form-item",{attrs:{label:"课程类型",prop:"courseType"}},[r("el-select",{staticStyle:{width:"220px !important"},attrs:{clearable:""},on:{change:e.typeChangeHight},model:{value:e.maskForm.teachMode,callback:function(t){e.$set(e.maskForm,"teachMode","string"===typeof t?t.trim():t)},expression:"maskForm.teachMode"}},[r("el-option",{attrs:{label:"线上课",value:"ONLINE"}}),e._v(" "),r("el-option",{attrs:{label:"线下课",value:"OFFLINE"}})],1)],1):e._e(),e._v(" "),"OFFLINE"==e.maskForm.teachMode?r("el-form-item",{attrs:{label:"教学地点"}},[r("el-select",{staticStyle:{width:"220px !important"},attrs:{filterable:"",clearable:""},model:{value:e.maskForm.address,callback:function(t){e.$set(e.maskForm,"address","string"===typeof t?t.trim():t)},expression:"maskForm.address"}},e._l(e.schoolList,(function(e,t){return r("el-option",{key:t,attrs:{value:e.id,label:e.name}})})),1)],1):e._e()],1),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.$listeners.closeReset}},[e._v("\n 取 消\n ")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.submitResetClass}},[e._v("\n 确 定\n ")])],1)],1)},n=[],s=(r("ac6a"),r("28a5"),r("c80c")),o=(r("96cf"),r("3b8d")),i=r("c466"),c=r("1cc7"),u=r("7e78"),m=r("8018"),l=r("99b4"),d=r("e3eb"),h=r.n(d),f=r("5a0c"),p=r.n(f),g={props:["show","id","isDisabled"],data:function(){return{courseVisible:!1,baseTimer:0,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:[],typeTimeList:[],courseTimeList:{},organId:"",bigin:this.beginDate()}},watch:{id:function(e){e&&this.getDetail(e)},"maskForm.timer":function(e){var t=this;this.$nextTick((function(r){e?t.$set(t.maskForm,"endTime",Object(i["d"])(t.maskForm.date,t.maskForm.startTime,e)):t.$set(t.maskForm,"endTime","")}))}},created:function(){this},mounted:function(){var e=Object(o["a"])(Object(s["a"])().mark((function e(){return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.$store.dispatch("setTeachers"),this.getDetail(this.id);case 2:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:{submitResetClass:function(){var e=this,t=this.maskForm;if(t.startTime&&t.endTime){var r=p()(t.date+" "+t.startTime).diff(new Date,"second");r<=0?this.$message.error("课程开始时间必须大于当前时间"):this.$confirm("是否确定?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var r=t.assistant.join(",");if(r.length<=0);var a={actualTeacherId:t.teacher,startClassTimeStr:t.startTime,endClassTimeStr:"MUSIC"==t.groupType||"LIVE"==t.groupType?t.endTime:null,id:t.id,teachingTeacherIdList:r,classDate:t.date,type:t.type,groupType:t.groupType,schoolId:e.maskForm.address,teachMode:e.maskForm.teachMode};Object(c["uc"])(h()(a)).then((function(t){200==t.code&&(e.$message.success("修改成功"),e.$emit("getList"),e.$emit("closeReset")),206==t.code&&e.$confirm("当前课程课酬预计为0,是否继续","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(t){a.allowZeroSalary=!0,Object(c["uc"])(h()(a)).then((function(t){200==t.code&&(e.$message.success("修改成功"),e.$emit("getList"),e.$emit("closeReset"))}))}))}))})).catch((function(){}))}else this.$message.error("请填写开始时间或结束时间")},typeChange:function(){this.$set(this.maskForm,"address",null)},typeChangeHight:function(e){this.$set(this.maskForm,"address",null),"ONLINE"==e?this.$set(this.maskForm,"type","HIGH_ONLINE"):this.$set(this.maskForm,"type","HIGH")},changeStartTime:function(e){var t=this;this.$nextTick((function(r){e?t.$set(t.maskForm,"endTime",Object(i["d"])(t.maskForm.date,e,t.maskForm.timer)):t.$set(t.maskForm,"endTime","")}))},changeTime:function(e){var t=this;this.$nextTick((function(r){t.maskForm.endTime=Object(i["d"])(t.maskForm.date,t.maskForm.startTime,e)}))},changeTeacher:function(e){var t=this;e&&(Object(m["g"])({userId:e}).then((function(e){200==e.code&&(t.schoolList=e.data)})),this.maskForm.address=null)},getDetail:function(e){var t=this;Object(c["cb"])({courseScheduleId:e}).then(function(){var e=Object(o["a"])(Object(s["a"])().mark((function e(r){var a,n,o,d,h,f,g;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(200!=r.code){e.next=35;break}for(a in t.maskForm={id:r.data.id,teacher:r.data.actualTeacherId,assistant:[],date:p()(r.data.classDate).format("YYYY-MM-DD"),startTime:p()(r.data.startClassTime).format("HH:mm"),endTime:p()(r.data.endClassTime).format("HH:mm"),timer:null,type:r.data.type,groupType:r.data.groupType,address:r.data.schoolId,teachMode:r.data.teachMode},t.courseTimeList)a==row.courseScheduleType&&(t.typeTimeList=t.courseTimeList[a].split(","));if(t.maskForm.assistant=r.data.teachingTeacherIdList,n=Object(i["e"])(p()(r.data.classDate).format("YYYY-MM-DD"),p()(r.data.startClassTime).format("HH:mm"),p()(r.data.endClassTime).format("HH:mm")),t.organId=r.data.organId,o=r.data.type,"MUSIC"!=r.data.groupType){e.next=20;break}return e.prev=8,e.next=11,Object(c["wb"])({organId:t.organId});case 11:for(h in d=e.sent,t.courseTimeList=d.data,t.courseTimeList)h==o&&(t.typeTimeList=t.courseTimeList[h].split(","));e.next=18;break;case 16:e.prev=16,e.t0=e["catch"](8);case 18:e.next=32;break;case 20:if("LIVE"!=r.data.groupType){e.next=32;break}return e.prev=21,e.next=24,Object(u["ab"])({groupType:"LIVE"});case 24:f=e.sent,g=f.data,console.log(g,"data"),g.forEach((function(e){t.typeTimeList.push(e.singleClassMinutes)})),e.next=32;break;case 30:e.prev=30,e.t1=e["catch"](21);case 32:t.baseTimer=n,t.maskForm.timer=n,t.maskForm.teacher&&"VIP"==t.maskForm.type?Object(m["g"])({userId:t.maskForm.teacher}).then((function(e){200==e.code&&(t.schoolList=e.data)})):Object(l["t"])({organId:r.data.organId}).then((function(e){200==e.code&&(t.schoolList=e.data)}));case 35:case"end":return e.stop()}}),e,null,[[8,16],[21,30]])})));return function(t){return e.apply(this,arguments)}}())},beginDate:function(){return{firstDayOfWeek:1,disabledDate:function(e){return e.getTime()+864e5<=(new Date).getTime()}}}}},b=g,k=(r("7c19"),r("2877")),T=Object(k["a"])(b,a,n,!1,null,"37cc7fe4",null);t["a"]=T.exports},"7c19":function(e,t,r){"use strict";r("9478")},8018:function(e,t,r){"use strict";r.d(t,"w",(function(){return c})),r.d(t,"t",(function(){return u})),r.d(t,"h",(function(){return m})),r.d(t,"e",(function(){return l})),r.d(t,"v",(function(){return d})),r.d(t,"u",(function(){return h})),r.d(t,"n",(function(){return f})),r.d(t,"C",(function(){return p})),r.d(t,"D",(function(){return g})),r.d(t,"y",(function(){return b})),r.d(t,"x",(function(){return k})),r.d(t,"B",(function(){return T})),r.d(t,"g",(function(){return y})),r.d(t,"q",(function(){return F})),r.d(t,"z",(function(){return v})),r.d(t,"A",(function(){return O})),r.d(t,"s",(function(){return j})),r.d(t,"i",(function(){return D})),r.d(t,"m",(function(){return I})),r.d(t,"r",(function(){return H})),r.d(t,"a",(function(){return w})),r.d(t,"l",(function(){return M})),r.d(t,"o",(function(){return $})),r.d(t,"p",(function(){return x})),r.d(t,"k",(function(){return L})),r.d(t,"d",(function(){return S})),r.d(t,"c",(function(){return C})),r.d(t,"j",(function(){return _})),r.d(t,"b",(function(){return N})),r.d(t,"f",(function(){return G}));var a=r("b775"),n=r("4328"),s=r.n(n),o=r("829b"),i="/api-web";function c(e){return Object(a["a"])({url:i+"/teacher/queryPage",method:"get",params:e})}function u(e){return Object(a["a"])({url:i+"/teacher/get",method:"get",params:e})}function m(e){return Object(a["a"])({url:i+"/teacher/getTeacherMusicClass",method:"get",params:e})}function l(e){return Object(a["a"])({url:i+"/demoGroup/findTeacherDemoGroups",method:"get",params:e})}function d(e){return Object(a["a"])({url:i+"/teacher/queryCloses",method:"get",params:e})}function h(e){return Object(a["a"])({url:i+"/teacherLeaveRecord/queryPage",method:"get",params:e})}function f(e){return Object(a["a"])({url:i+"/teacher/sumTeacherNoPay",method:"get",params:e})}function p(e){return Object(a["a"])({url:i+"/teacherDefaultVipGroupSalary/queryPageByTeacherId",method:"get",params:e})}function g(e){return Object(o["a"])({url:i+"/teacherDefaultVipGroupSalary/upSet",method:"post",data:e})}function b(e){return Object(a["a"])({url:i+"/teacherDefaultMusicGroupSalary/queryPage",method:"get",params:e})}function k(e){return Object(a["a"])({url:i+"/teacherDefaultMusicGroupSalary/batchUpset",method:"post",data:e})}function T(e){return Object(a["a"])({url:i+"/courseSchedule/updateTeacherCoursesSalary",method:"post",data:s.a.stringify(e)})}function y(e){return Object(a["a"])({url:i+"/school/findVipSchoolByTeacher",method:"get",params:e})}function F(e){return Object(a["a"])({url:i+"/teacher/add",method:"post",data:s.a.stringify(e)})}function v(e){return Object(a["a"])({url:i+"/teacher/update",method:"post",data:s.a.stringify(e)})}function O(e){return Object(a["a"])({url:i+"/teacher/update1",method:"post",data:s.a.stringify(e)})}function j(e){return Object(a["a"])({url:i+"/teacherFreeTime/query",method:"get",params:e})}function D(e){return Object(a["a"])({url:i+"/teacherAttendance/getTeacherPersonalAttendanceDetail",method:"get",params:e})}function I(e){return Object(a["a"])({url:i+"/teacherFreeTime/updateSet",method:"post",data:s.a.stringify(e)})}function H(e){return Object(a["a"])({url:i+"/teacherDefaultPracticeGroupSalary/queryPageByTeacherId",method:"get",params:e})}function w(e){return Object(o["a"])({url:i+"/teacherDefaultPracticeGroupSalary/update",method:"post",data:e})}function M(e){return Object(a["a"])({url:i+"/sysTenantAccount/queryTenantAccountDetail",method:"get",params:e})}function $(e){return Object(a["a"])({url:i+"/sysTenantAccount/addMinutes",method:"post",data:s.a.stringify(e)})}function x(e){return Object(a["a"])({url:i+"/sysTenantAccount/subtractMinutes",method:"post",data:s.a.stringify(e)})}function L(e){return Object(a["a"])({url:i+"/sysTenantAccount/get",method:"get",params:e})}function S(e){return Object(a["a"])({url:i+"/coursesGroupController/findTeacherCourseGroupsWithWeb",method:"get",params:e})}function C(e){return Object(a["a"])({url:i+"/courseSchedule/classGroupTeacherAdjust",method:"post",data:s.a.stringify(e)})}function _(e){return Object(a["a"])({url:i+"/teacher/queryStudent",method:"get",params:e})}function N(e){return Object(a["a"])({url:i+"/studentManage/batchUpdateAdviser",method:"post",data:s.a.stringify(e)})}function G(e){return Object(a["a"])({url:i+"/courseScheduleTeacherSalary/getCourseTeachers",method:"get",params:e})}},9478:function(e,t,r){},c466:function(e,t,r){"use strict";r.d(t,"n",(function(){return o})),r.d(t,"f",(function(){return i})),r.d(t,"g",(function(){return c})),r.d(t,"h",(function(){return u})),r.d(t,"i",(function(){return m})),r.d(t,"j",(function(){return l})),r.d(t,"e",(function(){return d})),r.d(t,"d",(function(){return h})),r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return g})),r.d(t,"k",(function(){return b})),r.d(t,"l",(function(){return k})),r.d(t,"m",(function(){return T}));r("a481");var a=r("5a0c"),n=r.n(a),s=r("56d7");function o(e){var t=e.getFullYear(),r=e.getMonth()+1,a=e.getDate();return r=r<10?"0"+r:r,a=a<10?"0"+a:a,t+"-"+r+"-"+a}function i(e){return e.setDate(1),e}function c(e){var t=e.getMonth(),r=++t,a=new Date(e.getFullYear(),r,1),n=864e5;return new Date(a-n)}function u(e){var t=new Date(e.replace(/-/g,"/")).getTime(),r=new Date(e);0==r.getDay()&&(t-=6048e5);var a=t-24*(r.getDay()-1)*60*60*1e3,n=new Date(a),s=n.getFullYear(),o=n.getMonth()+1<10?"0"+(n.getMonth()+1):n.getMonth()+1,i=n.getDate()<10?"0"+n.getDate():n.getDate(),c=s+"-"+o+"-"+i;return c}function m(e){var t=new Date(e.replace(/-/g,"/")).getTime(),r=new Date(e),a=7-r.getDay();7==a&&(a=0);var n=t+24*a*60*60*1e3,s=new Date(n),o=s.getFullYear(),i=s.getMonth()+1<10?"0"+(s.getMonth()+1):s.getMonth()+1,c=s.getDate()<10?"0"+s.getDate():s.getDate(),u=o+"-"+i+"-"+c;return u}function l(e){var t=new Date(e.replace(/-/g,"/")).getDay();return 0===t&&(t=7),t}function d(e,t,r){return Math.abs(n()(e+" "+t).diff(e+" "+r,"Minute"))}function h(e,t,r){var a=n()(e+" "+t).add(r,"minute");return n()(e+" 21:00").isBefore(a)?(s["$message"].error("课程结束时间不可超过21:00点,请重新设置开始时间"),""):a.format("HH:mm")}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=n()("2021-12-17 "+e).add(t,"minute");return r.format("HH:mm:ss")}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=n()("2021-12-17 "+e).add(t,"minute").add(1,"second");return r.format("HH:mm:ss")}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=n()("2021-12-17 "+e).add(t,"minute").subtract(1,"second");return r.format("HH:mm:ss")}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=n()("2021-12-17 "+e).subtract(t,"minute");return r.format("HH:mm:ss")}function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=n()("2021-12-17 "+e).subtract(t,"minute").add(1,"second");return r.format("HH:mm:ss")}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=n()("2021-12-17 "+e).subtract(t,"minute").subtract(1,"second");return r.format("HH:mm:ss")}}}]);