/*! * build: Hopaheal * copyright: Mead * time: 2022-8-18 15:39:42 */ (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d09f04e"],{1753:function(e,t,a){},a733: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:"content"},[a("el-page-header",{staticClass:"goback",attrs:{content:"数据预览"},on:{back:e.goBack}}),a("vab-query-form",[a("vab-query-form-left-panel",{attrs:{span:24}},[a("el-form",{attrs:{inline:!0,model:e.queryForm},nativeOn:{submit:function(e){e.preventDefault()}}},[a("el-form-item",[a("el-input",{attrs:{clearable:"",placeholder:"请输入课程名称"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.queryData.apply(null,arguments)}},model:{value:e.queryForm.lesson_name,callback:function(t){e.$set(e.queryForm,"lesson_name","string"===typeof t?t.trim():t)},expression:"queryForm.lesson_name"}})],1),a("el-form-item",[a("el-input",{attrs:{clearable:"",placeholder:"请输入教师姓名"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.queryData.apply(null,arguments)}},model:{value:e.queryForm.teacher_name,callback:function(t){e.$set(e.queryForm,"teacher_name","string"===typeof t?t.trim():t)},expression:"queryForm.teacher_name"}})],1),a("el-form-item",{attrs:{prop:"id"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择实验室"},on:{change:e.queryData},model:{value:e.queryForm.room_id,callback:function(t){e.$set(e.queryForm,"room_id",t)},expression:"queryForm.room_id"}},e._l(e.roomList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),a("el-form-item",{attrs:{prop:"id"}},[a("el-date-picker",{attrs:{format:"yyyy-MM-dd",placeholder:"选择日期",type:"date","value-format":"yyyy-MM-dd"},model:{value:e.queryForm.day,callback:function(t){e.$set(e.queryForm,"day",t)},expression:"queryForm.day"}})],1),a("el-form-item",{attrs:{prop:"id"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择教学周"},on:{change:e.changeWeeks},model:{value:e.queryForm.week,callback:function(t){e.$set(e.queryForm,"week",t)},expression:"queryForm.week"}},e._l(e.weekList,(function(e){return a("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1),a("el-form-item",{attrs:{prop:"id"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择课程状态"},model:{value:e.queryForm.status,callback:function(t){e.$set(e.queryForm,"status",t)},expression:"queryForm.status"}},e._l(e.statusList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),a("el-form-item",[a("el-button",{attrs:{icon:"el-icon-search",type:"primary"},on:{click:e.queryData}},[e._v(" 查询 ")])],1)],1)],1)],1),a("div",[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{border:"",data:e.list}},[a("el-table-column",{attrs:{align:"center",label:"序号",prop:"date","show-overflow-tooltip":"",type:"index",width:"50"}}),a("el-table-column",{attrs:{align:"center",label:"课程名称","min-width":"150",prop:"lesson.name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{align:"center",label:"实验小组","min-width":"100",prop:"group_name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{align:"center",label:"任课教师","min-width":"120",prop:"teacher.name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{align:"center",label:"班级","min-width":"200",prop:"grade.name"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("div",[a("el-popover",{attrs:{placement:"top",trigger:"hover",width:"300"}},[a("div",{staticClass:"hover_detail"},[e._v(" "+e._s(r.grade.name)+" ")]),a("div",{staticClass:"grade-item",attrs:{slot:"reference"},slot:"reference"},[a("div",[e._v(e._s(r.grade.name))])])])],1)]}}])}),a("el-table-column",{attrs:{align:"center",label:"实验室名称","min-width":"180",prop:"room.name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{align:"center",label:"学生数(人)","min-width":"100",prop:"student_nums","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{align:"center",label:"教学周","min-width":"100",prop:"week","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v("第"+e._s(a.week)+"周")]}}])}),a("el-table-column",{attrs:{align:"center",label:"上课时间","min-width":"200",prop:"time","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(a.day)+" 星期"+e._s(e.transformWeek(a.week_index))+"("+e._s(a.time_id?a.time_id.name:"--")+") ")]}}])}),a("el-table-column",{attrs:{align:"center",label:"状态","min-width":"120",prop:"status","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[1==r.status&&0==r.migrate_id?a("el-tag",[e._v("正常")]):e._e(),2==r.status?a("el-tag",{attrs:{type:"danger"}},[e._v("停课")]):e._e(),3==r.status?a("el-tag",{attrs:{type:"warning"}},[e._v("调课")]):e._e(),1==r.status&&0!==r.migrate_id?a("el-tag",{attrs:{type:"success"}},[e._v(" 补课 ")]):e._e()]}}])})],1),a("el-pagination",{attrs:{background:"","current-page":e.queryForm.page,layout:e.layout,"page-size":e.queryForm.per_page,"page-sizes":[15,20,30,40,50,100],total:e.total},on:{"current-change":e.handleCurrentChange,"size-change":e.handleSizeChange}})],1),a("addTable",{ref:"add-table",on:{"fetch-data":e.getList}}),a("buCourseDialog",{ref:"bu-course",on:{"fetch-data":e.getList}}),a("stopDialog",{ref:"stop-dialog"}),a("transferDialogy",{ref:"transfer",on:{"fetch-data":e.getList}}),a("scheduleDetail",{ref:"schedule-detail"})],1)},n=[],o=a("1da1"),s=(a("96cf"),a("e9c4"),a("b0c0"),a("d12b")),i=a("d431"),l=a("3716"),u=a("8c15"),c=a("3537"),m=a("1eb9"),d=a("5361"),p={components:{addTable:u["default"],buCourseDialog:c["default"],stopDialog:m["default"],transferDialogy:d["default"],scheduleDetail:l["default"]},data:function(){return{listLoading:!0,layout:"total, sizes, prev, pager, next, jumper",total:1,queryForm:{lesson_name:"",teacher_name:"",room_id:"",week:"",day:"",status:1,page:1,per_page:15,is_clash:0},list:[],roomList:[],weekList:[],statusList:[{id:1,name:"正常"},{id:2,name:"停课"},{id:3,name:"调课"},{id:4,name:"补课"}]}},created:function(){this.queryForm.id=this.$route.query;var e=localStorage.getItem("roomList")?JSON.parse(localStorage.getItem("roomList")):[];e.length?this.getRoomaList():this.roomList=e,this.getList(),this.getWeeks()},methods:{goBack:function(){this.$router.push("/courseTable/tableImport")},getRoomaList:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(i["getRoomaList"])();case 2:a=t.sent,r=a.data,e.roomList=r.length?r:[],localStorage.setItem("roomList",r.length?JSON.stringify(r):"");case 6:case"end":return t.stop()}}),t)})))()},getWeeks:function(){for(var e=localStorage.getItem("term_weeks"),t=1;t<=e;t++)this.weekList.push({name:"第"+t+"周",value:t})},getList:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var a,r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(i["scheduleList"])(e.queryForm);case 2:a=t.sent,r=a.data,e.list=r.list,n=r.meta.pagination,e.total=n.total,e.listLoading=!1;case 8:case"end":return t.stop()}}),t)})))()},handleSizeChange:function(e){this.queryForm.per_page=e,this.getList()},handleCurrentChange:function(e){this.queryForm.page=e,this.getList()},queryData:function(){this.queryForm.page=1,this.getList()},changeWeeks:function(e){console.log(e,"eeeeeeeee"),this.queryForm.week=e,this.getList()},handleDetail:function(e){this.$refs["schedule-detail"].showEdit({id:e.id})},buCourse:function(e){this.$refs["bu-course"].showEdit({id:e.id,room_id:e.room.id,room_name:e.room.name,week:e.week,week_index:e.week_index,day:e.day,lesson_name:e.lesson?e.lesson.name:"",grade_name:e.grade?e.grade.name:"",group_name:e.group_name,time_name:e.time_id?e.time_id.name:"--",teach_title:e.teach_title})},stopCourse:function(e){this.$refs["stop-dialog"].showEdit({id:e.id,lesson_name:e.lesson?e.lesson.name:"",grade_name:e.grade?e.grade.name:"",group_name:e.group_name,time_name:e.time_id?e.time_id.name:"--",day:e.day,week:e.week,week_index:e.week_index,teach_title:e.teach_title})},transferCourse:function(e){this.$refs["transfer"].showEdit({id:e.id,room_id:e.room.id,room_name:e.room.name,week:e.week,week_index:e.week_index,day:e.day,lesson_name:e.lesson?e.lesson.name:"",grade_name:e.grade?e.grade.name:"",group_name:e.group_name,time_name:e.time_id?e.time_id.name:"--",teach_title:e.teach_title})},handleEdit:function(){this.$refs["add-table"].showEdit()},handleDelete:function(e){var t=this;this.$baseConfirm("你确定要删除当前课表吗?",null,Object(o["a"])(regeneratorRuntime.mark((function a(){var r,n;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(i["doDelete"])(e.id);case 2:return r=a.sent,n=r.message,t.$baseMessage(n,"success",!1,"vab-hey-message-success"),a.next=7,t.getList();case 7:case"end":return a.stop()}}),a)}))))},handlePause:function(e){var t=this;this.$baseConfirm("你确定要禁用当前课表吗?",null,Object(o["a"])(regeneratorRuntime.mark((function a(){var r,n;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(i["doPause"])({id:e.id});case 2:return r=a.sent,n=r.message,t.$baseMessage(n,"success",!1,"vab-hey-message-success"),a.next=7,t.getList();case 7:case"end":return a.stop()}}),a)}))))},transformWeek:s["transformWeek"]}},g=p,h=(a("eb45"),a("2877")),f=Object(h["a"])(g,r,n,!1,null,"5d9b655e",null);t["default"]=f.exports},eb45:function(e,t,a){"use strict";a("1753")}}]);