(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-25013ec4"],{"0045":function(t,e,n){"use strict";var a=n("fb50"),i=n.n(a);i.a},"0b00":function(t,e,n){},"1d97":function(t,e,n){t.exports=n.p+"img/template-cover.120e30de.png"},"288d":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"template-center"},[n("div",{staticClass:"template-type"},[t._m(0),n("TemplateItem",{attrs:{templateList:t.templateList},on:{copy:t.handleCopyClick,deLeTe:t.handleDelClick,reName:t.handReNameClick,toPath:t.toSet}})],1),n("DiaLog",{attrs:{dialogVisble:t.dialogVisble,dialogWidth:t.dialogWidth,delText:t.delText,handleType:t.handleType,templateName:t.params.template_name},on:{inputEvent:t.changeName,close:t.handleDiaClose,submit:t.handleSubTemplate}})],1)},i=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"template-type-title"},[n("div",[t._v("方法宝模板")])])}],s=(n("99af"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"template-list"},t._l(t.templateList,(function(e,a){return n("div",{key:e.template_id,staticClass:"template-item"},[n("div",{staticClass:"item-block"},[t._m(0,!0),n("div",{staticClass:"text"},[n("p",{staticClass:"template-name-output template-name"},[t._v(" "+t._s(e.template_name)+" ")])])]),n("div",{staticClass:"set-block"},[n("span",{staticClass:"set-text",attrs:{id:"copy"},on:{click:function(n){return t.sendCopy(e)}}},[t._v("复制")]),n("span",{staticClass:"set-text",attrs:{id:"change"},on:{click:function(n){return t.sendReName(e,a)}}},[t._v("改名")]),n("span",{staticClass:"set-text",attrs:{id:"del"},on:{click:function(n){return t.sendDel(e)}}},[t._v("删除")]),n("span",{staticClass:"set-text",attrs:{id:"set"},on:{click:function(n){return t.sendToPath(e)}}},[t._v("设置")])])])})),0)])}),o=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"pic"},[a("img",{attrs:{src:n("1d97"),alt:""}})])}],l={name:"TemplateItem",props:{templateList:{type:Array,default:function(){return[]}}},methods:{sendCopy:function(t,e){this.$emit("copy",t,e)},sendReName:function(t,e,n){this.$emit("reName",t,e,n)},sendDel:function(t,e){this.$emit("deLeTe",t,e)},sendToPath:function(t){this.$emit("toPath",t)}}},c=l,r=(n("0045"),n("2877")),u=Object(r["a"])(c,s,o,!1,null,"12d38357",null),d=u.exports,p=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("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?n("span",[t._v(t._s(t.delText))]):t._e(),"编辑名称"===t.handleType?n("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?n("div",[n("span",{staticClass:"dialog-text"},[t._v(t._s(t.delText))]),n("div",{staticClass:"template-list-block"},[n("ul",t._l(t.dataList,(function(e,a){return n("li",{key:a,class:[e.template_id===t.currentId?"current":""],on:{click:function(n){return t.handleClick(e,a)}}},[t._v(" "+t._s(e.template_name)+" ")])})),0)])]):t._e(),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:t.handleDialogClose}},[t._v("取 消")]),n("el-button",{on:{click:t.handleDiaSub}},[t._v(t._s(t.submitBtnText))])],1)],1)],1)},m=[],h={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)}}},f=h,g=(n("a5d9"),Object(r["a"])(f,p,m,!1,null,null,null)),v=g.exports,_=n("6593"),T=n("7660"),b={name:"TemplateCenter",components:{TemplateItem:d,DiaLog:v},data:function(){return{templateList:[],dialogVisble:!1,dialogWidth:"",delText:"",handleType:"",params:{template_id:"",template_name:""}}},created:function(){this.getTemplate()},mounted:function(){},methods:{getTemplate:function(){var t=this;Object(_["e"])().then((function(e){t.templateList=e.data}))},handleCopyClick:function(t){var e=this,n={id:t.template_id},a=Object(T["c"])(n);Object(_["b"])(a).then((function(t){1===t.status?(e.$message({type:"success",message:"复制成功"}),e.getTemplate()):e.$message({type:"error",message:t.msg})}))},handleDelClick:function(t){var e=this;this.handleType="提示",this.dialogWidth="480px";var n={id:t.template_id},a=Object(T["c"])(n);Object(_["m"])(a).then((function(n){1===n.status?(e.dialogVisble=!0,e.params.template_id=t.template_id,e.delText="确认删除该模版吗?"):-1===n.status?e.$message({type:"error",message:"默认模板不可删除!"}):(e.dialogVisble=!0,e.params.template_id=t.template_id,e.delText="模版使用中,删除模版,则使用该模版的学生将重置为默认模版!")}))},handReNameClick:function(t){this.handleType="编辑名称",this.dialogWidth="320px",this.dialogVisble=!0,this.params.template_name=t.template_name,this.params.template_id=t.template_id},changeName:function(t){this.params.template_name=t},handleSubTemplate:function(t){var e=this;if(this.dialogVisble=!1,"编辑名称"===t){var n={id:this.params.template_id,name:this.params.template_name},a=Object(T["c"])(n);Object(_["o"])(a).then((function(t){1==t.status?(e.$message({type:"success",message:"操作成功"}),e.getTemplate()):e.$message({type:"error",message:t.msg})}))}else{var i={id:this.params.template_id},s=Object(T["c"])(i);Object(_["n"])(s).then((function(t){1===t.status?(e.$message({type:"success",message:"删除成功"}),e.getTemplate()):e.$message({type:"error",message:t.msg})}))}},handleDiaClose:function(){this.dialogVisble=!1},toSet:function(t){var e=1==t.target_type?"class":"student";this.$router.push({path:"TemplateSet?type=".concat(e,"&target_type=").concat(t.target_type,"&id=").concat(t.template_id)})}}},y=b,C=(n("bc33"),Object(r["a"])(y,a,i,!1,null,"0f1e9236",null));e["default"]=C.exports},"391d":function(t,e,n){},6593:function(t,e,n){"use strict";n.d(e,"e",(function(){return s})),n.d(e,"b",(function(){return o})),n.d(e,"o",(function(){return l})),n.d(e,"m",(function(){return c})),n.d(e,"n",(function(){return r})),n.d(e,"d",(function(){return u})),n.d(e,"l",(function(){return d})),n.d(e,"a",(function(){return p})),n.d(e,"f",(function(){return m})),n.d(e,"h",(function(){return h})),n.d(e,"j",(function(){return f})),n.d(e,"g",(function(){return g})),n.d(e,"i",(function(){return v})),n.d(e,"c",(function(){return _})),n.d(e,"k",(function(){return T}));var a=n("1e04"),i="";function s(t){return a["a"].post("/productMethod/getTemplateByType".concat(i),t)}i="";var o=function(t){return a["a"].post("/productMethod/copyTemplate".concat(i),t)},l=function(t){return a["a"].post("/productMethod/reNameTemplate".concat(i),t)},c=function(t){return a["a"].post("/productMethod/beforeDelTemplate".concat(i),t)},r=function(t){return a["a"].post("/productMethod/delTemplate".concat(i),t)},u=function(t){return a["a"].post("/productMethod/ajaxGetTemplateById".concat(i),t)},d=function(t){return a["a"].post("/productMethod/saveTemplate".concat(i),t)};function p(t){return a["a"].post("/productMethod/getClassByGrade".concat(i),t)}function m(t){return a["a"].post("/productMethod/productClassSet".concat(i),t)}function h(t){return a["a"].post("/productMethod/resetClassSet".concat(i),t)}var f=function(t){return a["a"].post("/productMethod/saveClassSet".concat(i),t)};function g(t){return a["a"].post("/productMethod/productStudentSet".concat(i),t)}function v(t){return a["a"].post("/productMethod/resetStudentSet".concat(i),t)}var _=function(t){return a["a"].post("/studentinfo/getStudent".concat(i),t)},T=function(t){return a["a"].post("/productMethod/saveStudentSet".concat(i),t)}},a5d9:function(t,e,n){"use strict";var a=n("0b00"),i=n.n(a);i.a},bc33:function(t,e,n){"use strict";var a=n("391d"),i=n.n(a);i.a},fb50:function(t,e,n){}}]);