(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-21c4b344"],{"09eb":function(e,t,s){},2679:function(e,t,s){},"6abc":function(e,t,s){},"946a":function(e,t,s){"use strict";s("2679")},a0c0:function(e,t,s){"use strict";var r=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("el-table",{ref:"studentTable",attrs:{data:e.list,"header-cell-style":{background:"#EDEEF0",color:"#444"},"tooltip-effect":"dark","max-height":"300px"},on:{"selection-change":e.handleSelectionChange}},[e.isChiose?s("el-table-column",{attrs:{type:"selection",selectable:e.checkSelectable,width:"55"}}):e._e(),e._v(" "),s("el-table-column",{attrs:{prop:"userId",align:"center",width:"120",label:"学员编号"}}),e._v(" "),s("el-table-column",{attrs:{prop:"nickName",align:"center",width:"120",label:"学员姓名"}}),e._v(" "),s("el-table-column",{attrs:{prop:"name",align:"center",width:"120",label:"性别"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("div",[e._v("\n "+e._s(e._f("sex")(t.row.gender))+"\n ")])]}}])}),e._v(" "),s("el-table-column",{attrs:{prop:"phone",align:"center",width:"120",label:"联系电话"}}),e._v(" "),s("el-table-column",{attrs:{prop:"subjectNames",align:"center",label:"专业"}})],1),e._v(" "),e.showOk?s("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.$listeners.close(e.selectList)}}},[e._v("确 定")])],1):e._e(),e._v(" "),e.showOk?s("div",{staticStyle:{clear:"both"}}):e._e()],1)},a=[],i=(s("ac6a"),{props:["list","isChiose","chioseList","showOk","disabledList","classId"],data:function(){return{selectList:this.chioseList}},mounted:function(){var e=this;if(this.chioseList){var t=this.chioseList.map((function(e,t){return e.userId}));this.list.forEach((function(s,r){-1!=t.indexOf(s.userId)&&e.$refs.studentTable.toggleRowSelection(s,!0)}))}},methods:{handleSelectionChange:function(e){this.selectList=e},checkSelectable:function(e){var t=this,s=!0;return this.disabledList&&this.disabledList.length>0&&this.disabledList.forEach((function(r){r.userId==e.userId&&r.classId!=t.classId&&(s=!1)})),s}}}),n=i,o=(s("cdb4"),s("2877")),c=Object(o["a"])(n,r,a,!1,null,"ce3060a2",null);t["a"]=c.exports},a65e:function(e,t,s){"use strict";s("09eb")},cdb4:function(e,t,s){"use strict";s("6abc")},f035:function(e,t,s){"use strict";s.r(t);var r=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"m-container"},[s("h2",[s("el-page-header",{attrs:{content:e.$route.query.name},on:{back:e.goBack}})],1),e._v(" "),s("div",{staticClass:"m-core"},[s("div",{staticClass:"topWrap"},[s("el-form",{attrs:{inline:!0,model:e.topForm}},[s("el-form-item",{attrs:{label:"班级类型"}},[s("el-select",{attrs:{clearable:"",filterable:""},on:{change:e.changeMixClass},model:{value:e.topForm.classType,callback:function(t){e.$set(e.topForm,"classType","string"===typeof t?t.trim():t)},expression:"topForm.classType"}},e._l(e.musicClassTypeList,(function(e,t){return s("el-option",{key:t,attrs:{label:e.label,value:e.value}})})),1)],1)],1)],1),e._v(" "),s("div",{staticClass:"btnList"},[s("el-form",{attrs:{inline:!0}},[s("el-form-item",{attrs:{label:"开课日期:"}},[s("p",[e._v(e._s(e.form.startCourseDate))])]),e._v(" "),s("el-form-item",[s("auth",{attrs:{auths:"musicGroupSchoolTermCourseDetail/upset/4444"}},[s("el-button",{attrs:{type:"primary"},on:{click:e.resetStartTime}},[e._v("修改")])],1)],1),e._v(" "),e.form.endSchoolTerm?s("el-form-item",[s("p",{staticStyle:{color:"red"}},[e._v("该学期结束日期为:"+e._s(e.form.endSchoolTerm))])]):e._e()],1)],1),e._v(" "),s("div",{staticClass:"tableWrap"},[s("el-table",{ref:"multipleTable",attrs:{data:e.activeSingleList,"row-key":"id","header-cell-style":{background:"#EDEEF0",color:"#444"},"tooltip-effect":"dark","row-class-name":e.getClassName},on:{"expand-change":e.changeDetail}},[s("el-table-column",{attrs:{type:"expand"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("el-table",{attrs:{data:t.row.courseData,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[s("el-table-column",{attrs:{align:"center",prop:"name",label:"课程类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("div",[e._v(e._s(e._f("courseTypeFormat")(t.row.type)))])]}}],null,!0)}),e._v(" "),s("el-table-column",{attrs:{align:"center",prop:"name",label:"课程名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("div",[e._v(e._s(t.row.name))])]}}],null,!0)}),e._v(" "),s("el-table-column",{attrs:{align:"center",prop:"name",label:"预开始时间",width:"200px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.startClassTime?t.row.startClassTime.substr(0,16):"")+"-"+e._s(t.row.endClassTime?t.row.endClassTime.substr(11,5):""))]}}],null,!0)}),e._v(" "),s("el-table-column",{attrs:{align:"center",prop:"name",label:"课程时长(分钟)"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("div",[e._v("\n "+e._s(e.getCourseTime(t.row))+"\n ")])]}}],null,!0)}),e._v(" "),s("el-table-column",{attrs:{align:"center",prop:"actualTeacherName",label:"主教老师"}}),e._v(" "),s("el-table-column",{attrs:{align:"center",prop:"teachingTeacherNames",label:"助教老师"}})],1)]}}])}),e._v(" "),s("el-table-column",{attrs:{align:"center",prop:"name",label:"班级名称"}}),e._v(" "),s("el-table-column",{attrs:{align:"center",prop:"type",label:"班级类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("div",[e._v(e._s(e._f("classType")(t.row.type)))])]}}])}),e._v(" "),s("el-table-column",{attrs:{align:"center",prop:"studentNum",label:"当前班级人数"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("div",[e._v(e._s(t.row.studentNum)+"人")])]}}])}),e._v(" "),s("el-table-column",{attrs:{align:"center",prop:"",label:"主教老师"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.classGroupTeacherMapperList?s("div",e._l(t.row.classGroupTeacherMapperList,(function(t,r){return s("p",{key:r},["BISHOP"==t.teacherRole?s("span",[e._v("\n "+e._s(t.userName)+"\n ")]):e._e()])})),0):e._e()]}}])}),e._v(" "),s("el-table-column",{attrs:{align:"center",label:"助教老师"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.classGroupTeacherMapperList?s("div",e._l(t.row.classGroupTeacherMapperList,(function(t,r){return s("p",{key:r},["TEACHING"==t.teacherRole?s("span",[e._v("\n "+e._s(t.userName)+"\n ")]):e._e()])})),0):e._e()]}}])}),e._v(" "),s("el-table-column",{attrs:{align:"center",label:"已预排课次(节)"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("div",[e._v(e._s(t.row.preTotalClassTimes))])]}}])}),e._v(" "),s("el-table-column",{attrs:{align:"center",label:"已预排课时长(分钟)"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("div",[e._v(e._s(t.row.preMinutes))])]}}])}),e._v(" "),s("el-table-column",{attrs:{align:"center",label:"剩余可排课时长(分钟)"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("div",[e._v(e._s(t.row.preSubMinutes))])]}}])}),e._v(" "),"PREPARE"==e.team_status||"PROGRESS"==e.team_status?s("el-table-column",{attrs:{align:"center",width:"240px",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return 1!=t.row.lockFlag?[s("div",[0==t.row.preTotalClassTimes?s("el-button",{attrs:{type:"text"},on:{click:function(s){return e.planCourse(t.row)}}},[e._v("预排课")]):s("el-button",{attrs:{type:"text"},on:{click:function(s){return e.cancleCourse(t.row)}}},[e._v("取消排课")])],1)]:void 0}}],null,!0)}):e._e()],1),e._v(" "),s("div",{staticClass:"lastBtnWrap"},[s("el-button",{attrs:{type:"primary"},on:{click:e.submitCourse}},[e._v("确认排课")])],1)],1)]),e._v(" "),s("el-dialog",{attrs:{title:"请设置开课日期",visible:e.startVisible,width:"500px"},on:{"update:visible":function(t){e.startVisible=t}}},[s("el-form",{ref:"form",attrs:{model:e.form}},[s("el-form-item",{attrs:{label:"开课日期",prop:"startCourseDate",rules:[{required:!0,message:"请选择开课日期"}]}},[s("el-date-picker",{attrs:{type:"date","picker-options":e.pickerOptions,"value-format":"yyyy-MM-dd",placeholder:"请选择时间"},model:{value:e.form.startCourseDate,callback:function(t){e.$set(e.form,"startCourseDate","string"===typeof t?t.trim():t)},expression:"form.startCourseDate"}})],1)],1),e._v(" "),s("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{attrs:{type:"primary"},on:{click:e.setStartTime}},[e._v("确 定")])],1)],1),e._v(" "),s("el-dialog",{attrs:{title:"班级排课",width:"1200px","modal-append-to-body":!1,visible:e.courseVisible},on:{"update:visible":function(t){e.courseVisible=t}}},[e.courseVisible?s("memberClassSetting",{attrs:{musicGroupSchoolTermCourseDetailId:e.musicGroupSchoolTermCourseDetailId,teacherList:e.teacherList,cooperationList:e.cooperationList,courseTypeList:e.courseTypeList,musicGroupId:e.teamid,activeType:e.activeType,detail:e.classDteail,startCourseDate:e.form.startCourseDate,endSchoolTerm:e.form.endSchoolTerm},on:{close:function(t){e.courseVisible=!1},submited:e.getList}}):e._e()],1)],1)},a=[],i=(s("ac6a"),s("5530")),n=(s("96cf"),s("1da1")),o=s("1cc7"),c=s("92e3"),l=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("el-form",{ref:"form",attrs:{model:e.form,inline:"","label-suffix":": ","label-width":"130px"}},[Object.keys(e.allClasss).length?s("el-form-item",{staticStyle:{display:"block"},attrs:{label:"排课类型","label-width":"88px"}},[e._l(e.allClasss,(function(t,r){return s("el-tag",{key:r,staticClass:"tag",attrs:{effect:e.form.classs[r]?"dark":"plain"},on:{click:function(t){return e.changeTag(r)}}},[e._v(e._s(e.courseTypeListByName[r]))])})),e._v(" "),s("el-button",{staticClass:"studentTitle",attrs:{type:"text",disabled:!e.detail.id},on:{click:function(t){e.studentListModalVisible=!0}}},[e._v("学员列表>>")])],2):e._e(),e._v(" "),e.isEmpty?s("empty",{attrs:{desc:"暂无可排课时长"}}):e._e(),e._v(" "),s("p",{staticClass:"title"},[s("span",[e._v("该班级截止到"+e._s(e.endSchoolTerm)+"可预排课时长:"+e._s(e.activeCourseTime)+"分钟")]),e._v(" "),s("span",[e._v("已排课时长:"+e._s(e.musicSurplus)+"分钟,请根据教学规划安排各类型课程的课时数\n "),s("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[s("div",{attrs:{slot:"content"},slot:"content"},[e._v("开课日期至本学期截止日期周次*4*45")]),e._v(" "),s("i",{directives:[{name:"permission",rawName:"v-permission",value:"export/teacherSalary",expression:"'export/teacherSalary'"}],staticClass:"el-icon-question micon el-tooltip",staticStyle:{"font-size":"18px",color:"#f56c6c"}})])],1)]),e._v(" "),s("el-collapse",{on:{change:e.collapseChange},model:{value:e.collapses,callback:function(t){e.collapses=t},expression:"collapses"}},e._l(e.form.classs,(function(t,r,a){return s("el-collapse-item",{key:r,attrs:{name:a},scopedSlots:e._u([{key:"title",fn:function(){return[s("p",{staticClass:"coursetitle"},[e._v("\n "+e._s(e.courseTypeListByName[r])+"\n "),s("span",[e._v("已排课时长:"+e._s(e.courseTimeList[r])+"分钟")])])]},proxy:!0}],null,!0)},[e._v(" "),s("courseItem",{attrs:{endSchoolTerm:e.endSchoolTerm,startCourseDate:e.startCourseDate,surplustime:e.activeCourseTime,teacherList:e.teacherList,activeType:e.activeType,cooperationList:e.cooperationList,coreid:e.coreid,assistant:e.assistant,type:r,form:t,prices:e.prices,holidays:e.holidays,selectPrice:e.selectPrices?e.selectPrices[r]:""},on:{setUserTime:e.setUserTime}})],1)})),1)],1),e._v(" "),5!=e.classType?s("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:e.$listeners.close}},[e._v("取 消")]),e._v(" "),s("el-button",{attrs:{type:"primary",disabled:e.isEmpty},on:{click:e.submit}},[e._v("确定")])],1):e._e(),e._v(" "),e.studentListModalVisible?s("el-dialog",{attrs:{title:"学员列表",width:"700px",visible:e.studentListModalVisible,"append-to-body":""},on:{"update:visible":function(t){e.studentListModalVisible=t}}},[e.studentListModalVisible?s("viewStudentList",{attrs:{list:e.studentList,showOk:!0,isChiose:!1},on:{close:function(t){e.studentListModalVisible=!1}}}):e._e()],1):e._e()],1)},u=[],p=s("ade3"),m=(s("7f7f"),s("b85c")),d=s("1283"),h=s("704d"),f=s("2ef0"),v=s("5137"),b=s("1672"),y=s("a7ba"),g=s("a0c0"),T=function(e,t){var s=[];if(e&&s.push({userId:e,teacherRole:"BISHOP"}),t){var r,a=Object(m["a"])(t);try{for(a.s();!(r=a.n()).done;){var i=r.value;s.push({userId:i,teacherRole:"TEACHING"})}}catch(n){a.e(n)}finally{a.f()}}return s},_={components:{courseItem:d["a"],viewStudentList:g["a"]},props:["activeType","courseTypeList","musicGroupId","detail","studentSubmitedData","classType","musicGroupPaymentCalenderDtos","classIdList","classGroupStudents","selectPrices","classCouresTimeList","teacherList","cooperationList","endSchoolTerm","startCourseDate","musicGroupSchoolTermCourseDetailId"],data:function(){return{form:{coreTeacher:"",assistant:"",classs:{}},allClasss:{},prices:{},collapses:[0],courseTimes:{},courseTypeListByName:{},musicCourseSettings:0,musicSurplus:0,courseTimeList:{},previewVisible:!1,previewList:[],holidays:[],studentListModalVisible:!1,studentList:[]}},mounted:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,h["a"].dispatch("getBaseInfo",{data:{musicGroupId:this.musicGroupId}});case 3:e.next=7;break;case 5:e.prev=5,e.t0=e["catch"](0);case 7:Object(v["g"])({classGroupId:this.detail.id}).then((function(e){200==e.code&&(t.studentList=e.data.map((function(e){return{userId:e.userId,nickName:e.name,gender:e.gender,phone:e.parentsPhone,subjectNames:e.subjectName}})))})),this.setCourseTypeListByName(),this.formatClasss(),this.FetchHoliday();case 11:case"end":return e.stop()}}),e,this,[[0,5]])})));function t(){return e.apply(this,arguments)}return t}(),methods:{FetchHoliday:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,s,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(y["a"])({group:"holiday"});case 3:return t=e.sent,e.next=6,Object(b["q"])({organId:this.musicGroup.organId});case 6:if(s=e.sent,this.holidays=JSON.parse(t.data[0].paranValue),this.prices=s.data,r=[],"{}"==JSON.stringify(this.prices)&&r.push("teamCourseTimer"),this.holidays.length<=0&&r.push("holiday"),!(r.length>0)){e.next=15;break}return this.$bus.$emit("showguide",r),e.abrupt("return");case 15:e.next=20;break;case 17:e.prev=17,e.t0=e["catch"](0),console.log(e.t0);case 20:case"end":return e.stop()}}),e,this,[[0,17]])})));function t(){return e.apply(this,arguments)}return t}(),setCourseTypeListByName:function(){var e,t={},s=Object(m["a"])(this.courseTypeList);try{for(s.s();!(e=s.n()).done;){var r=e.value;"HIGH"==r.value||"HIGH_ONLINE"==r.value||(t[r.value]=r.label)}}catch(a){s.e(a)}finally{s.f()}this.courseTypeListByName=t},formatClasss:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,s,r,a,n,o,c,l,u,d,h,f,v;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.coreid="",this.assistant=[],this.detail){s=this.detail.classGroupTeacherMapperList,r=Object(m["a"])(s||[]);try{for(r.s();!(a=r.n()).done;)n=a.value,"BISHOP"===n.teacherRole&&(this.coreid=String(n.userId)),"TEACHING"===n.teacherRole&&this.assistant.push(n.userId)}catch(b){r.e(b)}finally{r.f()}this.$set(this.form,"coreTeacher",String(this.coreid)),this.$set(this.form,"assistant",this.assistant)}if(o=null===(t=this.detail)||void 0===t?void 0:t.id,o){e.next=7;break}return this.$message.error("班级信息错误"),e.abrupt("return");case 7:this.musicCourseSettings=this.detail.preSubMinutes,c={},l=Object(m["a"])(this.courseTypeList);try{for(l.s();!(u=l.n()).done;)d=u.value,h=d.value,"HIGH"==d.value||"HIGH_ONLINE"==d.value||(this.courseTimeList[h]=0,c[h]={courseTotalMinuties:this.musicCourseSettings,cycle:[{time:this.selectPrices?this.selectPrices[h]:void 0,coreTeacher:this.coreid,assistant:this.assistant}]})}catch(b){l.e(b)}finally{l.f()}f=this.courseTypeList[0].value,this.allClasss=Object(i["a"])({},c),v=Object(p["a"])({},f,c[this.courseTypeList[0].value]),this.$set(this.form,"classs",v);case 15:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),collapseChange:function(e){this.collapses=e},submit:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!(this.activeCourseTime<0)){e.next=3;break}return this.$message.error("课程使用时长超过最大预排课数"),e.abrupt("return");case 3:this.$refs.form.validate(function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(s){var r,a,i,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!s){e.next=25;break}for(i in r=[],a=function(e){if(t.form.classs.hasOwnProperty(e)){var s,a,i,n,o=t.form.classs[e],c={confirmGenerate:!0,type:t.detail?void 0:t.activeType,courseType:e,classGroupName:(null===(s=t.studentSubmitedData)||void 0===s?void 0:s.name)||(null===(a=t.detail)||void 0===a?void 0:a.name)||t.form.className,classGroupId:null===(i=t.detail)||void 0===i?void 0:i.id,musicGroupId:t.musicGroupId,startDate:o.courseTime,classGroupTeacherMapperList:T(t.form.coreTeacher,t.form.assistant),holiday:o.holiday,students:null===(n=t.studentSubmitedData)||void 0===n?void 0:n.seleched,courseTimes:o.cycle.length,courseTimeDtoList:o.cycle.map((function(s){return{classGroupTeacherMapperList:t.formatTeacher(s),courseType:e,dayOfWeek:s.dayOfWeek,endClassTime:s.endClassTime,startClassTime:s.startClassTime,startDate:s.startDate,endDate:s.endDate,holiday:s.holiday,expectCourseNum:s.expectCourseNum,expectCourseMinutes:s.time}})),musicGroupSchoolTermCourseDetailId:t.musicGroupSchoolTermCourseDetailId};r.push(c)}},t.form.classs)a(i);return e.prev=4,e.next=7,Object(o["oc"])(r);case 7:if(n=e.sent,207!=n.code){e.next=17;break}return e.next=11,t.$confirm(n.msg||"当前课程课酬预计为0,是否继续","提示",{type:"warning"});case 11:return r.forEach((function(e){e.allowZeroSalary=!0})),e.next=14,Object(o["oc"])(r);case 14:return t.$listeners.submited(),t.$listeners.close(),e.abrupt("return");case 17:t.$message.success("排课成功"),t.$listeners.submited(),t.$listeners.close(),e.next=25;break;case 22:e.prev=22,e.t0=e["catch"](4),console.log(e.t0);case 25:case"end":return e.stop()}}),e,null,[[4,22]])})));return function(t){return e.apply(this,arguments)}}());case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),setUserTime:function(e,t){for(var s in this.$set(this.courseTimeList,t,e||0),this.musicSurplus=0,this.courseTimeList)this.musicSurplus+=this.courseTimeList[s];this.$forceUpdate()},changeTag:function(e){var t=Object(i["a"])({},this.form.classs);t[e]?delete t[e]:t[e]=this.allClasss[e],this.$set(this.form,"classs",t)},formatTeacher:function(e){var t,s=[];if(e.coreTeacher){var r={teacherRole:"BISHOP"};r.userId=e.coreTeacher,s.push(r)}return(null===(t=e.assistant)||void 0===t?void 0:t.length)>0&&e.assistant.forEach((function(e){s.push({teacherRole:"TEACHING",userId:e})})),s}},watch:{watch:{courseTypeList:function(){this.setCourseTypeListByName()},detail:function(){this.formatClasss()}}},computed:{musicGroup:function(){return h["a"].state.musicGroup},isEmpty:function(){return Object(f["isEmpty"])(this.form.classs)},surplustime:function(){return this.detail.preSubMinutes},activeCourseTime:function(){var e=this.detail.preSubMinutes-this.musicSurplus;return e}}},C=_,w=(s("946a"),s("2877")),S=Object(w["a"])(C,l,u,!1,null,"0a9fd87b",null),k=S.exports,L=s("fa7d"),x=s("c466"),I=s("5a0c"),D=s.n(I),O={components:{memberClassSetting:k},data:function(){return{musicClassTypeList:c["z"],topForm:{classType:""},team_status:"",activeSingleList:[],form:{startCourseDate:"",endSchoolTerm:""},startVisible:!1,pickerOptions:{firstDayOfWeek:1,disabledDate:function(e){return e.getTime()+864e5<=(new Date).getTime()}},lastDate:"",musicGroupSchoolTermCourseDetailId:"",courseVisible:!1,teacherList:[],courseTypeList:[],cooperationList:[],activeType:"",teamid:"",classDteail:null}},mounted:function(){this.init(),this.$route.meta.nogo=!0},methods:{init:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,s=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.teamid=this.$route.query.id,this.team_status=this.$route.query.team_status,this.musicGroupInfo?(this.organId=this.musicGroupInfos.organId,this.chargeTypeId=this.musicGroupInfos.chargeTypeId,this.courseViewType=this.musicGroupInfos.courseViewType):Object(o["Rb"])({musicGroupId:this.teamid}).then((function(e){200==e.code&&(s.musicGroupInfos=e.data.musicGroup,s.organId=s.musicGroupInfos.organId,s.chargeTypeId=s.musicGroupInfos.chargeTypeId,s.courseViewType=s.musicGroupInfos.courseViewType)})),e.prev=3,e.next=6,Object(o["fc"])({musicGroupId:this.teamid});case 6:t=e.sent,t.data?(this.form.startCourseDate=D()(t.data.startCourseDate).format("YYYY-MM-DD"),this.form.endSchoolTerm=D()(t.data.endSchoolTerm).format("YYYY-MM-DD"),this.musicGroupSchoolTermCourseDetailId=t.data.id):this.startVisible=!0,e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](3),console.log(e.t0);case 13:return Object(o["Pb"])({organId:this.organId}).then((function(e){200==e.code&&(s.cooperationList=e.data,s.teacherList=e.data)})),e.next=16,this.getList();case 16:case"end":return e.stop()}}),e,this,[[3,10]])})));function t(){return e.apply(this,arguments)}return t}(),changeMixClass:function(e){console.log(e),this.getList(e),this.activeMixClass=e},getList:function(e){var t=this;return Object(o["U"])({musicGroupId:this.teamid,type:e}).then((function(e){200==e.code&&(t.activeSingleList=[],e.data.map((function(e){"HIGH"!=e.type&&"DEMO"!=e.type&&"HIGH_ONLINE"!=e.type&&"MUSIC_NETWORK"!=e.type&&"SNAP"!=e.type&&t.activeSingleList.push(e)})))}))},goBack:function(){this.$router.push({path:"/business/resetTeaming",query:Object(i["a"])({},this.$route.query)})},setStartTime:function(){var e=this;this.$refs.form.validate(function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(s){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!s){t.next=14;break}return t.prev=1,t.next=4,Object(o["fc"])({musicGroupId:e.teamid,startCourseDate:e.form.startCourseDate});case 4:r=t.sent,207==r.code&&e.$confirm(r.msg,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(n["a"])(regeneratorRuntime.mark((function t(){var s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(o["fc"])({musicGroupId:e.teamid,startCourseDate:e.form.startCourseDate,cleanPreCourseFlag:!0});case 3:s=t.sent,s.data&&(e.$message.success("修改成功"),e.form.startCourseDate=D()(s.data.startCourseDate).format("YYYY-MM-DD"),e.form.endSchoolTerm=D()(s.data.endSchoolTerm).format("YYYY-MM-DD"),e.musicGroupSchoolTermCourseDetailId=s.data.id,e.startVisible=!1,e.getList()),t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](0),e.form.startCourseDate=e.lastDate;case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))).catch((function(){e.form.startCourseDate=e.lastDate})),console.log(r),200==r.code&&r.data&&(e.form.startCourseDate=D()(r.data.startCourseDate).format("YYYY-MM-DD"),e.form.endSchoolTerm=D()(r.data.endSchoolTerm).format("YYYY-MM-DD"),e.musicGroupSchoolTermCourseDetailId=r.data.id,e.$message.success("修改成功"),e.startVisible=!1,e.getList()),t.next=14;break;case 10:t.prev=10,t.t0=t["catch"](1),e.form.startCourseDate=e.lastDate,console.log(t.t0);case 14:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e){return t.apply(this,arguments)}}())},resetStartTime:function(){this.lastDate=JSON.parse(JSON.stringify(this.form.startCourseDate)),this.startVisible=!0},planCourse:function(e){this.classDteail=e,this.activeType=e.type,this.setType(e.type),this.courseVisible=!0},setType:function(e){this.courseTypeList=Object(L["a"])(e)},cancleCourse:function(e){var t=this;this.$confirm("是否取消预排课","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(n["a"])(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.prev=0,s.next=3,Object(o["p"])({classGroupId:e.id,musicGroupSchoolTermCourseDetailId:t.musicGroupSchoolTermCourseDetailId});case 3:s.sent,t.$message.success("取消成功"),t.$refs.multipleTable.toggleRowExpansion(e,!1),t.getList(),s.next=11;break;case 9:s.prev=9,s.t0=s["catch"](0);case 11:case"end":return s.stop()}}),s,null,[[0,9]])})))).catch((function(){}))},changeDetail:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(t,s){var r,a=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!(s.length>0)){e.next=11;break}return e.prev=1,e.next=4,Object(o["Ab"])({classGroupId:t.id});case 4:r=e.sent,this.activeSingleList.forEach((function(e,s){e.id==t.id&&a.$set(a.activeSingleList[s],"courseData",r.data)})),e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](1),console.log(e.t0);case 11:case"end":return e.stop()}}),e,this,[[1,8]])})));function t(t,s){return e.apply(this,arguments)}return t}(),submitCourse:function(){var e=this;this.$confirm("确定提交预排课列表","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(n["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(o["w"])({musicGroupSchoolTermCourseDetailId:e.musicGroupSchoolTermCourseDetailId});case 3:return t.sent,e.$message.success("提交成功"),t.next=7,e.getList();case 7:e.goBack(),t.next=12;break;case 10:t.prev=10,t.t0=t["catch"](0);case 12:case"end":return t.stop()}}),t,null,[[0,10]])})))).catch((function(){}))},getCourseTime:function(e){return Object(x["e"])(D()(e.classDate).format("YYYY-MM-DD"),D()(e.startClassTime).format("HH:mm"),D()(e.endClassTime).format("HH:mm"))},getClassName:function(e){var t=e.row;e.index;return t.preTotalClassTimes?"":"noShow"}},beforeRouteLeave:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(t,s,r){var a,i=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:a=!1,this.activeSingleList.forEach((function(e){0!=e.preTotalClassTimes&&(a=!0)})),a?this.$confirm("预排课程尚未提交,是否确认跳转其他页面?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(n["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:i.$store.dispatch("delVisitedViews",i.$route),r();case 2:case"end":return e.stop()}}),e)})))).catch((function(){})):(this.$store.dispatch("delVisitedViews",this.$route),r());case 3:case"end":return e.stop()}}),e,this)})));function t(t,s,r){return e.apply(this,arguments)}return t}()},G=O,$=(s("a65e"),Object(w["a"])(G,r,a,!1,null,"78fb8644",null));t["default"]=$.exports}}]);