1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5cac4260"],{"09f4":function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),Math.easeInOutQuad=function(e,t,a,r){return e/=r/2,e<1?a/2*e*e+t:(e--,-a/2*(e*(e-2)-1)+t)};var r=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function i(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function s(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function n(e,t,a){var n=s(),o=e-n,l=20,c=0;t="undefined"===typeof t?500:t;var u=function e(){c+=l;var s=Math.easeInOutQuad(c,n,o,t);i(s),c<t?r(e):a&&"function"===typeof a&&a()};u()}},"333d":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"pagination-container",class:{hidden:e.hidden}},[a("el-pagination",e._b({attrs:{"current-page":e.currentPage,"page-size":e.pageSize,layout:e.layout,"page-sizes":e.pageSizes,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"update:pageSize":function(t){e.pageSize=t},"update:page-size":function(t){e.pageSize=t},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}},"el-pagination",e.$attrs,!1))],1)},i=[],s=(a("c5f6"),a("09f4")),n={name:"Pagination",props:{total:{required:!0,type:Number},page:{type:Number,default:1},limit:{type:Number,default:10},pageSizes:{type:Array,default:function(){return[10,20,30,50]}},layout:{type:String,default:"total,sizes,prev, pager, next, jumper"},background:{type:Boolean,default:!0},autoScroll:{type:Boolean,default:!0},hidden:{type:Boolean,default:!1}},computed:{currentPage:{get:function(){return this.page},set:function(e){this.$emit("update:page",e)}},pageSize:{get:function(){return this.limit},set:function(e){this.$emit("update:limit",e)}}},methods:{handleSizeChange:function(e){this.$emit("pagination",{page:this.currentPage,limit:e}),this.autoScroll&&Object(s["a"])(0,800)},handleCurrentChange:function(e){this.$emit("pagination",{page:e,limit:this.pageSize}),this.autoScroll&&Object(s["a"])(0,800)}}},o=n,l=(a("c0b9"),a("2877")),c=Object(l["a"])(o,r,i,!1,null,"31cb099a",null);t["a"]=c.exports},ac2a:function(e,t,a){"use strict";a.r(t);var r=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",{directives:[{name:"permission",rawName:"v-permission",value:"courseSchedule/practiceGroupTeacherAdjust",expression:"'courseSchedule/practiceGroupTeacherAdjust'"}],staticClass:"newBand",on:{click:e.resetTeachers}},[e._v("修改老师")]),e._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[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(e._s(e._f("formatTimer")(t.row.classDate)))])]}}])}),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:"开始时间",align:"center",prop:"startClassTimeStr"}}),e._v(" "),a("el-table-column",{attrs:{label:"结束时间",align:"center",prop:"endClassTimeStr"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[t.row.isSettlement?e._e():a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"courseSchedule/classStartDateAdjust",expression:"'courseSchedule/classStartDateAdjust'"}],attrs:{type:"text"},on:{click:function(a){return e.resetClass(t.row)}}},[e._v("调整")]),e._v(" "),t.row.isSettlement?e._e():a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"courseSchedule/practiceCourseTeacherAdjust",expression:"'courseSchedule/practiceCourseTeacherAdjust'"}],attrs:{type:"text"},on:{click:function(a){return e.resetTeacher(t.row)}}},[e._v("更换老师")])],1)]}}])})],1),e._v(" "),a("pagination",{attrs:{total:e.rules.total,page:e.rules.page,limit:e.rules.limit,"page-sizes":e.rules.page_size},on:{"update:page":function(t){return e.$set(e.rules,"page",t)},"update:limit":function(t){return e.$set(e.rules,"limit",t)},pagination:e.getList}})],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",{staticStyle:{width:"200px!important"},attrs:{type:"date","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"}},[a("el-time-select",{staticStyle:{width:"200px!important"},attrs:{placeholder:"起始时间","picker-options":{start:"08:30",step:"00:30",end:"20:30"}},model:{value:e.startTime,callback:function(t){e.startTime="string"===typeof t?t.trim():t},expression:"startTime"}})],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.courseVisible=!1}}},[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:"老师调整",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":"80px;",inline:!0}},[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)],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)],1)},i=[],s=(a("7f7f"),a("333d")),n=a("1cc7"),o={components:{pagination:s["a"]},data:function(){return{isMultiple:!0,name:"陪练课程组",courseVisible:!1,teacherVisible:!1,Frules:null,FsearchForm:null,userId:null,activeRow:null,rules:{limit:20,page:1,total:0,page_size:[10,20,50,100]},tableList:[],teacherList:[],courseData:[],practiceId:null,maskForm:{date:"",startTime:"",id:""},startTime:null,maskRules:{date:[{required:!0,message:"请选择上课时间",trigger:"blur"}],endTime:[{required:!0,message:"请选择上课结束时间",trigger:"blur"}]},teacherRules:{teacher:[{required:!0,message:"请选择老师",trigger:"blur"}]},teacherForm:{teacher:null}}},created:function(){this.init()},activated:function(){this.init()},methods:{init:function(){var e=this;this.practiceId=this.$route.query.id,this.userId=this.$route.query.userId,this.$route.query.rules&&(this.Frules=this.$route.query.rules),this.$route.query.searchForm&&(this.FsearchForm=this.$route.query.searchForm),Object(n["X"])({organId:this.organId}).then((function(t){200==t.code&&(e.teacherList=t.data)})),this.getCourseGroup(),this.getList()},getCourseGroup:function(){var e=this;Object(n["qb"])({search:this.practiceId}).then((function(t){200==t.code&&(e.courseData=t.data.rows,e.courseData.length>0&&(e.name=e.courseData[0].name))}))},getList:function(){var e=this;Object(n["v"])({practiceId:this.practiceId}).then((function(t){200==t.code&&(e.tableList=t.data.pageInfo.rows,e.rules.total=t.data.pageInfo.total)}))},goBack:function(){this.$router.push({path:"/business/accompanyList",query:{rules:this.Frules,searchForm:this.FsearchForm}})},teacherClose:function(){this.isMultiple=!0,this.teacherForm.teacher=null,this.teacherVisible=!1},handleClose:function(){this.courseVisible=!1,this.startTime="",this.maskForm={date:"",startTime:"",id:""},this.$refs["maskForm"].resetFields()},submitResetClass:function(){var e=this;if(this.startTime){var t={startClassTimeStr:this.startTime,id:this.maskForm.id,classDate:this.maskForm.date};Object(n["ob"])(t).then((function(t){200==t.code&&(e.$message.success("修改成功"),e.courseVisible=!1,e.getList())}))}else this.$message.error("请填写修改时间")},resetClass:function(e){this.maskForm.date=e.classDate,this.startTime=e.startClassTimeStr,this.maskForm.id=e.id,this.courseVisible=!0},resetTeacher:function(e){this.isMultiple=!1,this.activeRow=e,this.teacherForm.teacher=e.actualTeacherId,console.log(e.actualTeacherId),this.teacherVisible=!0},resetTeachers:function(){this.isMultiple=!0,this.teacherForm.teacher=this.courseData[0].userId,this.teacherVisible=!0},subresetTeacher:function(){var e=this;this.$refs.teacherForm.validate((function(t){t&&(e.isMultiple?e.$confirm("此操作将修改所有未上课程的老师, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(n["rb"])({practiceGroupId:e.practiceId,teacherId:e.teacherForm.teacher}).then((function(t){200==t.code&&(e.$message.success("修改成功"),e.getCourseGroup(),e.getList(),e.teacherVisible=!1)}))})).catch((function(){})):Object(n["pb"])({courseScheduleId:e.activeRow.id,teacherId:e.teacherForm.teacher}).then((function(t){200==t.code&&(e.$message.success("修改成功"),e.getList(),e.teacherVisible=!1)})))}))}}},l=o,c=a("2877"),u=Object(c["a"])(l,r,i,!1,null,null,null);t["default"]=u.exports},c0b9:function(e,t,a){"use strict";var r=a("de4e"),i=a.n(r);i.a},de4e:function(e,t,a){}}]);
|