/*! * build: Hopaheal * copyright: Mead * time: 2023-3-13 15:21:04 */ (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a1a9f0da"],{"0044":function(e,t,s){},"03a6":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("el-dialog",{attrs:{"before-close":e.handleClose,center:"",title:"开放预约申请详情",visible:e.dialogVisible,width:"800px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[s("div",{staticClass:"content"},[s("div",{staticClass:"form"},[s("div",{staticClass:"label"},[e._v("申请人:")]),s("div",{staticClass:"text"},[e._v(" "+e._s(e.detail.applicant_name)+"("+e._s(e.detail.applicant_mobile)+") ")])]),s("div",{staticClass:"form"},[s("div",{staticClass:"label"},[e._v("申请人部门:")]),s("div",{staticClass:"text"},[e._v(" "+e._s(e.detail.department)+" ")])]),s("div",{staticClass:"form"},[s("div",{staticClass:"label"},[e._v("申请时间及地点:")]),s("div",{staticClass:"text time_1"},e._l(e.detail.use_data,(function(t,a){return s("div",{key:a,staticStyle:{"margin-bottom":"5px"}},[s("el-tag",{attrs:{type:"primary"}},[e._v(" "+e._s(t.room_name)+" / "+e._s(t.day)+" 第"+e._s(t.week)+"周 / 星期"+e._s(e.transformWeek(t.week_index))+" / "+e._s(t.time_name)+" ")])],1)})),0)]),s("div",{staticClass:"form"},[s("div",{staticClass:"label"},[e._v("申请原因:")]),s("div",{staticClass:"text"},[e._v(" "+e._s(e.detail.use_need?e.detail.use_need:"暂无")+" ")])]),s("div",{staticClass:"form"},[s("div",{staticClass:"label"},[e._v("使用需求:")]),s("div",{staticClass:"text"},[e._v(" "+e._s(e.detail.use_reason)+" ")])])]),s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),s("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialogVisible=!1}}},[e._v("确 定")])],1)])},i=[],o=s("d12b"),l=s("77f1"),r={name:"TemplateClassdialog",data(){return{dialogVisible:!1,detail:""}},methods:{transformWeek:o["transformWeek"],async recordDetail(e){const{data:t}=await Object(l["orderDetail"])(e);this.detail=t},handleClose(){this.dialogVisible=!1},showEdit(e){this.recordDetail(e),this.dialogVisible=!0}}},n=r,c=(s("ab31"),s("0b56")),d=Object(c["a"])(n,a,i,!1,null,"02a9a768",null);t["default"]=d.exports},"0fc8":function(e,t,s){"use strict";s("12d6")},"12d6":function(e,t,s){},"1ab3":function(e,t,s){"use strict";s("0044")},"1d18":function(e,t,s){"use strict";s("eb3d")},"2b06":function(e,t,s){"use strict";s("2eae")},"2eae":function(e,t,s){},"322a":function(e,t,s){"use strict";s("348f")},"348f":function(e,t,s){},"35d9":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("el-dialog",{attrs:{"append-to-body":"","before-close":e.handleClose,center:"",title:e.title,visible:e.dialogVisible,width:"800px"},on:{"update:visible":function(t){e.dialogVisible=t}}},["课程信息"==e.title?s("div",{staticClass:"content"},[s("div",{staticClass:"form"},[s("div",{staticClass:"label"},[e._v("课程名称:")]),s("div",{staticClass:"text"},[e._v(e._s(e.detail.lesson?e.detail.lesson.name:"--"))])]),s("div",{staticClass:"form"},[s("div",{staticClass:"label"},[e._v("指导教师:")]),s("div",{staticClass:"text"},[e._v(" "+e._s(e.detail.teacher?e.detail.teacher.name:"--")+" ")])]),s("div",{staticClass:"form"},[s("div",{staticClass:"label"},[e._v("上课班级:")]),s("div",{staticClass:"text"},[e._v(e._s(e.detail.grade?e.detail.grade.name:"--"))])]),s("div",{staticClass:"form"},[s("div",{staticClass:"label"},[e._v("班级人数:")]),s("div",{staticClass:"text"},[e._v(e._s(e.detail.student_nums||"--")+"人")])]),e.detail.group_name?s("div",{staticClass:"form"},[s("div",{staticClass:"label"},[e._v("实验小组:")]),s("div",{staticClass:"text"},[e._v(e._s(e.detail.group_name||"--"))])]):e._e(),s("div",{staticClass:"form"},[s("div",{staticClass:"label"},[e._v("上课时间:")]),s("div",{staticClass:"text"},[e._v(" "+e._s(e.detail.day||"--")+" / 第"+e._s(e.detail.week||"--")+"周 / "+e._s(e.detail.time_id?e.detail.time_id.name:"--")+" ")])]),s("div",{staticClass:"form"},[s("div",{staticClass:"label"},[e._v("上课内容:")]),s("div",{staticClass:"text"},[e._v(e._s(e.detail.teach_title||"--"))])])]):s("div",{staticClass:"repair"},[s("div",{staticClass:"form"},[s("div",{staticClass:"label"},[e._v("维护人:")]),s("div",{staticClass:"text"},[e._v(e._s(e.detail.admin?e.detail.admin.name:"--"))])]),s("div",{staticClass:"form"},[s("div",{staticClass:"label"},[e._v("维护时间:")]),s("div",{staticClass:"text"},[e._v(" "+e._s(e.detail.day)+" / 第"+e._s(e.detail.week)+"周 / "+e._s(e.detail.week_index)+") "+e._s(e.detail.time?e.detail.time.name:"--")+" ")])]),s("div",{staticClass:"form1"},[s("div",{staticClass:"label"},[e._v("维护内容:")]),s("div",{staticClass:"text",domProps:{innerHTML:e._s(e.detail.body)}})])]),s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialogVisible=!1}}},[e._v("确 定")])],1)])},i=[],o=s("96e5"),l={name:"TemplateClassdialog",data(){return{dialogVisible:!1,detail:{},title:""}},methods:{handleClose(){this.dialogVisible=!1},showEdit(e,t){t?this.repairDetail(e):this.courseDetail(e),this.dialogVisible=!0},async courseDetail(e){this.title="课程信息";const{data:t}=await Object(o["courseDetail"])(e);this.detail=t},async repairDetail(e){this.title="维护详情";const{data:t}=await Object(o["repairDetail"])(e);switch(this.detail=t,this.detail.week_index){case 0:this.detail.week_index="星期一";break;case 1:this.detail.week_index="星期二";break;case 2:this.detail.week_index="星期三";break;case 3:this.detail.week_index="星期四";break;case 4:this.detail.week_index="星期五";break;case 5:this.detail.week_index="星期六";break;case 6:this.detail.week_index="星期日";break}}}},r=l,n=(s("1d18"),s("0b56")),c=Object(n["a"])(r,a,i,!1,null,"1723140a",null);t["default"]=c.exports},"6c094":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("el-dialog",{attrs:{"append-to-body":!0,"before-close":e.handleClose,title:"停课信息",visible:e.dialogVisible,width:"800px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[e._l(e.list,(function(t,a){return s("el-card",{key:a,staticClass:"box-card"},[s("div",{staticClass:"wrap"},[s("div",{staticClass:"form"},[s("div",{staticClass:"left"},[s("span",{staticClass:"left_title"},[e._v("课程名称:")]),s("span",[e._v(" "+e._s(t.lesson.name)+" ")])]),s("div",{staticClass:"right"},[s("span",{staticClass:"left_title"},[e._v("授课教师:")]),s("span",[e._v(e._s(t.teacher.name))])])]),s("div",{staticClass:"form"},[s("div",{staticClass:"left"},[s("span",{staticClass:"left_title"},[e._v("分组:")]),s("span",[e._v(e._s(t.group_name))])]),s("div",{staticClass:"right"},[s("span",{staticClass:"left_title"},[e._v("上课人数:")]),s("span",[e._v(e._s(t.student_nums)+"人")])])]),s("div",{staticClass:"form"},[s("div",{staticClass:"center"},[s("div",{staticClass:"center_title"},[e._v("上课内容:")]),s("div",[e._v(e._s(t.teach_title))])])]),s("div",{staticClass:"form"},[s("div",{staticClass:"center"},[s("div",{staticClass:"center_title"},[e._v("上课班级:")]),s("div",[e._v(e._s(t.grade.name))])])]),s("div",{class:["tags",2==t.status?"ting":3==t.status?"tiao":""]},[e._v(" "+e._s(2==t.status?"停":3==t.status?"调":"")+" ")])])])})),e.list&&0==e.list.length?s("el-empty",{attrs:{description:"暂无内容!"}}):e._e(),s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialogVisible=!1}}},[e._v("确 定")])],1)],2)},i=[],o=s("96e5"),l={name:"TemplateClassdialog",data(){return{dialogVisible:!1,list:[],type:""}},methods:{handleClose(){this.dialogVisible=!1},async showEdit(e){this.dialogVisible=!0;const{data:t}=await Object(o["getStop"])(e);this.list=t.list,console.log(t,"=========")}}},r=l,n=(s("2b06"),s("0b56")),c=Object(n["a"])(r,a,i,!1,null,"3a93e33e",null);t["default"]=c.exports},"96e5":function(e,t,s){"use strict";s.r(t),s.d(t,"getCalendar",(function(){return i})),s.d(t,"getRoomaList",(function(){return o})),s.d(t,"courseDetail",(function(){return l})),s.d(t,"repairDetail",(function(){return r})),s.d(t,"getStop",(function(){return n}));var a=s("b775");function i(e){return Object(a["default"])({url:"/school/schedule/calendar",method:"post",data:e})}function o(e){return Object(a["default"])({url:"/school/room-select-options",method:"get",params:e})}function l(e){return Object(a["default"])({url:"/school/schedule/info/"+e,method:"get"})}function r(e){return Object(a["default"])({url:"/lab/maintain/info/"+e,method:"get"})}function n(e){return Object(a["default"])({url:"/school/schedule/history",method:"post",data:e})}},ab31:function(e,t,s){"use strict";s("b7c9")},b7c9:function(e,t,s){},bbe3: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("el-dialog",{attrs:{"before-close":e.handleClose,center:"",title:"维护详情",visible:e.dialogVisible,width:"800px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[s("div",{staticClass:"content"},[s("div",{staticClass:"form"},[s("div",{staticClass:"label"},[e._v("实验室名称:")]),s("div",{staticClass:"text"},[e._v(e._s(e.detail.room?e.detail.room.name:"--"))])]),s("div",{staticClass:"form"},[s("div",{staticClass:"label"},[e._v("维护时间:")]),s("div",{staticClass:"text"},[e._v(" 第"+e._s(e.detail.week)+"周 / 周"+e._s(e.transformWeek(e.detail.week_index))+"("+e._s(e.detail.day)+") / "+e._s(e.detail.time?e.detail.time.name:"--")+" ")])]),s("div",{staticClass:"form"},[s("div",{staticClass:"label"},[e._v("维护人员:")]),s("div",{staticClass:"text"},[e._v(" "+e._s(e.detail.maintain_admin?e.detail.maintain_admin.name:"--")+" ")])]),s("div",{staticClass:"form"},[s("div",{staticClass:"label"},[e._v("维护内容:")]),s("div",{staticClass:"text",domProps:{innerHTML:e._s(e.detail.body)}})])]),s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),s("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialogVisible=!1}}},[e._v("确 定")])],1)])},i=[],o=s("d12b"),l=s("77f1"),r={name:"TemplateClassdialog",data(){return{dialogVisible:!1,detail:""}},methods:{transformWeek:o["transformWeek"],async recordDetail(e){const{data:t}=await Object(l["getDetail"])(e);this.detail=t},handleClose(){this.dialogVisible=!1},showEdit(e){this.recordDetail(e),this.dialogVisible=!0}}},n=r,c=(s("0fc8"),s("0b56")),d=Object(c["a"])(n,a,i,!1,null,"344770ef",null);t["default"]=d.exports},dc08: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",[s("el-card",{staticClass:"box-card"},[s("div",{staticClass:"header"},[s("div",{staticClass:"header-item"},[s("div",[e._v("本记录总课程总数")]),s("div",{staticClass:"header-num"},[e._v(" "+e._s(e.statical_num?e.statical_num.nums:0)+" ")])]),s("div",{staticClass:"header-item"},[s("div",[e._v("本记录教室总数")]),s("div",{staticClass:"header-num"},[e._v(" "+e._s(e.statical_num?e.statical_num.room_nums:0)+" ")])]),s("div",{staticClass:"header-item"},[s("div",[e._v("本记录教师课程总数")]),s("div",{staticClass:"header-num"},[e._v(" "+e._s(e.statical_num?e.statical_num.teach_lesson_nums:0)+" ")])]),s("div",{staticClass:"header-item"},[s("div",[e._v("本记录教师总数")]),s("div",{staticClass:"header-num"},[e._v(" "+e._s(e.statical_num?e.statical_num.teacher_nums:0)+" ")])])])]),e.statical.length>0?s("el-card",{directives:[{name:"loading",rawName:"v-loading",value:e.chongtuLoading,expression:"chongtuLoading"}],staticClass:"box-card"},[s("div",{staticClass:"chongtu-title"},[e._v(" 冲突统计: ")]),s("div",{staticClass:"chongtu"},[s("div",{staticClass:"chongtu-list"},e._l(e.statical,(function(t,a){return s("el-tag",{key:a,staticStyle:{"margin-bottom":"5px",cursor:"pointer"},attrs:{type:"danger"},on:{click:function(s){return e.clickChontuTag(t)}}},[e._v(" "+e._s(t.room?t.room.name:"")+" "),s("span",{staticStyle:{color:"red"}},[e._v("("+e._s(t.nums)+")")])])})),1)])]):e._e(),s("div",{staticClass:"content"},[s("vab-query-form",[s("vab-query-form-left-panel",{attrs:{span:12}},[s("el-page-header",{staticClass:"goback",attrs:{content:"数据审核"},on:{back:e.goBack}})],1),s("vab-query-form-right-panel",{attrs:{span:12}},[s("el-button",{attrs:{type:"primary"},on:{click:e.checkChongtu}},[e._v("刷新冲突")]),s("el-popover",{attrs:{content:"请先解决课程冲突!!!",placement:"top-start",trigger:"hover",width:"200"}},[s("div",{attrs:{slot:"reference"},slot:"reference"},[e.statical.length>0?s("el-button",{attrs:{disabled:e.statical.length>0,type:"warning"},on:{click:e.hebingMain}},[e._v(" 合并到主库 ")]):e._e()],1)]),!e.statical.length>0?s("el-button",{attrs:{type:"warning"},on:{click:e.hebingMain}},[e._v(" 合并到主库 ")]):e._e()],1)],1),s("vab-query-form",[s("vab-query-form-left-panel",{attrs:{span:12}},[s("el-form",{attrs:{inline:!0,model:e.queryForm},nativeOn:{submit:function(e){e.preventDefault()}}},[s("el-form-item",{attrs:{prop:"id"}},[s("el-select",{attrs:{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 s("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1),s("el-form-item",{attrs:{prop:"id"}},[s("el-select",{attrs:{placeholder:"请选择实验室"},on:{change:e.changeRoom},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 s("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)],1)],1),s("vab-query-form-right-panel",{attrs:{span:12}},[s("el-form",{attrs:{inline:!0}},[s("el-form-item",{attrs:{prop:"id"}},[s("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(t)}},model:{value:e.queryForm1.lesson_name,callback:function(t){e.$set(e.queryForm1,"lesson_name",t)},expression:"queryForm1.lesson_name"}})],1),s("el-form-item",{attrs:{prop:"id"}},[s("el-button",{attrs:{type:"primary"},on:{click:e.queryData}},[e._v("搜索")])],1)],1)],1)],1),s("div",{staticClass:"table-flex"},[s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],staticClass:"table"},[s("div",{staticClass:"table-title",staticStyle:{"background-color":"#0cb8b6",color:"#fff"}},[e._v(" "+e._s(e.room_name)+" (第"+e._s(e.queryForm.week)+"周) "),s("div",{staticClass:"change-week"},[s("el-button",{class:1==e.queryForm.week?"disabled-click":"",attrs:{disabled:1==e.queryForm.week,plain:"",type:"warning"},on:{click:e.lastWeek}},[e._v(" 上一周 ")]),s("el-button",{class:e.queryForm.week>=e.max_week?"disabled-click":"",attrs:{disabled:e.queryForm.week>=e.max_week,plain:"",type:"warning"},on:{click:e.nextWeek}},[e._v(" 下一周 ")])],1)]),s("div",{staticClass:"table-border"},[s("div",{staticClass:"day"},[e._m(0),e._l(e.dayList,(function(t,a){return s("div",{key:a,staticClass:"day-item"},[s("div",{staticClass:"time",staticStyle:{height:"55px","line-height":"20px","background-color":"#0cb8b6"}},[s("div",{staticStyle:{"padding-top":"8px"}},[e._v(e._s(t.week))]),s("div",[e._v(e._s(t.day))])])])}))],2),e._l(e.courseList,(function(t,a){return s("div",{key:a,staticClass:"course-line"},[s("div",{staticClass:"course-line-item course-jie"},[e._v(" "+e._s(e.timeList[a].name)+" ")]),e._l(e.courseList[a],(function(t,i){return s("div",{key:i,staticClass:"course-line-item",class:e.current_chongtu_course.week==e.queryForm.week&&e.current_chongtu_course.room_id==e.queryForm.room_id&&e.current_chongtu_course.time_id==e.timeList[a].id&&i==e.current_chongtu_course.week_index?"current-chongtu":"",on:{click:function(t){return e.currentSelect(i,e.timeList[a].id)}}},[t.is_main_lesson?s("div",{staticClass:"min-lesson"},[s("div",{staticClass:"dian"}),s("div",{staticClass:"course-content",on:{click:function(s){return e.lookDetail(t.main_lesson.id,1)}}},[s("span",{staticClass:"lession-title"},[e._v(" "+e._s(t.main_lesson&&t.main_lesson.lesson?t.main_lesson.lesson.name:"--")+" ")]),e._v(" / "),s("span",[e._v(" "+e._s(t.main_lesson&&t.main_lesson.teacher?t.main_lesson.teacher.name:"--")+" ")]),s("span",{staticClass:"grade"},[e._v(" "+e._s(t.main_lesson&&t.main_lesson.grade?t.main_lesson.grade.name:"--")+" ")])])]):e._e(),t.is_open_appointment?s("div",{staticClass:"min-lesson",on:{click:function(s){return e.openOrderDetail(t.open_appointment.id)}}},[s("div",{staticClass:"dian openorder-dian"}),s("div",{staticClass:"course-content openorder-course"},[s("span",{staticClass:"lession-title"},[e._v("开放预约")]),e._v(" / "),s("span",[e._v(" "+e._s(t.open_appointment.applicant_name)+"("+e._s(t.open_appointment.department)+") ")])])]):e._e(),!t.is_lesson||t.is_main_lesson||t.is_maintain||t.is_open_appointment?e._e():s("div",e._l(t.lesson,(function(t,a){return s("div",{key:a,staticClass:"import-lesson is-lesson",on:{click:function(s){return e.lookDetail(t.id,2)}}},[s("div",{staticClass:"dian"}),s("div",{staticClass:"course-content"},[s("span",{staticClass:"lession-title"},[e._v(" "+e._s(t.lesson?t.lesson.name:"--")+" ")]),e._v(" / "),s("span",[e._v(" "+e._s(t.teacher?t.teacher.name:"--")+" ")]),s("span",{staticClass:"grade"},[e._v(" "+e._s(t.grade?t.grade.name:"--")+" ")])])])})),0),t.is_lesson&&(t.is_main_lesson||t.is_open_appointment)?s("div",e._l(t.lesson,(function(t,a){return s("div",{key:a,staticClass:"chongtu-lesson",on:{click:function(s){return e.lookDetail(t.id,2)}}},[s("div",{staticClass:"dian"}),s("div",{staticClass:"course-content"},[s("span",{staticClass:"lession-title"},[e._v(" "+e._s(t.lesson?t.lesson.name:"--")+" ")]),e._v(" / "),s("span",[e._v(" "+e._s(t.teacher?t.teacher.name:"--")+" ")]),s("span",{staticClass:"grade"},[e._v(" "+e._s(t.grade?t.grade.name:"--")+" ")])])])})),0):e._e(),t.is_lesson||t.is_main_lesson||!t.is_maintain?e._e():s("div",{staticClass:"min-lesson",on:{click:function(s){return e.lookRepairDetail(t.is_maintain)}}},[s("div",{staticClass:"dian"}),e._m(1,!0)]),t.is_lesson&&!t.is_main_lesson&&t.is_maintain?s("div",{staticClass:"chongtu-lesson"},e._l(t.lesson,(function(t,a){return s("div",{key:a,staticClass:"import-lesson is-lesson",on:{click:function(s){return e.lookDetail(t.id,2)}}},[s("div",{staticClass:"dian"}),s("div",{staticClass:"course-content"},[s("span",{staticClass:"lession-title"},[e._v(" "+e._s(t.lesson?t.lesson.name:"--")+" ")]),e._v(" / "),s("span",[e._v(" "+e._s(t.teacher?t.teacher.name:"--")+" ")]),s("span",{staticClass:"grade"},[e._v(" "+e._s(t.grade?t.grade.name:"--")+" ")])])])})),0):e._e(),t.is_lesson||t.is_main_lesson||t.is_maintain?e._e():s("div",{staticClass:"empty",on:{click:function(t){return e.addSchedule(e.dayList[i].day,e.timeList[a])}}})])}))],2)}))],2),e._m(2)]),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.tableLoading,expression:"tableLoading"}],staticClass:"content1"},[s("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[s("el-tab-pane",{attrs:{label:"冲突排班列表",name:"isclash"}}),s("el-tab-pane",{attrs:{label:"未冲突排班列表",name:"noclash"}})],1),s("div",[s("el-table",{attrs:{border:"",data:e.chontu_list},on:{"row-click":e.rowClick}},[s("el-table-column",{attrs:{align:"center",label:"课程名称",prop:"lesson","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[s("span",[e._v(e._s(a.lesson?a.lesson.name:""))]),s("span",[e._v("("+e._s(a.teacher?a.teacher.name:"--")+")")])]}}])}),s("el-table-column",{attrs:{align:"center",label:"班级",prop:"room"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[s("div",[s("el-popover",{attrs:{placement:"top",trigger:"hover",width:"250"}},[s("div",{staticClass:"hover_detail"},[e._v(" "+e._s(a.grade?a.grade.name:"--")+" ")]),s("div",{staticClass:"grade-item",attrs:{slot:"reference"},slot:"reference"},[s("div",[e._v(" "+e._s(a.grade?a.grade.name:"--")+" ")])])])],1)]}}])}),s("el-table-column",{attrs:{align:"center",label:"上课时间",prop:"migrate_data","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[s("span",[e._v(" "+e._s(a.week)+"周 / 周"+e._s(e.transformWeek(a.week_index))+" / "+e._s(a.time_id?a.time_id.name:"--")+" ")])]}}])}),s("el-table-column",{attrs:{align:"center",fixed:"right",label:"操作",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[s("el-button",{attrs:{type:"text"},on:{click:function(t){return e.handleEdit(a)}}},[e._v(" 编辑 ")]),s("el-button",{attrs:{type:"text"},on:{click:function(t){return e.handleDelete(a)}}},[e._v(" 删除 ")])]}}])})],1),s("el-pagination",{attrs:{background:"","current-page":e.queryForm1.page,layout:e.layout,"page-size":e.queryForm1.per_page,"page-sizes":[15,20,30,40,50,100],total:e.total},on:{"current-change":e.handleCurrentChange,"size-change":e.handleSizeChange}})],1)],1)]),s("editScheduleDialog",{ref:"do-edit",on:{"fetch-calendar":e.getCalendar,"fetch-data":e.chongtuList}}),s("classDialog",{ref:"dialog"}),s("addScheduleDialog",{ref:"order",on:{"fetch-data":e.getCalendar}}),s("stopDetail",{ref:"stopdetail"}),s("scheduleDetail",{ref:"schedule-detail",on:{"fetch-data":e.getCalendar}}),s("openDetailDialog",{ref:"open-order-detail"}),s("repairDetail",{ref:"repair-detail"})],1)],1)},i=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"day-item",staticStyle:{flex:"0 0 80px"}},[s("div",{staticClass:"time",staticStyle:{height:"55px","line-height":"20px","background-color":"#0cb8b6"}})])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"lession-title"},[s("div",[e._v("维护中")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"tips"},[s("div",{staticClass:"tips-item"},[s("span",{staticClass:"dian",staticStyle:{"background-color":"#eee"}}),s("span",[e._v("主表课程")])]),s("div",{staticClass:"tips-item"},[s("span",{staticClass:"dian",staticStyle:{"background-color":"red"}}),s("span",[e._v("冲突课程")])]),s("div",{staticClass:"tips-item"},[s("span",{staticClass:"dian",staticStyle:{"background-color":"#1890ff"}}),s("span",[e._v("新导入课程")])]),s("div",{staticClass:"tips-item"},[s("span",{staticClass:"dian",staticStyle:{"background-color":"#fb7304"}}),s("span",[e._v("开放预约")])])])}],o=s("35d9"),l=s("e58c"),r=s("6c094"),n=s("3716"),c=s("6dea"),d=s("bbe3"),m=s("03a6"),u=s("d12b"),_=s("77f1"),h=s("7736"),p={name:"TemplateIndex",components:{classDialog:o["default"],addScheduleDialog:l["default"],stopDetail:r["default"],scheduleDetail:n["default"],editScheduleDialog:c["default"],openDetailDialog:m["default"],repairDetail:d["default"]},data(){return{chongtuLoading:!0,listLoading:!0,tableLoading:!0,layout:"total, prev,next, jumper",total:1,queryForm1:{page:1,per_page:15,is_clash:1,import_record_id:""},queryForm:{week:1},dayList:[],timeList:[],courseList:[],max_week:localStorage.getItem("term_weeks"),roomList:[{name:"网络运维",value:1},{name:"组装实验室",value:2}],weekList:[],room_name:"",chontu_list:[],statical:[],statical_num:"",current_chongtu_course:"",activeName:"isclash",checkStatus:0}},computed:{...Object(h["c"])({weeks:"user/weeks"})},async created(){let e=this.$route.query.id;e?(await this.getRoomaList(),this.queryForm1.import_record_id=this.queryForm.id=e,await this.getWeeks(),await this.getCalendar(),await this.importStatistical(),await this.chongtuList()):this.$router.push("/courseTable/tableImport")},methods:{transformWeek:u["transformWeek"],hebingMain(){this.$baseConfirm("您确定将当前排班合并到主库吗?",null,async()=>{const{message:e}=await Object(_["doHebingMain"])({id:this.queryForm.id});this.$baseMessage(e,"success",!1,"vab-hey-message-success"),this.goBack()})},async checkChongtu(){const{data:e}=await Object(_["checkClash"])({id:this.queryForm.id});console.log(e,"ppppppppp"),this.$baseMessage("刷新冲突成功!","success",!1,"vab-hey-message-success"),this.importStatistical(),this.chongtuList()},async importStatistical(){const{data:e}=await Object(_["importStatistical"])({id:this.queryForm.id});this.statical=e.statistical,this.statical_num=e.record_statistical},async chongtuList(){this.tableLoading=!0,this.chongtuLoading=!0;const{data:e}=await Object(_["chongtuList"])(this.queryForm1);this.chontu_list=e.list;const{pagination:t}=e.meta;this.total=t.total,this.chongtuLoading=!1,this.tableLoading=!1},queryData(){this.queryForm1.page=1,this.chongtuList()},handleSizeChange(e){this.queryForm1.per_page=e,this.chongtuList()},handleCurrentChange(e){this.queryForm1.page=e,this.chongtuList()},goBack(){this.$router.push("/courseTable/tableImport")},stop_detail(e,t){let s=e.week_index,a={week_index:s,week:e.week,room_id:this.queryForm.room_id,time_id:this.timeList[t].id};this.$refs["stopdetail"].showEdit(a),console.log(a,"=======")},getWeeks(){console.log(this.weeks,"-------------");let e=localStorage.getItem("term_weeks");for(let t=1;t<=e;t++)this.weekList.push({name:"第"+t+"周",value:t})},checkOld(e){var t=Number(this.today.replace(/-/g,"")),s=Number(e.replace(/-/g,""));return t==s},async getRoomaList(){const{data:e}=await Object(_["getRoomaList"])();this.roomList=e.length?e:[],this.room_name=e.length?e[0].name:"",this.queryForm.room_id=this.queryForm.room_id=e.length?e[0].id:0,localStorage.setItem("roomList",e.length?JSON.stringify(e):"")},async getCalendar(){this.listLoading=!0;const{data:e}=await Object(_["getCalendar"])(this.queryForm);this.timeList=e.times,this.dayList=e.headers,this.courseList=e.calendar,this.queryForm.week=e.week;let t=e.headers;t.map(e=>{switch(e.week){case 0:e.week="星期一";break;case 1:e.week="星期二";break;case 2:e.week="星期三";break;case 3:e.week="星期四";break;case 4:e.week="星期五";break;case 5:e.week="星期六";break;case 6:e.week="星期日";break}return e}),this.dayList=t,this.listLoading=!1},cancelRepair(){this.$baseConfirm("你确定要对当前教室的维护吗?",null,async()=>{})},addSchedule(e,t){console.log("ppp"),this.$refs["order"].showEdit({day:e,time_id:t.id,room_id:this.queryForm.room_id,import_record_id:this.queryForm.id})},lookDetail(e,t){this.$refs["schedule-detail"].showEdit({id:e,shedule_id:this.queryForm.id,type:t,room_name:this.room_name,room_id:this.queryForm.room_id})},openOrderDetail(e){this.$refs["open-order-detail"].showEdit(e)},lookRepairDetail(e){this.$refs["repair-detail"].showEdit(e)},currentSelect(e,t){console.log("oooooooooooooooooooooooooooooooooooooooooo"),this.current_chongtu_course={room_id:this.queryForm.room_id,week:this.queryForm.week,week_index:e,time_id:t}},changeRoom(e){this.queryForm.room_id=e,this.queryForm1.room_id=e,this.roomList.map(t=>{t.id==e&&(this.room_name=t.name)}),this.getCalendar(),this.chongtuList()},changeWeeks(e){console.log(e,"eeeeeeeee"),this.queryForm.week=e,this.getCalendar(),this.chongtuList()},lastWeek(){this.queryForm.week--,this.getCalendar()},nextWeek(){this.queryForm.week++,this.getCalendar()},async handleDelete(e){this.$baseConfirm("您确定要删除当前排班课程吗",null,async()=>{const{message:t}=await Object(_["deleteSchedule"])({id:e.id});this.$baseMessage(t,"success",!1,"vab-hey-message-success"),this.chongtuList()})},handleEdit(e){this.$refs["do-edit"].showEdit({detail:{grade:e.grade,lesson:e.lesson,teacher:e.teacher,time_id:e.time_id,week:e.week,day:e.day,week_index:e.week_index,id:e.id},current_course:{time_id:e.time_id.id,week_index:e.week_index,room_id:e.room.id,week:e.week},id:this.queryForm.id,room_id:this.queryForm.room_id,room_name:this.room_name})},rowClick(e){console.log(e,"pppppppp"),this.queryForm.room_id=e.room?e.room.id:"",this.queryForm.week=e.week,this.room_name=e.room?e.room.name:"",this.getCalendar(),this.current_chongtu_course={room_id:e.room.id,week:e.week,week_index:e.week_index,time_id:e.time_id.id}},clickChontuTag(e){console.log(e,"pppp"),this.queryForm.room_id=e.room.id,this.queryForm1.room_id=e.room.id,this.room_name=e.room.name,this.getCalendar(),this.chongtuList()},handleClick(){console.log(this.activeName,"ooooooooo"),"isclash"==this.activeName&&(this.queryForm1.is_clash=1,this.chongtuList()),"noclash"==this.activeName&&(this.queryForm1.is_clash=0,this.chongtuList())}}},v=p,g=(s("322a"),s("0b56")),f=Object(g["a"])(v,a,i,!1,null,"284c4911",null);t["default"]=f.exports},e58c: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("el-dialog",{attrs:{"before-close":e.handleClose,title:"添加排班",visible:e.dialogVisible,width:"800px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[s("el-form",{ref:"form",staticClass:"form",attrs:{"label-width":"130px",model:e.form,rules:e.rules}},[s("el-form-item",{attrs:{label:"课程类型:",prop:"type"}},[s("el-radio-group",{on:{change:e.changeType},model:{value:e.form.type,callback:function(t){e.$set(e.form,"type",t)},expression:"form.type"}},[s("el-radio",{attrs:{label:1}},[e._v("已排课程")]),s("el-radio",{attrs:{label:0}},[e._v("未排课程")])],1)],1),1==e.form.type?s("el-form-item",{attrs:{label:"课程名称:",prop:"lesson_teacher_id"}},[s("el-select",{attrs:{clearable:"",filterable:"",loading:e.loading,placeholder:"请选择课程名称","popper-append-to-body":!1,"popper-class":"selectStyle",remote:"","remote-method":e.remoteMethod,"reserve-keyword":""},on:{change:e.changeCourse},model:{value:e.form.lesson_teacher_id,callback:function(t){e.$set(e.form,"lesson_teacher_id",t)},expression:"form.lesson_teacher_id"}},e._l(e.lessonList,(function(e){return s("el-option",{key:e.id,attrs:{label:(e.teacher?e.teacher.name:"")+"--"+(e.lesson?e.lesson.name:"")+"--"+(e.grade?e.grade.name:""),value:e.id}})})),1)],1):e._e(),0==e.form.type?s("div",[s("el-form-item",{attrs:{label:"课程名称:",prop:"lesson_teacher.lesson_id"}},[s("span",{staticClass:"star"},[e._v("*")]),s("el-select",{attrs:{clearable:"",placeholder:"请选择课程名称"},model:{value:e.form.lesson_teacher.lesson_id,callback:function(t){e.$set(e.form.lesson_teacher,"lesson_id",t)},expression:"form.lesson_teacher.lesson_id"}},e._l(e.courseList,(function(e){return s("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),s("el-form-item",{attrs:{label:"班级名称:",prop:"lesson_teacher.grade_id"}},[s("span",{staticClass:"star"},[e._v("*")]),s("el-select",{attrs:{clearable:"",placeholder:"请选择班级","popper-append-to-body":!1,"popper-class":"selectStyle"},model:{value:e.form.lesson_teacher.grade_id,callback:function(t){e.$set(e.form.lesson_teacher,"grade_id",t)},expression:"form.lesson_teacher.grade_id"}},e._l(e.gradeList,(function(e){return s("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),s("el-form-item",{attrs:{label:"任课教师:",prop:"lesson_teacher.teacher_admin_id"}},[s("span",{staticClass:"star"},[e._v("*")]),s("el-select",{attrs:{clearable:"",placeholder:"请选择任课教师"},model:{value:e.form.lesson_teacher.teacher_admin_id,callback:function(t){e.$set(e.form.lesson_teacher,"teacher_admin_id",t)},expression:"form.lesson_teacher.teacher_admin_id"}},e._l(e.teacherList,(function(e){return s("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)],1):e._e(),s("el-form-item",{attrs:{label:"实验小组:",prop:"group"}},[s("el-select",{attrs:{clearable:"",placeholder:"请选择实验小组"},model:{value:e.form.group,callback:function(t){e.$set(e.form,"group",t)},expression:"form.group"}},e._l(e.groupList,(function(e,t){return s("el-option",{key:t,attrs:{label:e,value:t}})})),1)],1),s("el-form-item",{attrs:{label:"学生人数:",prop:"student_nums"}},[s("el-input",{attrs:{placeholder:"请输入学生人数"},model:{value:e.form.student_nums,callback:function(t){e.$set(e.form,"student_nums",t)},expression:"form.student_nums"}})],1),s("el-form-item",{attrs:{label:"课时(单节课程):",prop:"class_hour"}},[s("el-input",{attrs:{placeholder:"请输入当前添加课程所占课时"},model:{value:e.form.class_hour,callback:function(t){e.$set(e.form,"class_hour",t)},expression:"form.class_hour"}})],1)],1),s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:e.handleClose}},[e._v("取 消")]),s("el-button",{attrs:{type:"primary"},on:{click:e.sureAdd}},[e._v("立即添加")])],1)],1)},i=[],o=s("77f1"),l={name:"TemplateClassdialog",data(){return{loading:!0,dialogVisible:!1,form:{lesson_teacher:{},group:"",student_nums:"",import_record_id:"",lesson_teacher_id:"",room_id:"",time_id:"",day:"",class_hour:"",type:1},lessonList:[],teacherList:[],groupList:["A组","B组","C组","D组","E组"],gradeList:[],courseList:[],import_record_id:"",room_id:"",time_id:"",day:"",rules:{type:[{required:!0,trigger:"change",message:"请选择课程类型"}],lesson_teacher_id:[{required:!0,trigger:"change",message:"请选择课程"}],group:[{required:!0,trigger:"blur",message:"请填写实验小组"}],student_nums:[{required:!0,trigger:"blur",message:"请输入学生人数"}],class_hour:[{required:!0,trigger:"blur",message:"请输入课时"}]}}},methods:{async gradeOptions(){const{data:e}=await Object(o["gradeOptions"])();this.gradeList=e},async teacherSelect(){const{data:e}=await Object(o["teacherSelect"])({role_name:"teacher"});this.teacherList=e},async lessonSelect(e){const{data:t}=await Object(o["lessonSelect"])(e);this.lessonList=t,console.log(this.lessonList," this.lessonList"),this.loading=!1},remoteMethod(e){let t={lesson_name:e};this.lessonSelect(t),console.log(e,"-------------")},async courseSelect(){const{data:e}=await Object(o["courseSelect"])();this.courseList=e,console.log(this.courseList," this.courseList")},changeCourse(){},handleClose(){this.form={lesson_teacher:{},group:"",student_nums:"",import_record_id:"",lesson_teacher_id:"",room_id:"",time_id:"",type:1,day:"",class_hour:""},this.$refs["form"].resetFields(),this.$refs["form"].clearValidate(),this.dialogVisible=!1},changeType(e){console.log(e),this.form={lesson_teacher:{},group:"",student_nums:"",lesson_teacher_id:"",import_record_id:this.import_record_id,room_id:this.room_id,time_id:this.time_id,day:this.day,type:e,class_hour:""},this.$refs["form"].resetFields(),this.$refs["form"].clearValidate()},showEdit(e){this.lessonSelect(),this.teacherSelect(),this.gradeOptions(),this.courseSelect(),this.day=this.form.day=e.day,this.time_id=this.form.time_id=e.time_id,this.import_record_id=this.form.import_record_id=e.import_record_id,this.room_id=this.form.room_id=e.room_id,this.dialogVisible=!0},sureAdd(){this.form.lesson_teacher.lesson_id||0!=this.form.type?this.form.lesson_teacher.grade_id||0!=this.form.type?this.form.lesson_teacher.teacher_admin_id||0!=this.form.type?this.$refs["form"].validate(async e=>{var t=new RegExp("^[0-9]*[1-9][0-9]*$");if(e){if(this.form.lesson_teacher.teacher_id=0,0!==this.form.student_nums&&!t.test(this.form.student_nums))return this.$message.warning("学生人数必须为整数!"),void(this.form.student_nums="");if(0!==this.form.class_hour&&!t.test(this.form.class_hour))return this.$message.warning("课时必须为整数!"),void(this.form.class_hour="");0==this.form.type&&(this.form.lesson_teacher_id=0),delete this.form.lesson_id;const{message:e}=await Object(o["addTable"])(this.form);this.$baseMessage(e,"success",!1,"vab-hey-message-success"),this.$emit("fetch-data"),this.$refs["form"].resetFields(),this.handleClose()}}):this.$message.warning("请选择教师!"):this.$message.warning("请选择班级!"):this.$message.warning("请选择课程!")}}},r=l,n=(s("1ab3"),s("0b56")),c=Object(n["a"])(r,a,i,!1,null,"7dfdc1ee",null);t["default"]=c.exports},eb3d:function(e,t,s){}}]);