1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5ded7ad7"],{5491:function(e,t,s){},"85b2b":function(e,t,s){"use strict";s("ca3f")},a0c0:function(e,t,s){"use strict";var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("el-form",{ref:"searchFormRef",staticClass:"forms",attrs:{modal:e.searchForm,inline:""}},[s("el-form-item",{attrs:{prop:"search"}},[s("el-input",{attrs:{placeholder:"请输入姓名/手机号",clearable:""},model:{value:e.searchForm.search,callback:function(t){e.$set(e.searchForm,"search",t)},expression:"searchForm.search"}})],1),e._v(" "),s("el-form-item",{attrs:{prop:"subjectId"}},[s("el-select",{attrs:{clearable:"",placeholder:"请选择专业"},model:{value:e.searchForm.subjectId,callback:function(t){e.$set(e.searchForm,"subjectId",t)},expression:"searchForm.subjectId"}},e._l(e.selects.subjects,(function(e,t){return s("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),s("el-form-item",[s("el-button",{attrs:{type:"primary"},on:{click:e.onSearch}},[e._v("搜索")]),e._v(" "),s("el-button",{attrs:{type:"danger"},on:{click:e.onReset}},[e._v("重置")])],1)],1),e._v(" "),s("el-table",{ref:"studentTable",attrs:{data:e.list,"header-cell-style":{background:"#EDEEF0",color:"#444"},"tooltip-effect":"dark","max-height":"300px"},on:{handleSelectionChange:e.handleSelectionChange,select:e.onTableSelect,"select-all":e.onTableSelectALL}},[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("span",{staticStyle:{display:"flex","align-items":"center","font-size":"16px","padding-right":"8px"}},[e._v("当前选中:"),s("span",{staticStyle:{color:"red"}},[e._v(e._s(e.selectList?e.selectList.length:0))]),e._v("人")]),e._v(" "),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)},r=[],i=(s("ac6a"),s("7f7f"),s("5530")),n=s("c7eb"),o=(s("96cf"),s("1da1")),c=s("5137"),l={props:["isChiose","chioseList","showOk","disabledList","classId","activeRow"],data:function(){return{list:[],loading:!1,soundList:[],searchForm:{search:"",subjectId:null},selectList:this.chioseList||[]}},mounted:function(){var e=Object(o["a"])(Object(n["a"])().mark((function e(){return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.$store.dispatch("setSubjects");case 2:this.getList();case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:{onSearch:function(){this.getList()},onReset:function(){this.searchForm.search="",this.searchForm.subjectId=null,this.getList()},getList:function(){var e=this;Object(c["g"])(Object(i["a"])({classGroupId:this.activeRow.id},this.searchForm)).then((function(t){200==t.code&&(e.loading=!0,e.list=t.data.map((function(e){return{userId:e.userId,nickName:e.name,gender:e.gender,phone:e.parentsPhone,subjectNames:e.subjectName}})),e.$nextTick((function(){if(e.selectList){var t=e.selectList.map((function(e,t){return e.userId}));e.list.forEach((function(s,a){-1!=t.indexOf(s.userId)&&e.$refs.studentTable.toggleRowSelection(s,!0)}))}e.loading=!1})))}))},handleSelectionChange:function(e){console.log(e,"handleSelectionChange")},onTableSelectALL:function(e){var t=this,s=this.list||[];if(e.length>0){var a=this.selectList.map((function(e){return e.userId}));e.forEach((function(e){-1==a.indexOf(e.userId)&&t.selectList.push(e)}))}else{var r=s.map((function(e){return e.userId})),i=this.selectList.map((function(e){return e.userId})),n=[];r.forEach((function(e){-1!==i.indexOf(e)&&n.push(e)})),console.log(r,i,"sids",n);var o=[];this.selectList.forEach((function(e){-1===n.indexOf(e.userId)&&o.push(e)})),this.selectList=o}},onTableSelect:function(e,t){var s=this.selectList.map((function(e){return e.userId})),a=e.map((function(e){return e.userId})),r=-1!==a.indexOf(t.userId);r?-1===s.indexOf(t.userId)&&this.selectList.push(t):-1!==s.indexOf(t.userId)&&this.selectList.splice(s.indexOf(t.userId),1)},clearCom:function(){this.selectList=[],this.$refs.studentTable.clearSelection()},checkSelectable:function(e){var t=this,s=!0;return this.disabledList&&this.disabledList.length>0&&this.disabledList.forEach((function(a){a.userId==e.userId&&a.classId!=t.classId&&(s=!1)})),s}}},u=l,p=(s("d889"),s("2877")),d=Object(p["a"])(u,a,r,!1,null,"2d4ac272",null);t["a"]=d.exports},ca3f:function(e,t,s){},d889:function(e,t,s){"use strict";s("eb96")},e84c:function(e,t,s){"use strict";s("5491")},eb96:function(e,t,s){},f035:function(e,t,s){"use strict";s.r(t);var a=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,a){return s("p",{key:a},["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,a){return s("p",{key:a},["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)},r=[],i=(s("ac6a"),s("5530")),n=s("c7eb"),o=(s("96cf"),s("1da1")),c=s("1cc7"),l=s("92e3"),u=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,a){return s("el-tag",{key:a,staticClass:"tag",attrs:{effect:e.form.classs[a]?"dark":"plain"},on:{click:function(t){return e.changeTag(a)}}},[e._v(e._s(e.courseTypeListByName[a]))])})),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,a,r){return s("el-collapse-item",{key:a,attrs:{name:r},scopedSlots:e._u([{key:"title",fn:function(){return[s("p",{staticClass:"coursetitle"},[e._v("\n "+e._s(e.courseTypeListByName[a])+"\n "),s("span",[e._v("已排课时长:"+e._s(e.courseTimeList[a])+"分钟")])])]},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:a,form:t,prices:e.prices,holidays:e.holidays,selectPrice:e.selectPrices?e.selectPrices[a]:""},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:{activeRow:{id:e.detail.id},select:!1,showOk:!1,isChiose:!1},on:{close:function(t){e.studentListModalVisible=!1}}}):e._e()],1):e._e()],1)},p=[],d=(s("7f7f"),s("ade3")),h=s("b85c"),m=s("1283"),f=s("704d"),b=s("2ef0"),v=(s("5137"),s("1672")),y=s("a7ba"),g=s("a0c0"),T=function(e,t){var s=[];if(e&&s.push({userId:e,teacherRole:"BISHOP"}),t){var a,r=Object(h["a"])(t);try{for(r.s();!(a=r.n()).done;){var i=a.value;s.push({userId:i,teacherRole:"TEACHING"})}}catch(n){r.e(n)}finally{r.f()}}return s},_={components:{courseItem:m["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(o["a"])(Object(n["a"])().mark((function e(){return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,f["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:this.setCourseTypeListByName(),this.formatClasss(),this.FetchHoliday();case 10:case"end":return e.stop()}}),e,this,[[0,5]])})));function t(){return e.apply(this,arguments)}return t}(),methods:{FetchHoliday:function(){var e=Object(o["a"])(Object(n["a"])().mark((function e(){var t,s,a;return Object(n["a"])().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(v["t"])({organId:this.musicGroup.organId});case 6:if(s=e.sent,this.holidays=JSON.parse(t.data[0].paranValue),this.prices=s.data,a=[],"{}"==JSON.stringify(this.prices)&&a.push("teamCourseTimer"),this.holidays.length<=0&&a.push("holiday"),!(a.length>0)){e.next=15;break}return this.$bus.$emit("showguide",a),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(h["a"])(this.courseTypeList);try{for(s.s();!(e=s.n()).done;){var a=e.value;"HIGH"==a.value||"HIGH_ONLINE"==a.value||(t[a.value]=a.label)}}catch(r){s.e(r)}finally{s.f()}this.courseTypeListByName=t},formatClasss:function(){var e=Object(o["a"])(Object(n["a"])().mark((function e(){var t,s,a,r,o,c,l,u,p,m,f,b,v;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.coreid="",this.assistant=[],this.detail){s=this.detail.classGroupTeacherMapperList,a=Object(h["a"])(s||[]);try{for(a.s();!(r=a.n()).done;)o=r.value,"BISHOP"===o.teacherRole&&(this.coreid=String(o.userId)),"TEACHING"===o.teacherRole&&this.assistant.push(o.userId)}catch(n){a.e(n)}finally{a.f()}this.$set(this.form,"coreTeacher",String(this.coreid)),this.$set(this.form,"assistant",this.assistant)}if(c=null===(t=this.detail)||void 0===t?void 0:t.id,c){e.next=7;break}return this.$message.error("班级信息错误"),e.abrupt("return");case 7:this.musicCourseSettings=this.detail.preSubMinutes,l={},u=Object(h["a"])(this.courseTypeList);try{for(u.s();!(p=u.n()).done;)m=p.value,f=m.value,"HIGH"==m.value||"HIGH_ONLINE"==m.value||(this.courseTimeList[f]=0,l[f]={courseTotalMinuties:this.musicCourseSettings,cycle:[{time:this.selectPrices?this.selectPrices[f]:void 0,coreTeacher:this.coreid,assistant:this.assistant}]})}catch(n){u.e(n)}finally{u.f()}b=this.courseTypeList[0].value,this.allClasss=Object(i["a"])({},l),v=Object(d["a"])({},b,l[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(o["a"])(Object(n["a"])().mark((function e(){var t=this;return Object(n["a"])().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(o["a"])(Object(n["a"])().mark((function e(s){var a,r,i,o;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!s){e.next=25;break}for(i in a=[],r=function(e){if(t.form.classs.hasOwnProperty(e)){var s,r,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===(r=t.detail)||void 0===r?void 0:r.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};a.push(c)}},t.form.classs)r(i);return e.prev=4,e.next=7,Object(c["oc"])(a);case 7:if(o=e.sent,207!=o.code){e.next=17;break}return e.next=11,t.$confirm(o.msg||"当前课程课酬预计为0,是否继续","提示",{type:"warning"});case 11:return a.forEach((function(e){e.allowZeroSalary=!0})),e.next=14,Object(c["oc"])(a);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 a={teacherRole:"BISHOP"};a.userId=e.coreTeacher,s.push(a)}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 f["a"].state.musicGroup},isEmpty:function(){return Object(b["isEmpty"])(this.form.classs)},surplustime:function(){return this.detail.preSubMinutes},activeCourseTime:function(){var e=this.detail.preSubMinutes-this.musicSurplus;return e}}},C=_,I=(s("e84c"),s("2877")),S=Object(I["a"])(C,u,p,!1,null,"16ebd430",null),w=S.exports,O=s("fa7d"),L=s("c466"),k=s("5a0c"),x=s.n(k),D={components:{memberClassSetting:w},data:function(){return{musicClassTypeList:l["H"],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(o["a"])(Object(n["a"])().mark((function e(){var t,s=this;return Object(n["a"])().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(c["Qb"])({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(c["fc"])({musicGroupId:this.teamid});case 6:t=e.sent,t.data?(this.form.startCourseDate=x()(t.data.startCourseDate).format("YYYY-MM-DD"),this.form.endSchoolTerm=x()(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(c["Ob"])({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(c["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(o["a"])(Object(n["a"])().mark((function t(s){var a;return Object(n["a"])().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(c["fc"])({musicGroupId:e.teamid,startCourseDate:e.form.startCourseDate});case 4:a=t.sent,207==a.code&&e.$confirm(a.msg,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(o["a"])(Object(n["a"])().mark((function t(){var s;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(c["fc"])({musicGroupId:e.teamid,startCourseDate:e.form.startCourseDate,cleanPreCourseFlag:!0});case 3:s=t.sent,s.data&&(e.$message.success("修改成功"),e.form.startCourseDate=x()(s.data.startCourseDate).format("YYYY-MM-DD"),e.form.endSchoolTerm=x()(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(a),200==a.code&&a.data&&(e.form.startCourseDate=x()(a.data.startCourseDate).format("YYYY-MM-DD"),e.form.endSchoolTerm=x()(a.data.endSchoolTerm).format("YYYY-MM-DD"),e.musicGroupSchoolTermCourseDetailId=a.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(O["a"])(e)},cancleCourse:function(e){var t=this;this.$confirm("是否取消预排课","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(o["a"])(Object(n["a"])().mark((function s(){return Object(n["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.prev=0,s.next=3,Object(c["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(o["a"])(Object(n["a"])().mark((function e(t,s){var a,r=this;return Object(n["a"])().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(c["zb"])({classGroupId:t.id});case 4:a=e.sent,this.activeSingleList.forEach((function(e,s){e.id==t.id&&r.$set(r.activeSingleList[s],"courseData",a.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(o["a"])(Object(n["a"])().mark((function t(){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(c["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(L["e"])(x()(e.classDate).format("YYYY-MM-DD"),x()(e.startClassTime).format("HH:mm"),x()(e.endClassTime).format("HH:mm"))},getClassName:function(e){var t=e.row;e.index;return t.preTotalClassTimes?"":"noShow"}},beforeRouteLeave:function(){var e=Object(o["a"])(Object(n["a"])().mark((function e(t,s,a){var r,i=this;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:r=!1,this.activeSingleList.forEach((function(e){0!=e.preTotalClassTimes&&(r=!0)})),r?this.$confirm("预排课程尚未提交,是否确认跳转其他页面?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(o["a"])(Object(n["a"])().mark((function e(){return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:i.$store.dispatch("delVisitedViews",i.$route),a();case 2:case"end":return e.stop()}}),e)})))).catch((function(){})):(this.$store.dispatch("delVisitedViews",this.$route),a());case 3:case"end":return e.stop()}}),e,this)})));function t(t,s,a){return e.apply(this,arguments)}return t}()},j=D,G=(s("85b2b"),Object(I["a"])(j,a,r,!1,null,"f5478986",null));t["default"]=G.exports},fa7d:function(e,t,s){"use strict";s.d(t,"b",(function(){return r})),s.d(t,"c",(function(){return i})),s.d(t,"a",(function(){return n})),s.d(t,"d",(function(){return o}));var a=s("5530"),r=(s("a481"),s("5a0c"),function(e){var t=new Date(e.replace(/-/g,"/")).getTime(),s=new Date(e);0==s.getDay()&&(t-=6048e5);var a=t-24*(s.getDay()-1)*60*60*1e3,r=new Date(a),i=r.getFullYear(),n=r.getMonth()+1<10?"0"+(r.getMonth()+1):r.getMonth()+1,o=r.getDate()<10?"0"+r.getDate():r.getDate(),c=i+"-"+n+"-"+o;return c}),i=function(e){var t=new Date(e.replace(/-/g,"/")).getTime(),s=new Date(e),a=7-s.getDay();7==a&&(a=0);var r=t+24*a*60*60*1e3,i=new Date(r),n=i.getFullYear(),o=i.getMonth()+1<10?"0"+(i.getMonth()+1):i.getMonth()+1,c=i.getDate()<10?"0"+i.getDate():i.getDate(),l=n+"-"+o+"-"+c;return l},n=function(e){var t=[];switch(e){case"NORMAL":t=[{value:"SINGLE",label:"声部课"},{value:"TRAINING_SINGLE",label:"集训声部课"},{value:"COMPREHENSIVE",label:"综合课"},{value:"CLASSROOM",label:"课堂课"}];break;case"MIX":t=[{value:"MIX",label:"合奏课"},{value:"TRAINING_MIX",label:"集训合奏课"},{value:"COMPREHENSIVE",label:"综合课"},{value:"CLASSROOM",label:"课堂课"}];break;case"HIGH":t=[{value:"HIGH",label:"基础技能课"}];break;case"HIGH_ONLINE":t=[{value:"HIGH_ONLINE",label:"线上基础技能课"}];break;case"MUSIC_NETWORK":t=[{value:"MUSIC_NETWORK",label:"乐团网管课"}];break;case"SNAP":t=[{value:"SINGLE",label:"声部课"},{value:"MIX",label:"合奏课"},{value:"TRAINING_SINGLE",label:"集训声部课"},{value:"TRAINING_MIX",label:"集训合奏课"},{value:"HIGH",label:"基础技能课"},{value:"COMPREHENSIVE",label:"综合课"},{value:"CLASSROOM",label:"课堂课"}]}return t},o=function(e,t){e.$router.replace({query:Object(a["a"])(Object(a["a"])({},e.$route.query),t)})}}}]);
|