(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5e160274"],{"31c2":function(t,e,n){"use strict";var o=n("f564"),r=n.n(o);r.a},"885b":function(t,e,n){"use strict";n.d(e,"d",(function(){return a})),n.d(e,"a",(function(){return i})),n.d(e,"c",(function(){return c})),n.d(e,"b",(function(){return u}));var o=n("b775"),r=n("d722");function a(t){return Object(o["a"])({url:r["a"].helpCategoryList,method:"get",params:t})}function i(t){return Object(o["a"])({url:r["a"].helpCategoryAdd,method:"post",data:t})}function c(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"post";return"post"==e?Object(o["a"])({url:r["a"].helpCategoryEdit,method:e,data:t}):Object(o["a"])({url:r["a"].helpCategoryEdit,method:e,params:t})}function u(t){return Object(o["a"])({url:r["a"].helpCategoryDelete,method:"post",data:t})}},f564:function(t,e,n){},fc99:function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container"},[n("el-card",{staticClass:"box-card"},[n("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[n("span",[t._v("编辑分类")]),n("el-button",{staticStyle:{float:"right",padding:"0","margin-left":"14px"},attrs:{type:"text"},on:{click:function(e){return t.goto("/content/help/category")}}},[t._v(" 返回 ")]),n("el-button",{staticStyle:{float:"right",padding:"0"},attrs:{type:"text"},on:{click:function(e){return t.onSubmit("form")}}},[t._v(" 保存 ")])],1),n("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.infoLoading,expression:"infoLoading"}],ref:"form",staticClass:"common-form",attrs:{model:t.form,"label-width":"80px",rules:t.rules,"inline-message":!0}},[n("el-form-item",{attrs:{label:"分类名称",prop:"name"}},[n("el-input",{model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),n("el-form-item",{attrs:{label:""}},[n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.onSubmit("form")}}},[t._v("保存")]),n("el-button",{on:{click:function(e){return t.goto("/content/help/category")}}},[t._v("返回")])],1)],1)],1)],1)},r=[],a=n("5530"),i=n("885b"),c={data:function(){return{infoLoading:!0,form:{name:""},rules:{name:[{required:!0,message:"请输入分类名称",trigger:"blur"},{max:10,message:"长度在 1 到 10 个字符",trigger:"blur"}]}}},mounted:function(){},created:function(){this.fetchInfo()},methods:{fetchInfo:function(){var t=this;this.infoLoading=!0;var e={id:this.$route.query.id};Object(i["c"])(e,"get").then((function(e){t.form=Object(a["a"])({},e.data.info),t.infoLoading=!1})).catch((function(){}))},onSubmit:function(t){var e=this,n=this,o=Object(a["a"])({},this.form);this.$refs[t].validate((function(t){if(!t)return!1;Object(i["c"])(o).then((function(t){return e.$message.success(t.message),setTimeout((function(){n.$router.push("/content/help/category")}),1500),!0})).catch((function(){}))}))},goto:function(t){this.$router.push(t)}}},u=c,s=(n("31c2"),n("2877")),f=Object(s["a"])(u,o,r,!1,null,"2f40f471",null);e["default"]=f.exports}}]);