(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-770c0275"],{c449a:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[e._m(0),r("ApplyTemplateForm",{attrs:{form:e.form,loading:e.loading},on:{"update:form":function(t){e.form=t},submit:e.handleSubmit}})],1)},a=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container--hd pb20"},[r("h3",[e._v("编辑报名模板")])])}],i=(r("8e6e"),r("2397"),r("a481"),r("ade3")),c=(r("456d"),r("ac6a"),r("96cf"),r("1da1")),o=r("d4ec"),s=r("bee2"),u=r("99de"),p=r("7e84"),l=r("262e"),f=r("9ab4"),m=r("60a3"),d=r("4159"),b=r("5149");function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){Object(i["a"])(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _(e,t,r){return t=Object(p["a"])(t),Object(u["a"])(e,y()?Reflect.construct(t,r||[],Object(p["a"])(e).constructor):t.apply(e,r))}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}var g=function(e){function t(){var e;return Object(o["a"])(this,t),e=_(this,t,arguments),e.loading=!1,e.form={template_name:"",template_des:"",template_info:[]},e}return Object(l["a"])(t,e),Object(s["a"])(t,[{key:"template_id",get:function(){return this.$route.query.template_id}},{key:"getClassRegistrationTemplate",value:function(){var e=Object(c["a"])(regeneratorRuntime.mark((function e(){var t,r,n=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.template_id){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,Object(b["z"])({template_id:this.template_id});case 4:t=e.sent,r=t.data,Object.keys(this.form).forEach((function(e){n.form[e]=r[e]}));case 7:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"handleSubmit",value:function(){var e=Object(c["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,this.loading=!0,t=this.form.template_info.map((function(e){return{field_id:e.field_id,field_code:e.field_code,is_backstage_required:e.is_backstage_required,is_wechat_required:e.is_wechat_required}})),e.next=5,Object(b["D"])(O(O({},this.form),{},{template_info:JSON.stringify(t),template_id:this.template_id}));case 5:this.$message({message:"编辑成功",type:"success"}),this.$router.replace({name:"CourseManage",query:{type:"4"}});case 7:return e.prev=7,this.loading=!1,e.finish(7);case 10:case"end":return e.stop()}}),e,this,[[0,,7,10]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"mounted",value:function(){this.getClassRegistrationTemplate()}}]),t}(m["i"]);g=Object(f["a"])([Object(m["a"])({components:{ApplyTemplateForm:d["default"]}})],g);var j=g,v=j,w=r("2877"),k=Object(w["a"])(v,n,a,!1,null,"78be76da",null);t["default"]=k.exports}}]);