1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ab57a31c"],{1963:function(t,e,s){},5120:function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[t.tableList.length>0?s("div",{staticClass:"tableWrap"},[s("el-table",{attrs:{data:t.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[s("el-table-column",{attrs:{align:"center",prop:"organName",label:"分部名称"}}),t._v(" "),s("el-table-column",{attrs:{align:"center",width:"130px",prop:"musicGroupId",label:"乐团/课程组编号"}}),t._v(" "),s("el-table-column",{attrs:{align:"center",prop:"id",label:"课程编号"}}),t._v(" "),s("el-table-column",{attrs:{align:"center",width:"200px",label:"时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.startClassTime?e.row.startClassTime.substr(0,16):"")+"-"+t._s(e.row.endClassTime?e.row.endClassTime.substr(11,5):""))]}}],null,!1,2248027327)}),t._v(" "),s("el-table-column",{attrs:{align:"center",prop:"studentId",label:"学生ID"},scopedSlots:t._u([{key:"default",fn:function(e){return["MUSIC"!=e.row.groupType?s("div",[t._v(t._s(e.row.studentId))]):t._e()]}}],null,!1,3891686512)}),t._v(" "),s("el-table-column",{attrs:{align:"center",prop:"subjectName",label:"声部"}}),t._v(" "),s("el-table-column",{attrs:{align:"center",prop:"name",label:"课程名称"}}),t._v(" "),s("el-table-column",{attrs:{align:"center",label:"课程类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[s("div",[t._v(t._s(t._f("coursesType")(e.row.type)))])]}}],null,!1,2613307558)}),t._v(" "),s("el-table-column",{attrs:{align:"center",label:"教学模式"},scopedSlots:t._u([{key:"default",fn:function(e){return[s("div",[t._v(t._s(t._f("teachMode")(e.row.teachMode)))])]}}],null,!1,465778248)}),t._v(" "),s("el-table-column",{attrs:{align:"center",prop:"schoolName",label:"教学点"},scopedSlots:t._u([{key:"default",fn:function(e){return[s("div",[t._v(t._s(e.row.schoolName?e.row.schoolName:"网络教室"))])]}}],null,!1,699114148)}),t._v(" "),s("el-table-column",{attrs:{align:"center",prop:"courseScheduleStatus",label:"课程状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[s("div",[t._v(t._s(t._f("coursesStatus")(e.row.status)))])]}}],null,!1,3895776102)}),t._v(" "),s("el-table-column",{attrs:{align:"center",label:"操作",fixed:"right",width:"180px"},scopedSlots:t._u([{key:"default",fn:function(e){return[s("div",[!e.row.isSettlement&&t.permission("courseSchedule/classStartDateAdjust")&&"MUSIC"===e.row.groupType?s("el-button",{attrs:{type:"text"},on:{click:function(s){return t.resetClass(e.row)}}},[t._v("调整")]):t._e(),t._v(" "),!e.row.isSettlement&&t.permission("courseSchedule/classStartDateAdjust")&&"VIP"===e.row.groupType?s("el-button",{attrs:{type:"text"},on:{click:function(s){return t.resetClass(e.row)}}},[t._v("调整")]):t._e(),t._v(" "),!e.row.isSettlement&&t.permission("courseSchedule/practiceCourseAdjust")&&"PRACTICE"===e.row.groupType?s("el-button",{attrs:{type:"text"},on:{click:function(s){return t.resetClass(e.row)}}},[t._v("调整")]):t._e(),t._v(" "),"PRACTICE"===e.row.groupType&&"NOT_START"==e.row.status&&"TRIAL"!=e.row.practiceGroup["type"]&&t.permission("courseSchedule/practiceCourseTeacherAdjust")?s("el-button",{attrs:{type:"text"},on:{click:function(s){return t.resetTeacher(e.row)}}},[t._v("更换老师")]):t._e()],1)]}}],null,!1,326255397)})],1),t._v(" "),s("pagination",{attrs:{total:t.rules.total,page:t.rules.page,limit:t.rules.limit,"page-sizes":t.rules.page_size},on:{"update:page":function(e){return t.$set(t.rules,"page",e)},"update:limit":function(e){return t.$set(t.rules,"limit",e)},pagination:t.getList}})],1):t._e(),t._v(" "),s("el-dialog",{attrs:{title:"老师调整",width:"400px",visible:t.teacherVisible},on:{"update:visible":function(e){t.teacherVisible=e}}},[s("el-form",{ref:"teacherForm",attrs:{model:t.teacherForm,rules:t.teacherRules,"label-position":"right","label-width":"80px;",inline:!0}},[s("el-form-item",{attrs:{label:"指导老师"}},[s("el-select",{attrs:{filterable:"",clearable:""},model:{value:t.teacherForm.teacher,callback:function(e){t.$set(t.teacherForm,"teacher","string"===typeof e?e.trim():e)},expression:"teacherForm.teacher"}},t._l(t.teacherList,(function(t,e){return s("el-option",{key:e,attrs:{value:t.id,label:t.realName}})})),1)],1)],1),t._v(" "),s("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:function(e){t.teacherVisible=!1}}},[t._v("取 消")]),t._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:t.subresetTeacher}},[t._v("确 定")])],1)],1),t._v(" "),s("el-dialog",{attrs:{visible:t.show,width:"400px"},on:{"update:visible":function(e){t.show=e}}},[s("resetClass",{attrs:{show:t.show,id:t.id,isDisabled:!0},on:{closeReset:t.closeReset,getList:t.getList}})],1)],1)},r=[],i=(s("a481"),s("1cc7")),n=(s("c466"),s("8018"),s("333d")),l=s("ec8a"),o=s("02ce"),c=(s("5a0c"),{components:{pagination:n["a"],resetClass:o["a"]},props:["startTimes"],data:function(){return{startCourseTime:"",endCourseTime:"",startTime:this.startTimes,endTime:this.startTimes,teacherVisible:!1,teacherList:[],teacherForm:{teacher:null,courseScheduleId:null},teacherRules:{teacher:[{required:!0,message:"请选择老师",trigger:"blur"}],educationalTeacherId:[{required:!0,message:"请选择教务老师",trigger:"blur"}]},tableList:[],rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]},show:!1,id:null,teacherIdList:null}},mounted:function(){var t=this;this.teacherIdList=this.$route.query.teacherId,this.value=new Date,this.getList(),Object(i["wb"])().then((function(e){200==e.code&&(t.teacherList=e.data)}))},methods:{getList:function(){var t=this;this.$emit("getCalendatList"),this.startTime&&this.endTime&&Object(i["qc"])({teacherIdList:this.teacherIdList,page:this.rules.page,rows:this.rules.limit,startTime:this.startTime,endTime:this.endTime}).then((function(e){200==e.code&&(t.tableList=e.data.rows,t.rules.total=e.data.total)}))},setCourseList:function(t){console.LOG(t)},closeReset:function(){this.show=!1},permission:function(t,e){return Object(l["a"])(t,e)},resetClass:function(t){this.id=t.id,this.show=!0,this.value=new Date(t.classDate.replace(/-/g,"/"))},resetTeacher:function(t){this.teacherForm.teacher=t.actualTeacherId,this.teacherForm.courseScheduleId=t.id,this.teacherVisible=!0},subresetTeacher:function(){var t=this;this.$refs.teacherForm.validate((function(e){e&&Object(i["Ob"])({courseScheduleId:t.teacherForm.courseScheduleId,teacherId:t.teacherForm.teacher}).then((function(e){200==e.code&&(t.$message.success("修改成功"),t.teacherVisible=!1,t.getList())}))}))}},watch:{startTimes:function(t){this.startTime=t,this.endTime=t,this.getList()}}}),u=c,d=s("2877"),h=Object(d["a"])(u,a,r,!1,null,"2ab78664",null);e["a"]=h.exports},ccd0:function(t,e,s){"use strict";s("1963")},ef40:function(t,e,s){"use strict";s.r(e);var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"m-container"},[s("el-calendar",{staticStyle:{minWidth:"810px"},scopedSlots:t._u([{key:"dateCell",fn:function(e){return[s("div",{staticStyle:{height:"100%"},on:{click:function(s){return t.showDate(e)}}},[s("p",[t._v("\n "+t._s(e.data.day.substring(8))+"\n ")]),t._v(" "),s("div",[t._l(t.newList,(function(a,r){return a.classDate.substring(0,10)===e.data.day&&"PRACTICE"===a.groupType?s("span",{key:a.id,staticClass:"newDot"},[t._v("\n 网\n ")]):t._e()})),t._v(" "),t._l(t.vipList,(function(a,r){return a.classDate.substring(0,10)===e.data.day&&"VIP"===a.groupType?s("span",{key:a.id,staticClass:"vipDot"},[t._v("\n vip\n ")]):t._e()})),t._v(" "),t._l(t.teamList,(function(a,r){return a.classDate.substring(0,10)===e.data.day&&"MUSIC"===a.groupType?s("span",{key:a.id,staticClass:"teamDot"},[t._v("\n 乐\n ")]):t._e()}))],2)])]}}])}),t._v(" "),s("resetList",{attrs:{startTimes:t.startTime},on:{getCalendatList:t.getCalendatList}})],1)},r=[],i=s("1cc7"),n=s("c466"),l=(s("8018"),s("5120")),o=s("ec8a"),c={components:{resetList:l["a"]},data:function(){return{dataList:[],value:new Date,teacherIdList:"",vipList:[],teamList:[],newList:[],startTime:""}},mounted:function(){var t=this;this.teacherIdList=this.$route.query.teacherId,this.getCalendatList(),this.$nextTick((function(){var e=document.querySelector(".el-calendar__button-group .el-button-group>button:nth-child(1)");e.addEventListener("click",(function(){t.value=new Date(t.value.setMonth(t.value.getMonth()+-1,1)),t.setCourseList(t.value)}));var s=document.querySelector(".el-calendar__button-group .el-button-group>button:nth-child(2)");s.addEventListener("click",(function(){t.value=new Date,t.setCourseList(t.value)}));var a=document.querySelector(".el-calendar__button-group .el-button-group>button:nth-child(3)");a.addEventListener("click",(function(){t.value=new Date(t.value.setMonth(t.value.getMonth()+1,1)),t.setCourseList(t.value)}))}))},activated:function(){},methods:{getCalendatList:function(){var t=this;this.teacherIdList=this.$route.query.teacherId;var e=Object(n["h"])(Object(n["c"])(this.value)),s=Object(n["h"])(Object(n["d"])(this.value));Object(i["qc"])({teacherIdList:this.teacherIdList,rows:9999,page:1,startTime:e,endTime:s}).then((function(e){if(200===e.code){for(var s in t.dataList=e.data.rows,t.vipList=[],t.teamList=[],t.newList=[],t.dataList)"VIP"===t.dataList[s].groupType&&t.vipList.push(t.dataList[s]),"MUSIC"===t.dataList[s].groupType&&t.teamList.push(t.dataList[s]),"PRACTICE"===t.dataList[s].groupType&&t.newList.push(t.dataList[s]);t.vipList=t.reduceArray(t.vipList,"classDate"),t.teamList=t.reduceArray(t.teamList,"classDate"),t.newList=t.reduceArray(t.newList,"classDate")}}))},showDate:function(t){this.startTime=t.data.day,this.endTime=t.data.day,this.value=t.date,"next-month"!==t.data.type&&"prev-month"!==t.data.type||this.getCalendatList()},reduceArray:function(t,e){var s={};return t=t.reduce((function(t,a){return!s[a[e]]&&(s[a[e]]=t.push(a)),t}),[]),t},setCourseList:function(t){this.startTime=Object(n["h"])(t),this.endTime=Object(n["h"])(t),this.getCalendatList()},permission:function(t,e){return Object(o["a"])(t,e)}}},u=c,d=(s("ccd0"),s("2877")),h=Object(d["a"])(u,a,r,!1,null,"cd4b7950",null);e["default"]=h.exports}}]);
|