(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d225d7b"],{e5b7:function(t,e,o){"use strict";o.r(e);var r=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"app-container"},[o("div",{staticClass:"app-form"},[o("el-form",{ref:"dataForm",attrs:{rules:t.rules,model:t.form,"label-position":"right","label-width":"200px"}},[o("div",{staticClass:"app-form-group"},[o("div",{staticClass:"app-form-ti"},[t._v("基本设置")]),o("div",{staticClass:"padding-top-lg"},[o("el-form-item",{attrs:{label:"分类名称",prop:"title"}},[o("el-input",{staticClass:"form-input",model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}})],1),o("el-form-item",{attrs:{label:"排序",prop:"sort"}},[o("el-input",{staticClass:"form-input",model:{value:t.form.sort,callback:function(e){t.$set(t.form,"sort",t._n(e))},expression:"form.sort"}})],1),o("el-form-item",{attrs:{label:"类型",prop:"type"}},[o("el-radio-group",{model:{value:t.form.type,callback:function(e){t.$set(t.form,"type",e)},expression:"form.type"}},[o("el-radio",{attrs:{label:1}},[t._v("文章")]),o("el-radio",{attrs:{label:2}},[t._v("视频")])],1)],1),o("el-form-item",{attrs:{label:"状态",prop:"status"}},[o("el-radio-group",{model:{value:t.form.status,callback:function(e){t.$set(t.form,"status",e)},expression:"form.status"}},[o("el-radio",{attrs:{label:1}},[t._v("正常")]),o("el-radio",{attrs:{label:0}},[t._v("禁用")])],1)],1)],1)]),o("div",{staticClass:"padding-xl flex justify-center"},[o("el-button",{on:{click:t.onBack}},[t._v("返回")]),o("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submit()}}},[t._v("提交")])],1)])],1),o("copyright")],1)},s=[],a=o("7f70"),i=o("8327"),l={name:"CategoryPost",components:{},data:function(){return{rules:{name:[{required:!0,message:"请输入分类名称",trigger:"blur"}]},form:{},id:""}},computed:Object(a["a"])({},Object(i["b"])(["config"])),created:function(){this.$route.query.id&&(this.id=this.$route.query.id),this.resetForm(),this.init()},methods:{init:function(){var t=this;this.api.get("news/category/detail",{id:this.id}).then((function(e){1==e.code&&(t.form=e.data)}))},onBack:function(){this.$router.go(-1)},submit:function(){var t=this;this.$refs["dataForm"].validate((function(e){e&&t.api.post("news/category/post",t.form).then((function(e){1==e.code?(t.$util.success(e.message),t.resetForm(),t.onBack()):t.$util.error(e.message)}))}))},resetForm:function(){this.form={title:"",status:1,type:1,sort:""}}}},n=l,c=o("3d7a"),u=Object(c["a"])(n,r,s,!1,null,null,null);e["default"]=u.exports}}]);