/*! * build: Hopaheal * copyright: Mead * time: 2022-8-18 15:39:42 */ (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4fe8f8bf"],{"020b":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{"append-to-body":"","before-close":e.handleClose,title:"批量维护",visible:e.dialogVisible,width:"800px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("div",{staticClass:"content_1"},[a("el-form",{ref:"form",attrs:{"label-width":"120px",model:e.form,rules:e.rules}},[a("el-form-item",{attrs:{label:"实验室:",prop:"room_id"}},[a("el-select",{attrs:{clearable:"",disabled:"",placeholder:"请选择实验室"},model:{value:e.form.room_id,callback:function(t){e.$set(e.form,"room_id",t)},expression:"form.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:{label:"维护周:",prop:"week"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择维护周"},model:{value:e.form.week,callback:function(t){e.$set(e.form,"week",t)},expression:"form.week"}},e._l(e.weekList,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.value}})})),1)],1),a("el-form-item",{attrs:{label:"维护星期:",prop:"week_index"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择维护星期"},model:{value:e.form.week_index,callback:function(t){e.$set(e.form,"week_index",t)},expression:"form.week_index"}},e._l(e.weekIndexList,(function(e,t){return a("el-option",{key:t,attrs:{label:e,value:t}})})),1)],1),a("el-form-item",{attrs:{label:"维护时间段:",prop:"time_id"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择维护时间段"},on:{change:e.changeTime},model:{value:e.form.time_id,callback:function(t){e.$set(e.form,"time_id",t)},expression:"form.time_id"}},e._l(e.timeList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),a("el-form-item",{directives:[{name:"permissions",rawName:"v-permissions",value:["200601"],expression:"['200601']"}],attrs:{label:"维护人员:",prop:"maintain_admin_id"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择维护人员"},on:{change:e.changeAdmin},model:{value:e.form.maintain_admin_id,callback:function(t){e.$set(e.form,"maintain_admin_id",t)},expression:"form.maintain_admin_id"}},e._l(e.maintainAdminList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),a("el-form-item",{attrs:{label:"维护内容:",prop:"body"}},[a("el-input",{attrs:{placeholder:"请输入内容",rows:10,type:"textarea"},model:{value:e.form.body,callback:function(t){e.$set(e.form,"body",t)},expression:"form.body"}})],1)],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.handleClose}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.save}},[e._v("保存")])],1)])},r=[],n=a("1da1"),s=(a("d81d"),a("b0c0"),a("96cf"),a("f7e3")),o={name:"TemplateClassdialog",data:function(){return{dialogVisible:!1,type:"",form:{status:1,week:"",time_id:"",week_index:"",room_id:"",body:""},body:"",maintainAdminList:[],roomList:[],weekList:[],timeList:[],cycleList:[{id:1,name:"全部周"},{id:2,name:"单周"},{id:3,name:"双周"}],weekIndexList:["星期一","星期二","星期三","星期四","星期五","星期六","星期日"],rules:{week:[{required:!0,trigger:"change",message:"请选择教学周"}],time_id:[{required:!0,trigger:"change",message:"请选择维护节次"}],week_index:[{required:!0,trigger:"change",message:"请选择星期"}],room_id:[{required:!0,trigger:"change",message:"请选择实验室"}],status:[{required:!0,trigger:"change",message:"请选择状态"}]}}},methods:{getDetail:function(e){var t=this;return Object(n["a"])(regeneratorRuntime.mark((function a(){var i,r;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(s["getDetail"])(e);case 2:i=a.sent,r=i.data,t.form={id:r.id,status:r.status,week:r.week,time_id:r.time?r.time.id:"",week_index:r.week_index,room_id:r.room?r.room.id:"",body:r.body};case 5:case"end":return a.stop()}}),a)})))()},adminOptions:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function t(){var a,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(s["adminOptions"])({role_names:["admin","maintain"]});case 2:a=t.sent,i=a.data,e.maintainAdminList=i;case 5:case"end":return t.stop()}}),t)})))()},getTnyMac:function(e){console.log(e,"pppppppppppppppppp"),this.form.body=e,console.log()},getTimeList:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function t(){var a,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(s["timeList"])();case 2:a=t.sent,i=a.data,e.timeList=i;case 5:case"end":return t.stop()}}),t)})))()},handleClose:function(){this.body="",this.dialogVisible=!1},showEdit:function(e){var t=this;this.weekList=[];var a=localStorage.getItem("roomList")?JSON.parse(localStorage.getItem("roomList")):[];this.roomList=a,this.getWeeks(),this.adminOptions(),this.$nextTick((function(){t.form=Object.assign({},e),t.$set(t.form,t.form)})),console.log(""),this.getTimeList(),this.dialogVisible=!0},getWeeks:function(){for(var e=localStorage.getItem("term_weeks"),t=1;t<=e;t++)this.weekList.push({name:"第"+t+"周",value:t})},changeTime:function(e){var t=this;this.timeList.map((function(a){a.id==e&&(t.form.time_name=a.name)})),this.form.body="text"},createRepairList:function(){this.$refs["batch-repair-table"].showEdit(this.form)},changeAdmin:function(e){var t=this;this.maintainAdminList.map((function(a){a.id==e&&(t.form.maintain_admin_name=a.name)}))},save:function(){console.log(this.form,"form"),this.$emit("change-row",this.form),this.body="",this.dialogVisible=!1}}},l=o,c=(a("bda4"),a("2877")),d=Object(c["a"])(l,i,r,!1,null,"74d0ad0c",null);t["default"]=d.exports},"04d7":function(e,t,a){"use strict";a("93f9")},"1d13":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{"append-to-body":"","before-close":e.handleClose,title:"批量维护列表",visible:e.dialogVisible,width:"800px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("div",{staticClass:"content_1"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{border:"",data:e.list,"max-height":"500"}},[a("el-table-column",{attrs:{align:"center",label:"序号",prop:"date",type:"index",width:"50"}}),a("el-table-column",{attrs:{align:"center",label:"实验室名称","min-width":"180",prop:"room_name"}}),a("el-table-column",{attrs:{align:"center",label:"维护时间","min-width":"240",prop:"day"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[a("span",[e._v(" 第"+e._s(i.week?i.week:"--")+"周 星期"+e._s(e.transformWeek(i.week_index))+" "+e._s(i.time_name)+" ")])]}}])}),a("el-table-column",{attrs:{align:"center",label:"维护人员","min-width":"120",prop:"admin"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[a("span",[e._v(e._s(i.admin_name))])]}}])}),a("el-table-column",{attrs:{align:"center",label:"维护内容","min-width":"200",prop:"body"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[a("div",{domProps:{innerHTML:e._s(i.body)}})]}}])}),a("el-table-column",{attrs:{align:"center",label:"操作","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.doEdit(i)}}},[e._v("编辑")]),a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.doDelete(i)}}},[e._v("删除")])]}}])})],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.handleClose}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.sureAdd()}}},[e._v("立即添加")])],1),a("batchEdit",{ref:"batch-edit",on:{"change-row":e.changeRow}})],1)},r=[],n=a("1da1"),s=(a("96cf"),a("d81d"),a("b0c0"),a("4de4"),a("d3b7"),a("d12b")),o=a("020b"),l=a("f7e3"),c={name:"LabcenterBatchrepairtable",components:{batchEdit:o["default"]},data:function(){return{dialogVisible:!1,list:[],listLoading:!0,room_id:""}},methods:{handleClose:function(){this.dialogVisible=!1},transformWeek:s["transformWeek"],showEdit:function(e){var t=localStorage.getItem("term_weeks");console.log(e,"pppppppppp");var a=[];if(this.room_id=e.room_id,1==e.week_type)for(var i=1;i0){var a=this.selectRows.map((function(e){return e.id}));this.$baseConfirm("您确定要删除当前维护数据吗",null,Object(n["a"])(regeneratorRuntime.mark((function e(){var i,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(o["batchDelete"])({ids:a});case 2:return i=e.sent,r=i.message,t.$baseMessage(r,"success",!1,"vab-hey-message-success"),e.next=7,t.getList();case 7:case"end":return e.stop()}}),e)}))))}else this.$baseMessage("请先选择要删除的项!","error",!1,"vab-hey-message-error")}}},m=u,f=(a("6c4e"),a("2877")),p=Object(f["a"])(m,i,r,!1,null,"4ea23e52",null);t["default"]=p.exports},"6c4e":function(e,t,a){"use strict";a("2682")},"92c4":function(e,t,a){},9359:function(e,t,a){"use strict";a("9cf1")},"93f9":function(e,t,a){},"9cf1":function(e,t,a){},a3bd:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{"before-close":e.handleClose,title:"批量维护",visible:e.dialogVisible,width:"800px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("div",{staticClass:"content_1"},[a("el-form",{ref:"form",attrs:{"label-width":"120px",model:e.form,rules:e.rules}},[a("el-form-item",{attrs:{label:"实验室:",prop:"room_id"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择实验室"},model:{value:e.form.room_id,callback:function(t){e.$set(e.form,"room_id",t)},expression:"form.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:{label:"维护周期:",prop:"week_type"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择维护周"},model:{value:e.form.week_type,callback:function(t){e.$set(e.form,"week_type",t)},expression:"form.week_type"}},e._l(e.cycleList,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),a("el-form-item",{attrs:{label:"维护星期:",prop:"week_index"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择维护星期"},model:{value:e.form.week_index,callback:function(t){e.$set(e.form,"week_index",t)},expression:"form.week_index"}},e._l(e.weekIndexList,(function(e,t){return a("el-option",{key:t,attrs:{label:e,value:t}})})),1)],1),a("el-form-item",{attrs:{label:"维护时间段:",prop:"time_id"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择维护时间段"},on:{change:e.changeTime},model:{value:e.form.time_id,callback:function(t){e.$set(e.form,"time_id",t)},expression:"form.time_id"}},e._l(e.timeList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),a("el-form-item",{attrs:{label:"维护内容:",prop:"body"}},[a("tiny-mce",{attrs:{content:e.form.body,"tiny-height":300},on:{childByValue:e.getTnyMac}})],1),a("el-form-item",{attrs:{label:"状态:",prop:"status"}},[a("el-radio-group",{model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},[a("el-radio",{attrs:{label:1}},[e._v("正常")]),a("el-radio",{attrs:{label:0}},[e._v("禁用")])],1)],1)],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.handleClose}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.createRepairList}},[e._v("生成维护表")])],1),a("batchRepairTable",{ref:"batch-repair-table"})],1)},r=[],n=a("1da1"),s=(a("d81d"),a("b0c0"),a("96cf"),a("f7e3")),o=a("1d13"),l={name:"TemplateClassdialog",components:{batchRepairTable:o["default"]},data:function(){return{dialogVisible:!1,type:"",form:{status:1,week_type:"",time_id:"",week_index:"",room_id:"",body:""},roomList:[],weekList:[],timeList:[],cycleList:[{id:1,name:"全部周"},{id:2,name:"单周"},{id:3,name:"双周"}],weekIndexList:["星期一","星期二","星期三","星期四","星期五","星期六","星期日"],rules:{week:[{required:!0,trigger:"change",message:"请选择教学周"}],time_id:[{required:!0,trigger:"change",message:"请选择维护节次"}],week_index:[{required:!0,trigger:"change",message:"请选择星期"}],room_id:[{required:!0,trigger:"change",message:"请选择实验室"}],body:[{required:!0,trigger:"blur",message:"请输入维护内容"}],status:[{required:!0,trigger:"change",message:"请选择状态"}]}}},methods:{getDetail:function(e){var t=this;return Object(n["a"])(regeneratorRuntime.mark((function a(){var i,r;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(s["getDetail"])(e);case 2:i=a.sent,r=i.data,t.form={id:r.id,status:r.status,week:r.week,time_id:r.time?r.time.id:"",week_index:r.week_index,room_id:r.room?r.room.id:"",body:r.body};case 5:case"end":return a.stop()}}),a)})))()},getTnyMac:function(e){this.form.body=e},getTimeList:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function t(){var a,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(s["timeList"])();case 2:a=t.sent,i=a.data,e.timeList=i;case 5:case"end":return t.stop()}}),t)})))()},handleClose:function(){this.form={status:1,week:"",time_id:"",week_index:"",room_id:"",body:""},this.$refs["form"].resetFields(),this.dialogVisible=!1},showEdit:function(){var e=localStorage.getItem("roomList")?JSON.parse(localStorage.getItem("roomList")):[];this.roomList=e,this.getTimeList(),this.dialogVisible=!0},getWeeks:function(){for(var e=localStorage.getItem("term_weeks"),t=1;t<=e;t++)this.weekList.push({name:"第"+t+"周",value:t})},changeTime:function(e){var t=this;this.timeList.map((function(a){a.id==e&&(t.form.time_name=a.name)}))},createRepairList:function(){this.$refs["batch-repair-table"].showEdit(this.form)},sureAdd:function(){var e=this;this.$refs["form"].validate(function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(a){var i,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=9;break}return t.next=3,Object(s["doAdd"])(e.form);case 3:i=t.sent,r=i.message,e.$baseMessage(r,"success",!1,"vab-hey-message-success"),e.$emit("fetch-data"),e.$refs["form"].resetFields(),e.handleClose();case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},sureSave:function(){var e=this;this.$refs["form"].validate(function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(a){var i,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=9;break}return t.next=3,Object(s["doEdit"])(e.form);case 3:i=t.sent,r=i.message,e.$baseMessage(r,"success",!1,"vab-hey-message-success"),e.$emit("fetch-data"),e.$refs["form"].resetFields(),e.handleClose();case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}}},c=l,d=(a("9359"),a("2877")),u=Object(d["a"])(c,i,r,!1,null,"fc36d224",null);t["default"]=u.exports},bda4:function(e,t,a){"use strict";a("e7d6")},c4d7:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{"before-close":e.handleClose,center:"",title:"维护详情",visible:e.dialogVisible,width:"800px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("div",{staticClass:"content"},[a("div",{staticClass:"form"},[a("div",{staticClass:"label"},[e._v("实验室名称:")]),a("div",{staticClass:"text"},[e._v(e._s(e.detail.room?e.detail.room.name:"--"))])]),a("div",{staticClass:"form"},[a("div",{staticClass:"label"},[e._v("维护时间:")]),a("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:"--")+" ")])]),a("div",{staticClass:"form"},[a("div",{staticClass:"label"},[e._v("维护人员:")]),a("div",{staticClass:"text"},[e._v(" "+e._s(e.detail.maintain_admin?e.detail.maintain_admin.name:"--")+" ")])]),a("div",{staticClass:"form"},[a("div",{staticClass:"label"},[e._v("维护内容:")]),a("div",{staticClass:"text",domProps:{innerHTML:e._s(e.detail.body)}})])]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialogVisible=!1}}},[e._v("确 定")])],1)])},r=[],n=a("1da1"),s=(a("96cf"),a("d12b")),o=a("f7e3"),l={name:"TemplateClassdialog",data:function(){return{dialogVisible:!1,detail:""}},methods:{transformWeek:s["transformWeek"],recordDetail:function(e){var t=this;return Object(n["a"])(regeneratorRuntime.mark((function a(){var i,r;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(o["getDetail"])(e);case 2:i=a.sent,r=i.data,t.detail=r;case 5:case"end":return a.stop()}}),a)})))()},handleClose:function(){this.dialogVisible=!1},showEdit:function(e){this.recordDetail(e),this.dialogVisible=!0}}},c=l,d=(a("ef59"),a("2877")),u=Object(d["a"])(c,i,r,!1,null,"464c0f58",null);t["default"]=u.exports},d12b:function(e,t){e.exports={getKey:function(e){switch(e){case"课程类型":return"du2r3YxK";case"教室分类":return"2k43cCfM"}},transformWeek:function(e){switch(e){case 0:return"一";case 1:return"二";case 2:return"三";case 3:return"四";case 4:return"五";case 5:return"六";case 6:return"日"}},transformAuth:function(e){var t=JSON.parse(localStorage.getItem("permissions")),a=t.indexOf(e);return-1!=a}}},e7d6:function(e,t,a){},ef59:function(e,t,a){"use strict";a("92c4")},f7e3:function(e,t,a){"use strict";a.r(t),a.d(t,"repairList",(function(){return r})),a.d(t,"timeList",(function(){return n})),a.d(t,"doAdd",(function(){return s})),a.d(t,"doEdit",(function(){return o})),a.d(t,"getDetail",(function(){return l})),a.d(t,"cancelRepair",(function(){return c})),a.d(t,"batchRepair",(function(){return d})),a.d(t,"batchDelete",(function(){return u})),a.d(t,"adminOptions",(function(){return m})),a.d(t,"getRoomListOption",(function(){return f}));var i=a("b775");function r(e){return Object(i["default"])({url:"/lab/maintain",method:"get",params:e})}function n(e){return Object(i["default"])({url:"/school/time-select-options",method:"get",params:e})}function s(e){return Object(i["default"])({url:"/lab/maintain",method:"post",data:e})}function o(e){return Object(i["default"])({url:"/lab/maintain/"+e.id,method:"put",data:e})}function l(e){return Object(i["default"])({url:"/lab/maintain/info/"+e,method:"get"})}function c(e){return Object(i["default"])({url:"/lab/maintain/pause",method:"get",params:e})}function d(e){return Object(i["default"])({url:"/lab/maintain/batch",method:"post",data:e})}function u(e){return Object(i["default"])({url:"/lab/maintain-delete",method:"post",data:e})}function m(e){return Object(i["default"])({url:"/base/admin-select-options",method:"get",params:e})}function f(e){return Object(i["default"])({url:"/school/room-select-options",method:"get",params:e})}}}]);