/*! * build: Hopaheal * copyright: Mead * time: 2023-3-13 15:21:04 */ (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3af179d3"],{"3d72":function(t,e,a){},"77f1":function(t,e,a){"use strict";a.r(e),a.d(e,"getCalendar",(function(){return r})),a.d(e,"lessonSelect",(function(){return l})),a.d(e,"courseSelect",(function(){return n})),a.d(e,"teacherSelect",(function(){return i})),a.d(e,"addTable",(function(){return o})),a.d(e,"deleteSchedule",(function(){return u})),a.d(e,"importCourseDetail",(function(){return c})),a.d(e,"mainCourseDetail",(function(){return d})),a.d(e,"orderDetail",(function(){return m})),a.d(e,"getDetail",(function(){return p})),a.d(e,"getCalendarSimple",(function(){return f})),a.d(e,"doEditShedule",(function(){return h})),a.d(e,"getTimeList",(function(){return b})),a.d(e,"getRoomaList",(function(){return g})),a.d(e,"importStatistical",(function(){return _})),a.d(e,"chongtuList",(function(){return y})),a.d(e,"doHebingMain",(function(){return v})),a.d(e,"checkClash",(function(){return w})),a.d(e,"gradeOptions",(function(){return k}));var s=a("b775");function r(t){return Object(s["default"])({url:"/lab/schedule/calendar",method:"post",data:t})}function l(t){return Object(s["default"])({url:"/school/lesson-teacher-select-options",method:"get",params:t})}function n(t){return Object(s["default"])({url:"/school/lesson-select-options",method:"get",params:t})}function i(t){return Object(s["default"])({url:"/base/admin-select-options",method:"get",params:t})}function o(t){return Object(s["default"])({url:"/lab/schedule/store",method:"post",data:t})}function u(t){return Object(s["default"])({url:"/lab/schedule/delete/"+t.id,method:"delete",data:t})}function c(t){return Object(s["default"])({url:"/lab/schedule/info/"+t,method:"get"})}function d(t){return Object(s["default"])({url:"/school/schedule/info/"+t,method:"get"})}function m(t){return Object(s["default"])({url:"/lab/open-appointment/info/"+t,method:"get"})}function p(t){return Object(s["default"])({url:"/lab/maintain/info/"+t,method:"get"})}function f(t){return Object(s["default"])({url:"/lab/schedule/calendar-simple",method:"post",data:t})}function h(t){return Object(s["default"])({url:"/lab/schedule/update",method:"post",data:t})}function b(t){return Object(s["default"])({url:"/school/time-select-options",method:"get",params:t})}function g(t){return Object(s["default"])({url:"/school/room-select-options",method:"get",params:t})}function _(t){return Object(s["default"])({url:"/lab/import/record-statistical",method:"get",params:t})}function y(t){return Object(s["default"])({url:"/lab/schedule",method:"get",params:t})}function v(t){return Object(s["default"])({url:"/lab/import/record-change-status",method:"get",params:t})}function w(t){return Object(s["default"])({url:"/lab/import/check-is-clash",method:"get",params:t})}function k(t){return Object(s["default"])({url:"/school/grade-select-options",method:"get",params:t})}},"7c25":function(t,e,a){"use strict";a("cf47")},cf47:function(t,e,a){},dba8:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"content"},[a("vab-query-form",[a("vab-query-form-left-panel",{attrs:{span:12}},[a("el-button",{attrs:{icon:"el-icon-upload2",type:"warning"},on:{click:t.batchImport}},[t._v(" 导入教学任务 ")]),a("a",{attrs:{download:"导实验室执行计划表模板",href:"/template/import_lesson_schedules_1.xlsx",target:"_blank"}},[a("i",{staticClass:"el-icon-download"}),t._v(" 导实验室执行计划表模板 ")]),a("a",{staticStyle:{"margin-left":"20px"},attrs:{download:"平台课程排课模板",href:"/template/import_lesson_schedules_2.xlsx"}},[a("i",{staticClass:"el-icon-download"}),t._v(" 平台课程排课表模板 ")])],1),a("vab-query-form-right-panel",{attrs:{span:12}},[a("el-form",{attrs:{inline:!0,model:t.queryForm},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-form-item",[a("el-input",{attrs:{clearable:"",placeholder:"请输入文件名称"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.queryData(e)}},model:{value:t.queryForm.name,callback:function(e){t.$set(t.queryForm,"name","string"===typeof e?e.trim():e)},expression:"queryForm.name"}})],1),a("el-form-item",[a("el-button",{attrs:{icon:"el-icon-search",type:"primary"},on:{click:t.queryData}},[t._v(" 查询 ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{border:"",data:t.list},on:{"selection-change":t.setSelectRows}},[a("el-table-column",{attrs:{"show-overflow-tooltip":"",type:"selection"}}),a("el-table-column",{attrs:{align:"center",label:"序号",type:"index",width:"60"}}),a("el-table-column",{attrs:{align:"center",label:"记录名称","min-width":"250",prop:"name"}}),a("el-table-column",{attrs:{align:"center",label:"模板类型","min-width":"200",prop:"body","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[1==s.type?a("el-tag",{attrs:{type:"primary"}},[t._v(" 实验室执行计划表 ")]):t._e(),2==s.type?a("el-tag",{attrs:{type:"success"}},[t._v(" 平台课程排课模板 ")]):t._e()]}}])}),a("el-table-column",{attrs:{align:"center",label:"上传人","min-width":"120",prop:"admin"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[a("span",[t._v(t._s(s.admin?s.admin.name:""))])]}}])}),a("el-table-column",{attrs:{align:"center",label:"状态","min-width":"160",prop:"room"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[5==s.status||8==s.status?a("el-tag",{attrs:{type:"success"}},[t._v(" "+t._s(s.status_text)+" ")]):t._e(),4==s.status||7==s.status?a("el-tag",{attrs:{type:"danger"}},[t._v(" "+t._s(s.status_text)+" ")]):t._e(),3==s.status||2==s.status||6==s.status?a("el-tag",{attrs:{type:"warning"}},[t._v(" "+t._s(s.status_text)+" ")]):t._e(),1==s.status?a("el-tag",[t._v(" "+t._s(s.status_text)+" ")]):t._e()]}}])}),a("el-table-column",{attrs:{align:"center",label:"上传失败原因","min-width":"180",prop:"created_at"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[s.message&&s.message.length>0?a("span",[a("el-tag",{attrs:{type:"danger"}},[t._v(t._s(s.message))])],1):a("span",[t._v("--")])]}}])}),a("el-table-column",{attrs:{align:"center",label:"上传时间","min-width":"180",prop:"created_at"}}),a("el-table-column",{attrs:{align:"center",fixed:"right",label:"操作","min-width":"180"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[8==s.status?a("el-button",{attrs:{type:"text"},on:{click:function(e){return t.handlePreview(s)}}},[t._v(" 预览 ")]):t._e(),3==s.status?a("el-button",{staticStyle:{color:"#ff6e27"},attrs:{type:"text"},on:{click:function(e){return t.handleLook(s)}}},[t._v(" 数据审核 ")]):t._e(),5==s.status?a("el-button",{staticStyle:{color:"#0ba526"},attrs:{type:"text"},on:{click:function(e){return t.hebingMain(s)}}},[t._v(" 合并到主库 ")]):t._e(),8!==s.status?a("el-button",{staticStyle:{color:"red"},attrs:{type:"text"},on:{click:function(e){return t.handleDelete(s)}}},[t._v(" 删除 ")]):t._e()]}}])})],1),a("el-pagination",{attrs:{background:"","current-page":t.queryForm.page,layout:t.layout,"page-size":t.queryForm.per_page,"page-sizes":[15,20,30,40,50,100],total:t.total},on:{"current-change":t.handleCurrentChange,"size-change":t.handleSizeChange}})],1),a("importDialog",{ref:"import",on:{"fetch-data":t.getImportList}})],1)},r=[],l=a("fcbe"),n=a("77f1"),i=a("f121"),o=a("f496"),u={name:"TemplateTableimport",components:{importDialog:o["default"]},data(){return{listLoading:!0,layout:"total, sizes, prev, pager, next, jumper",total:1,queryForm:{page:1,per_page:15},list:[],selectRows:[],lab_url:"",pingtai_url:""}},created(){this.lab_url=i["base_url"]+"/template/import_lesson_schedules_1.xlsx",this.pingtai_url=i["base_url"]+"/template/import_lesson_schedules_2.xlsx",this.getImportList()},methods:{handlePreview(t){this.$router.push({path:"/courseTable/importPreview",query:t.id})},hebingMain(t){this.$baseConfirm("您确定将当前排班合并到主库吗?",null,async()=>{const{message:e}=await Object(n["doHebingMain"])({id:t.id});this.$baseMessage(e,"success",!1,"vab-hey-message-success"),this.goBack()})},async getImportList(){this.listLoading=!0;const{data:t}=await Object(l["importList"])(this.queryForm);this.list=t.list;const{pagination:e}=t.meta;this.total=e.total,this.listLoading=!1},queryData(){this.queryForm.page=1,this.getImportList()},handleSizeChange(t){this.queryForm.per_page=t,this.getImportList()},handleCurrentChange(t){this.queryForm.page=t,this.getImportList()},batchImport(){this.$refs["import"].showEdit()},handleLook(t){this.$router.push({path:"/courseTable/importDetail",query:{id:t.id}})},setSelectRows(t){this.selectRows=t},handleDelete(t){t.id&&this.$baseConfirm("您确定要删除当前导入记录吗?",null,async()=>{const{message:e}=await Object(l["doDelete"])(t.id);this.$baseMessage(e,"success",!1,"vab-hey-message-success"),await this.getImportList()})}}},c=u,d=(a("7c25"),a("0b56")),m=Object(d["a"])(c,s,r,!1,null,"3318afb8",null);e["default"]=m.exports},f496:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{attrs:{"before-close":t.handleClose,title:"课表导入",visible:t.dialogVisible,width:"800px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("div",{staticClass:"content_1"},[a("el-tabs",{on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"实验室执行计划表",name:"1"}}),a("el-tab-pane",{attrs:{label:"平台课程排课模板",name:"2"}})],1),a("el-form",{ref:"form",attrs:{"label-position":"left","label-width":"90px",model:t.form,rules:t.rules}},[a("div",{staticClass:"down-load"},[t._v(" 点击下载: "),"1"==t.activeName?a("a",{staticStyle:{color:"red"},attrs:{download:"导实验室执行计划表模板",href:"/template/import_lesson_schedules_1.xlsx"}},[t._v(" 实验室执行计划表模板 "),a("i",{staticClass:"el-icon-download"})]):t._e(),"2"==t.activeName?a("a",{staticStyle:{color:"red"},attrs:{download:"平台课程排课模板",href:"/template/import_lesson_schedules_2.xlsx"}},[t._v(" 平台课程排课模板 "),a("i",{staticClass:"el-icon-download"})]):t._e()]),a("el-form-item",{attrs:{label:"记录名称:",prop:"name"}},[a("el-input",{attrs:{placeholder:"请输入记录名称"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),a("el-form-item",{attrs:{label:"学期:",prop:"term_id"}},[a("el-select",{attrs:{disabled:!0,placeholder:"请选择学期"},on:{change:t.changeTrem},model:{value:t.form.term_id,callback:function(e){t.$set(t.form,"term_id",e)},expression:"form.term_id"}},t._l(t.termList,(function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),a("el-form-item",{attrs:{label:"上传文件:"}},[a("span",{staticClass:"star"},[t._v("*")]),a("el-upload",{staticClass:"upload-demo",attrs:{accept:".xls,.xlsx",action:t.action,data:t.uploadData,drag:"","file-list":t.fileList,"on-error":t.uploadError,"on-remove":t.handleRemove,"on-success":t.uploadSuccess}},[a("i",{staticClass:"el-icon-upload"}),a("div",{staticClass:"el-upload__text"},[t._v(" 将文件拖到此处,或 "),a("em",[t._v("点击上传")])])]),a("div",{staticClass:"tips"},[t._v(" 注意: "),a("div",{domProps:{innerHTML:t._s(t.tips)}})])],1)],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:t.handleClose}},[t._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:t.save}},[t._v("确 定")])],1)])},r=[],l=a("f121"),n=a("fcbe"),i={name:"TemplateClassdialog",data(){return{activeName:"1",action:"",fileList:[],uploadData:{file_type:"file",type:"import_record"},limit:1,dialogVisible:!1,termList:[],form:{resources:"",term_id:"",name:"",body:"",type:1},typeList:[{id:1,name:"实验室执行计划表"},{id:2,name:"平台课程排课模板"}],rules:{name:[{required:!0,trigger:"blur",message:"请输入记录名称"}],type:[{required:!0,trigger:["change","blur"],message:"请选择导入数据类型"}],term_id:[{required:!0,trigger:["change","blur"],message:"请选择学期"}]},lab_url:"",pingtai_url:"",tips:"",key:"COURSE_TABLE_IMPORT_TIPS"}},created(){this.action=l["baseURL"]+"/common/upload",this.fileList=[],this.lab_url=l["base_url"]+"/template/import_lesson_schedules_1.xlsx",this.pingtai_url=l["base_url"]+"/template/import_lesson_schedules_2.xlsx"},methods:{handleClick(){this.form.type=Number(this.activeName),"1"==this.activeName&&(this.key="COURSE_TABLE_IMPORT_TIPS"),"2"==this.activeName&&(this.key="TABLE_IMPORT_TIPS_PINGRTAI"),this.getSetting()},handleClose(){this.form={resources:"",term_id:"",name:"",body:"",type:1},this.fileList=[],this.dialogVisible=!1},showEdit(){let t=localStorage.getItem("term_id");this.form.term_id=Number(t),this.getTermList(),this.getSetting(),this.dialogVisible=!0},async getTermList(){const{data:t}=await Object(n["getTermList"])();this.termList=t},changeTrem(t){this.termList.map(e=>{e.id==t&&(this.form.name=e.name)})},getTnyMac(t){this.form.bodys=t},uploadError(){this.fileList=[],this.$message.error("文件上传失败,请重新上传")},uploadSuccess(t){console.log(t,"文件上传成功"),this.form.resources=t.data.path},handleRemove(){this.fileList=[],this.form.resources=""},save(){this.$refs["form"].validate(async t=>{if(t){this.dialogVisible=!1;const{message:t}=await Object(n["importAdd"])(this.form);console.log(t),this.$baseMessage("正在导入...","success",!1,"vab-hey-message-success"),setTimeout(()=>{this.$emit("fetch-data")},2e3),this.handleClose()}})},async getSetting(){const{data:t}=await Object(n["getSetting"])({key:this.key});this.tips=t.value}}},o=i,u=(a("f76c"),a("0b56")),c=Object(u["a"])(o,s,r,!1,null,"f818bc80",null);e["default"]=c.exports},f76c:function(t,e,a){"use strict";a("3d72")},fcbe:function(t,e,a){"use strict";a.r(e),a.d(e,"importList",(function(){return r})),a.d(e,"getTermList",(function(){return l})),a.d(e,"importAdd",(function(){return n})),a.d(e,"doDelete",(function(){return i})),a.d(e,"getSetting",(function(){return o}));var s=a("b775");function r(t){return Object(s["default"])({url:"/lab/import/record",method:"get",params:t})}function l(){return Object(s["default"])({url:"/school/term-select-options",method:"get"})}function n(t){return Object(s["default"])({url:"/lab/import/record",method:"post",data:t})}function i(t){return Object(s["default"])({url:"/lab/import/record/"+t,method:"delete"})}function o(t){return Object(s["default"])({url:"/base/setting-key",method:"get",params:t})}}}]);