(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6e48b9d8"],{6593:function(t,e,a){"use strict";a.d(e,"e",(function(){return o})),a.d(e,"b",(function(){return s})),a.d(e,"o",(function(){return r})),a.d(e,"m",(function(){return l})),a.d(e,"n",(function(){return c})),a.d(e,"d",(function(){return u})),a.d(e,"l",(function(){return i})),a.d(e,"a",(function(){return d})),a.d(e,"f",(function(){return p})),a.d(e,"h",(function(){return f})),a.d(e,"j",(function(){return b})),a.d(e,"g",(function(){return h})),a.d(e,"i",(function(){return m})),a.d(e,"c",(function(){return v})),a.d(e,"k",(function(){return g}));var n=a("c1fb");function o(t){return n["a"].post("/productMethod/getTemplateByType",t)}var s=function(t){return n["a"].post("/productMethod/copyTemplate",t)},r=function(t){return n["a"].post("/productMethod/reNameTemplate",t)},l=function(t){return n["a"].post("/productMethod/beforeDelTemplate",t)},c=function(t){return n["a"].post("/productMethod/delTemplate",t)},u=function(t){return n["a"].post("/productMethod/ajaxGetTemplateById",t)},i=function(t){return n["a"].post("/productMethod/saveTemplate",t)};function d(t){return n["a"].post("/productMethod/getClassByGrade",t)}function p(t){return n["a"].post("/productMethod/productClassSet",t)}function f(t){return n["a"].post("/productMethod/resetClassSet",t)}var b=function(t){return n["a"].post("/productMethod/saveClassSet",t)};function h(t){return n["a"].post("/productMethod/productStudentSet",t)}function m(t){return n["a"].post("/productMethod/resetStudentSet",t)}var v=function(t){return n["a"].post("/studentinfo/getStudent",t)},g=function(t){return n["a"].post("/productMethod/saveStudentSet",t)}},"95e4":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-setting"},[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_id,callback:function(e){t.$set(t.obj,"grade_id",e)},expression:"obj.grade_id"}},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:"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.toCustom}},[t._v(" 班级定制 ")]),a("el-button",{attrs:{id:"resetDefault",size:"mini"},on:{click:t.recovery}},[t._v("恢复默认")])],1)],1)])]),a("set-table",{attrs:{tableData:t.tableData,tableOption:t.tableOption}}),a("el-pagination",{attrs:{background:"",layout:"pager, total",total:t.total},on:{"current-change":function(e){return t.handleCurrentChange(e)}}})],1)},o=[],s=(a("a9e3"),a("b64b"),a("dcdc2")),r=a("6593"),l=a("7660"),c={name:"ClassSetting",components:{SetTable:s["a"]},filters:{},props:{},data:function(){return{gradeData:[{value:1,label:"高一"},{value:2,label:"高二"},{value:3,label:"高三"}],classData:[],tableData:[],tableOption:[{prop:"grade",label:"年级",formatter:"gradeFilter"},{prop:"class_name",label:"班级"},{prop:"level",label:"班级层次",formatter:"levelFilter"},{prop:"template_name",label:"方法宝模板"}],total:0,obj:{page:1,class_id:"",grade_id:""}}},computed:{},watch:{},created:function(){this.getClassData(),this.getGradeClass()},mounted:function(){},methods:{getClassData:function(){var t=this,e=Object(l["c"])(this.obj);Object(r["f"])(e).then((function(e){t.tableData=e.data.list;var a=0;a=Object.keys(e.data.pages).length?Number(e.data.pages.total):e.data.list.length,t.total=a}))},getGradeClass:function(t){var e=this;Object(r["a"])(t).then((function(t){e.classData=t.result}))},selGrade:function(t){this.obj.class_id="";var e={grade_id:t},a=Object(l["c"])(e);this.getGradeClass(a)},handleCurrentChange:function(t){this.obj.page=t;var e=Object(l["c"])(this.obj);this.getClassData(e)},search:function(){this.obj.page=1;var t=Object(l["c"])(this.obj);this.getClassData(t)},toCustom:function(){this.$router.push({path:"ClassCustom"})},recovery:function(){var t=this;this.$confirm("将所有班级的模版全部恢复为默认模版,确认要恢复默认吗?","信息",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(r["h"])().then((function(e){1==e.status?(t.$message({type:"success",message:e.msg}),t.getClassData()):t.$message({type:"error",message:e.msg})}))})).catch((function(){t.$message({type:"info",message:"已取消操作"})}))}}},u=c,i=(a("fb65"),a("2877")),d=Object(i["a"])(u,n,o,!1,null,"05577b7c",null);e["default"]=d.exports},be81:function(t,e,a){},dcdc2: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(a){return[t._v(" "+t._s(t._f("dataFormat")(a.row[e.prop],e.formatter))+" ")]}}],null,!0)}),"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(n){return[a("div",{class:e.class},t._l(e.button,(function(e,o){return a("el-button",{key:o,on:{click:function(a){return t.handle(e,n.$index,n.row)}}},[t._v(t._s(e.text))])})),1)]}}],null,!0)}):t._e()]}))],2)],1)},o=[],s={name:"SetTable",props:{tableData:{type:Array},tableOption:{type:Array}},data:function(){return{}},computed:{},watch:{},created:function(){},mounted:function(){},methods:{handle:function(t,e,a){this.$emit("handle",t,e,a)}},filters:{}},r=s,l=a("2877"),c=Object(l["a"])(r,n,o,!1,null,null,null);e["a"]=c.exports},fb65:function(t,e,a){"use strict";var n=a("be81"),o=a.n(n);o.a}}]);