(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b80e76a6"],{"0a98":function(t,e,a){},"0e88":function(t,e,a){},"1e51":function(t,e,a){"use strict";var n=a("0a98"),i=a.n(n);i.a},"30cd":function(t,e,a){},"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=[],s={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)}}},l=s,c=(a("1e51"),a("2877")),o=Object(c["a"])(l,n,i,!1,null,null,null);e["a"]=o.exports},4491:function(t,e,a){"use strict";var n=a("0e88"),i=a.n(n);i.a},"8ac6":function(t,e,a){t.exports=a.p+"img/pic_teaching.a063a967.png"},b063:function(t,e,a){"use strict";a.d(e,"b",(function(){return i})),a.d(e,"d",(function(){return s})),a.d(e,"k",(function(){return l})),a.d(e,"h",(function(){return c})),a.d(e,"i",(function(){return o})),a.d(e,"g",(function(){return r})),a.d(e,"j",(function(){return u})),a.d(e,"l",(function(){return d})),a.d(e,"a",(function(){return p})),a.d(e,"c",(function(){return m})),a.d(e,"e",(function(){return h})),a.d(e,"f",(function(){return f}));var n=a("c1fb");function i(t){return n["a"].post("productset/getProductEdition",t)}function s(t){return n["a"].post("/productset/teachingList",t)}function l(t){return n["a"].post("/productset/teachingTemplateList",t)}function c(t){return n["a"].post("/productset/teachingTemplateCopy",t)}function o(t){return n["a"].post("/productset/teachingTemplateDel",t)}function r(t){return n["a"].post("/productset/teachingTemplateChangeName",t)}function u(t){return n["a"].post("/productset/teachingTemplateDetail",t)}function d(t){return n["a"].post("/productset/teachingTemplateSave",t)}function p(t){return n["a"].post("/productset/getClassByGrade",t)}function m(t){return n["a"].post("/productset/teachingEdit",t)}function h(t){return n["a"].post("/productset/teachingRestoreClass",t)}function f(){return n["a"].post("/productset/teachingSearchTeacher")}},be5a: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:"template-manager"},[a("div",{staticClass:"template-manager-header"},[a("h2",[t._v("教学宝模板")]),a("el-button",{attrs:{id:"back",size:"mini"},on:{click:t.back}},[t._v(" 返回 ")])],1),a("div",{staticClass:"template-type"},[a("TemplateItem",{attrs:{templateList:t.templateList},on:{copy:t.handleCopyClick,deLeTe:t.handleDelClick,reName:t.handReNameClick,toPath:t.toSet}})],1),a("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=[],s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"template-content"},[a("div",{staticClass:"template-list"},t._l(t.templateList,(function(e,n){return a("div",{key:e.template_id,staticClass:"template-item"},[a("div",{staticClass:"item-block"},[t._m(0,!0),a("div",{staticClass:"text"},[a("p",{staticClass:"template-name-output template-name"},[t._v(" "+t._s(e.template_name)+" ")])])]),a("div",{staticClass:"set-block"},[a("span",{staticClass:"set-text",attrs:{id:"copy"},on:{click:function(a){return t.sendCopy(e)}}},[t._v("复制")]),a("span",{staticClass:"set-text",attrs:{id:"change"},on:{click:function(a){return t.sendReName(e,n)}}},[t._v("改名")]),a("span",{staticClass:"set-text",attrs:{id:"del"},on:{click:function(a){return t.sendDel(e)}}},[t._v("删除")]),a("span",{staticClass:"set-text",attrs:{id:"set"},on:{click:function(a){return t.sendToPath(e)}}},[t._v("设置")])])])})),0)])])},l=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"pic"},[n("img",{attrs:{src:a("8ac6"),alt:""}})])}],c={name:"TemplateItem",props:{templateList:{type:Array,default:function(){return[]}}},methods:{sendCopy:function(t,e){this.$emit("copy",t,e)},sendReName:function(t,e,a){this.$emit("reName",t,e,a)},sendDel:function(t,e){this.$emit("deLeTe",t,e)},sendToPath:function(t){this.$emit("toPath",t)}}},o=c,r=(a("c3ba"),a("2877")),u=Object(r["a"])(o,s,l,!1,null,"72f3cbb1",null),d=u.exports,p=a("34ec"),m=a("b063"),h=a("f1ed"),f={name:"TemplateManager",components:{TemplateItem:d,DiaLog:p["a"]},data:function(){return{templateList:[],dialogVisble:!1,dialogWidth:"",delText:"",handleType:"",params:{template_id:"",template_name:""}}},created:function(){this.getTemplate()},mounted:function(){},methods:{back:function(){this.$router.go(-1)},getTemplate:function(){var t=this;Object(m["k"])().then((function(e){t.templateList=e.data}))},handleCopyClick:function(t){var e=this;if(this.templateList.length>11)return this.$message({type:"error",message:"模板数量已达上限"}),!1;var a={template_id:t.template_id},n=Object(h["b"])(a);Object(m["h"])(n).then((function(t){1===t.status?(e.$message({type:"success",message:"复制成功"}),e.getTemplate()):e.$message({type:"error",message:t.msg})}))},handleDelClick:function(t){this.handleType="提示",this.dialogWidth="30%",1==t.is_default?this.$message({type:"error",message:"默认模板不可删除!"}):(this.dialogVisble=!0,this.params.template_id=t.template_id,this.delText="确认删除该模版吗?",this.delStatus=t.is_default)},handReNameClick:function(t){this.handleType="编辑名称",this.dialogWidth="20%",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 a={template_id:this.params.template_id,template_name:this.params.template_name},n=Object(h["b"])(a);Object(m["g"])(n).then((function(t){1==t.status?(e.$message({type:"success",message:"操作成功"}),e.getTemplate()):e.$message({type:"error",message:t.msg})}))}else{var i={template_id:this.params.template_id},s=Object(h["b"])(i);Object(m["i"])(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){this.$router.push({path:"/TeachSet/TypeSetting?template_id=".concat(t.template_id)})}}},g=f,b=(a("4491"),Object(r["a"])(g,n,i,!1,null,"e6ef77d4",null));e["default"]=b.exports},c3ba:function(t,e,a){"use strict";var n=a("30cd"),i=a.n(n);i.a}}]);