(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3f269102"],{"0a98":function(t,e,a){},"1e51":function(t,e,a){"use strict";var n=a("0a98"),i=a.n(n);i.a},"206c":function(t,e,a){},2674:function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"set-table"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData,border:"","header-cell-style":{background:"#f2f2f2",color:"#606266"}}},[t._l(t.tableOption,(function(e,n){return[e.type?t._e():a("el-table-column",{key:n,attrs:{prop:e.prop,label:e.label,width:e.width},scopedSlots:t._u([{key:"default",fn:function(n){return["string"==typeof n.row[e.prop]?a("div",[t._v(" "+t._s(t._f("dataFormat")(n.row[e.prop],e.formatter))+" ")]):t._l(n.row.cellItem,(function(n,i){return a("div",{key:i,class:e.class},[t._v(" "+t._s(n.text)+" ")])}))]}}],null,!0)}),"switch"===e.type?a("el-table-column",{key:n,attrs:{prop:e.prop,label:e.label,width:e.width},scopedSlots:t._u([{key:"default",fn:function(n){return t._l(n.row.cellItem,(function(n,i){return a("div",{key:i,class:e.class},[a("el-switch",{attrs:{"active-color":"#16ae68","inactive-color":"#ddd"},on:{change:function(e){return t.handleChange(n.name,n.value,i)}},model:{value:n.value,callback:function(e){t.$set(n,"value",e)},expression:"list.value"}})],1)}))}}],null,!0)}):t._e(),"buttons"===e.type?a("el-table-column",{key:n,attrs:{prop:e.prop,label:e.label,width:e.width},scopedSlots:t._u([{key:"default",fn:function(i){return[a("div",{key:n,class:e.class},t._l(e.button,(function(e,n){return a("el-button",{key:n,on:{click:function(a){return t.handleClick(e,i.$index,i.row)}}},[t._v(t._s(e.text))])})),1)]}}],null,!0)}):t._e()]}))],2)],1)},i=[],l={name:"SetTable",props:{tableData:{type:Array},tableOption:{type:Array}},data:function(){return{}},computed:{},watch:{},created:function(){},mounted:function(){},methods:{handleChange:function(t,e,a){this.$emit("handleChange",t,e,a)},handleClick:function(t,e,a){this.$emit("handleClick",t,e,a)}},filters:{}},s=l,c=a("2877"),o=Object(c["a"])(s,n,i,!1,null,null,null);e["a"]=o.exports},"34ec":function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-dialog",{attrs:{title:t.handleType,width:t.dialogWidth,center:"",visible:t.dialogVisble,"before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisble=e}}},["提示"===t.handleType?a("span",[t._v(t._s(t.delText))]):t._e(),"编辑名称"===t.handleType?a("el-input",{attrs:{type:"text",placeholder:"请输入内容",maxlength:"15","show-word-limit":""},on:{change:function(e){return t.inputEvent(t.inputText)}},model:{value:t.inputText,callback:function(e){t.inputText=e},expression:"inputText"}}):t._e(),"编辑"===t.handleType?a("div",[a("span",{staticClass:"dialog-text"},[t._v(t._s(t.delText))]),a("div",{staticClass:"template-list-block"},[a("ul",t._l(t.dataList,(function(e,n){return a("li",{key:n,class:[e.template_id===t.currentId?"current":""],on:{click:function(a){return t.handleClick(e,n)}}},[t._v(" "+t._s(e.template_name)+" ")])})),0)])]):t._e(),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:t.handleDialogClose}},[t._v("取 消")]),a("el-button",{on:{click:t.handleDiaSub}},[t._v(t._s(t.submitBtnText))])],1)],1)],1)},i=[],l={name:"DiaLog",props:{dialogVisble:{type:Boolean,default:!1},dialogWidth:{type:String,default:""},handleType:{type:String,default:""},templateName:{type:String,default:""},delText:{type:String,default:""},dataList:{type:Array,default:function(){return[]}},currentId:{type:String,default:""}},data:function(){return{inputText:"",submitBtnText:""}},watch:{handleType:{handler:function(t){"提示"==this.handleType||"编辑"==this.handleType?this.submitBtnText="确定":this.submitBtnText="保存"}},templateName:{handler:function(t){this.inputText=t}}},created:function(){},methods:{handleDialogClose:function(){this.$emit("close",this.dialogVisble)},handleDiaSub:function(){this.$emit("submit",this.handleType)},handleClose:function(){this.$emit("close",this.dialogVisble)},inputEvent:function(t){this.$emit("inputEvent",t)},handleClick:function(t,e){this.$emit("handleClick",t,e)}}},s=l,c=(a("1e51"),a("2877")),o=Object(c["a"])(s,n,i,!1,null,null,null);e["a"]=o.exports},"799d":function(t,e,a){"use strict";var n=a("206c"),i=a.n(n);i.a},"8a5b":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"class-list"},[a("div",{staticClass:"option-modular"},[a("div",{staticClass:"class-option"},[a("div",{staticClass:"drop-down-menu"},[a("span",{staticClass:"c-name"},[t._v(" 年级: ")]),a("el-select",{attrs:{clearable:"",placeholder:"请选择年级",size:"mini"},on:{change:function(e){return t.selGrade(e)}},model:{value:t.obj.grade,callback:function(e){t.$set(t.obj,"grade",e)},expression:"obj.grade"}},t._l(t.gradeData,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),a("div",{staticClass:"drop-down-menu"},[a("span",{staticClass:"c-name"},[t._v(" 班级: ")]),a("el-select",{attrs:{clearable:"",placeholder:"请选择班级",size:"mini"},model:{value:t.obj.class_id,callback:function(e){t.$set(t.obj,"class_id",e)},expression:"obj.class_id"}},t._l(t.classData,(function(t){return a("el-option",{key:t.class_id,attrs:{label:t.class_name,value:t.class_id}})})),1)],1),a("div",{staticClass:"drop-down-menu"},[a("span",{staticClass:"c-name"},[t._v(" 教师: ")]),a("el-select",{attrs:{clearable:"",placeholder:"请选择教师",size:"mini"},model:{value:t.obj.teacher_id,callback:function(e){t.$set(t.obj,"teacher_id",e)},expression:"obj.teacher_id"}},t._l(t.teacherData,(function(t){return a("el-option",{key:t.teacher_id,attrs:{label:t.teacher_name,value:t.teacher_id}})})),1)],1),a("div",{staticClass:"search-block"},[a("el-button",{attrs:{id:"searchBtn",size:"mini"},on:{click:function(e){return t.search()}}},[t._v(" 搜索 ")])],1)]),a("div",{staticClass:"custom"},[a("div",{staticClass:"notice"},[t._v("班级定制:以班级为单位,设置各班级的产品模版")]),a("div",{staticClass:"btn-block"},[a("el-row",[a("el-button",{attrs:{id:"toCustomPage",size:"mini"},on:{click:t.toManage}},[t._v(" 模板管理 ")]),a("el-button",{attrs:{id:"resetDefault",size:"mini"},on:{click:t.toBatchSet}},[t._v("批量设置")])],1)],1)])]),a("set-table",{attrs:{tableData:t.tableData,tableOption:t.tableOption},on:{handleClick:t.handle}}),a("el-pagination",{attrs:{background:"",layout:"pager, total",total:t.total,"page-size":t.pageSize,"current-page":t.currentPage},on:{"current-change":function(e){return t.handleCurrentChange(e)}}}),a("DiaLog",{attrs:{dialogVisble:t.dialogVisble,dialogWidth:t.dialogWidth,handleType:t.handleType,delText:t.delText,dataList:t.templateList,currentId:t.templateId},on:{close:t.handleDiaClose,submit:t.handleSubTemplate,handleClick:t.selTemplate}})],1)},i=[],l=(a("a9e3"),a("34ec")),s=a("2674"),c=a("b063"),o=a("f1ed"),r={name:"ClassList",components:{SetTable:s["a"],DiaLog:l["a"]},filters:{},props:{},data:function(){return{dialogVisble:!1,dialogWidth:"40%",handleType:"",delText:"",templateList:[],gradeData:[{value:1,label:"高一"},{value:2,label:"高二"},{value:3,label:"高三"}],classData:[],teacherData:[],tableData:[],tableOption:[{prop:"grade",label:"年级",formatter:"gradeFilter"},{prop:"class_name",label:"班级"},{prop:"teacher_name",label:"学科老师"},{prop:"template_name",label:"教学宝模板"},{label:"操作",class:"option-block",type:"buttons",button:[{text:"编辑",function:"edit"},{text:"恢复默认",function:"recovery"}]}],total:0,pageSize:15,currentPage:0,obj:{teacher_id:"",grade:"",class_id:"",limit:"",page:1},classId:"",templateId:""}},computed:{},watch:{templateList:{deep:!0,handler:function(t){this.templateId=t[0].template_id}}},created:function(){this.getClassData(),this.getTeacher(),this.getTemplateList()},mounted:function(){},methods:{getClassData:function(){var t=this,e=Object(o["b"])(this.obj);Object(c["d"])(e).then((function(e){t.tableData=e.data.list;var a=Number(e.data.count);t.total=a,t.currentPage=e.data.current_page}))},getGradeClass:function(t){var e=this;Object(c["a"])(t).then((function(t){e.classData=t.result}))},getTeacher:function(){var t=this;Object(c["f"])().then((function(e){t.teacherData=e.data}))},getTemplateList:function(){var t=this;Object(c["k"])().then((function(e){t.templateList=e.data}))},selGrade:function(t){if(this.obj.class_id="",!t)return this.classData=[],!1;var e={grade_id:t},a=Object(o["b"])(e);this.getGradeClass(a)},handleCurrentChange:function(t){this.obj.page=t;var e=Object(o["b"])(this.obj);this.getClassData(e)},search:function(){this.obj.page=1,this.currentPage=1;var t=Object(o["b"])(this.obj);this.getClassData(t)},toManage:function(){this.$router.push({path:"/TeachSet/TemplateManager"})},toBatchSet:function(){this.$router.push({path:"/TeachSet/BatchSetting"})},handle:function(t,e,a){"edit"===t.function?this.edit(e,a):"recovery"===t.function&&this.recovery(e,a)},edit:function(t,e){this.dialogVisble=!0,this.handleType="编辑",this.delText="选择模板",this.classId=e.class_id,this.templateId=e.template_id},recovery:function(t,e){var a=this;this.$confirm("将所选班级的模版恢复为默认模版,确认要恢复默认吗?","信息",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t={class_id:e.class_id},n=Object(o["b"])(t);Object(c["e"])(n).then((function(t){1==t.status?(a.$message({type:"success",message:"操作成功"}),a.getClassData()):a.$message({type:"error",message:t.msg})}))})).catch((function(){a.$message({type:"info",message:"已取消操作"})}))},handleDiaClose:function(){this.dialogVisble=!1},selTemplate:function(t,e){this.templateId=t.template_id},handleSubTemplate:function(){var t=this;this.dialogVisble=!1;var e={class_id:this.classId,template_id:this.templateId},a=Object(o["b"])(e);Object(c["c"])(a).then((function(e){1==e.status?(t.$message({type:"success",message:"操作成功"}),t.getClassData()):t.$message({type:"error",message:e.msg})}))}}},u=r,d=(a("799d"),a("2877")),p=Object(d["a"])(u,n,i,!1,null,null,null);e["default"]=p.exports},b063:function(t,e,a){"use strict";a.d(e,"b",(function(){return l})),a.d(e,"d",(function(){return s})),a.d(e,"k",(function(){return c})),a.d(e,"h",(function(){return o})),a.d(e,"i",(function(){return r})),a.d(e,"g",(function(){return u})),a.d(e,"j",(function(){return d})),a.d(e,"l",(function(){return p})),a.d(e,"a",(function(){return h})),a.d(e,"c",(function(){return f})),a.d(e,"e",(function(){return b})),a.d(e,"f",(function(){return m}));var n=a("1e04"),i="";function l(t){return n["a"].post("productset/getProductEdition".concat(i),t)}function s(t){return n["a"].post("/productset/teachingList".concat(i),t)}function c(t){return n["a"].post("/productset/teachingTemplateList".concat(i),t)}function o(t){return n["a"].post("/productset/teachingTemplateCopy".concat(i),t)}function r(t){return n["a"].post("/productset/teachingTemplateDel".concat(i),t)}function u(t){return n["a"].post("/productset/teachingTemplateChangeName".concat(i),t)}function d(t){return n["a"].post("/productset/teachingTemplateDetail".concat(i),t)}function p(t){return n["a"].post("/productset/teachingTemplateSave".concat(i),t)}function h(t){return n["a"].post("/productset/getClassByGrade".concat(i),t)}function f(t){return n["a"].post("/productset/teachingEdit".concat(i),t)}function b(t){return n["a"].post("/productset/teachingRestoreClass".concat(i),t)}function m(){return n["a"].post("/productset/teachingSearchTeacher".concat(i))}i=""}}]);