(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-3f434836"],{3879:function(t,e,r){"use strict";r.d(e,"a",(function(){return a})),r.d(e,"d",(function(){return o})),r.d(e,"c",(function(){return i})),r.d(e,"e",(function(){return n})),r.d(e,"b",(function(){return p})),r.d(e,"h",(function(){return c})),r.d(e,"g",(function(){return l})),r.d(e,"i",(function(){return d})),r.d(e,"f",(function(){return m}));var s=r("6b2d");const a=t=>s.a.post("/report.reportCategory/add",t),o=t=>s.a.get("/report.reportCategory/list",{params:t}),i=t=>s.a.get("/report.reportCategory/detail",{params:t}),n=t=>s.a.post("/report.reportCategory/update",t),p=t=>s.a.get("/report.reportCategory/del",{params:t}),c=t=>s.a.get("/report.report/list",{params:t}),l=t=>s.a.get("/report.report/detail",{params:t}),d=t=>s.a.post("/report.report/update",t),m=t=>s.a.get("/report.report/del",{params:t})},"68b8":function(t,e,r){"use strict";r.r(e);var s=r("3879"),a=r("b3ad"),o=(r("b6c4"),{data:()=>({form:{name:"",status:1,type:""},options:[],pid:"",type:"",types:[{type:"article",name:"文章"},{type:"circle",name:"圈子"},{type:"group",name:"群聊"},{type:"user",name:"用户"},{type:"shop",name:"自营商城"},{type:"twoshop",name:"闲置商城"}]}),components:{MaterialSelect:a.a},methods:{setType(t){this.form.type=t},submitForm(t){this.form.pid=this.pid,this.form.type=this.type,this.$refs[t].validate(t=>{if(!t)return!1;this.editCategory()})},addCategory(){this.form.pid=this.pid,Object(s.a)(this.form).then(t=>{1==t.code?(this.$message.success("新增成功!"),setTimeout(()=>this.$router.go(-1),500)):this.$message.error(t.msg)})},editCategory(){Object(s.e)(this.form).then(t=>{1==t.code?(this.$message.success("编辑成功!"),setTimeout(()=>this.$router.go(-1),500)):this.$message.error(t.msg)})},listAllCategory(){Object(s.d)().then(t=>{for(var e=[{description:"",id:0,pid:0,name:"无",status:1}],r=0;r<t.data.length;r++)0==t.data[r].pid&&e.push(t.data[r]);this.options=e})},getCategoryDetail(){Object(s.c)({id:this.form.id}).then(t=>{this.form=t.data,this.pid=this.form.pid,this.type=this.form.type})}},mounted(){this.listAllCategory(),this.getCategoryDetail()},created(){const t=this.$route.query;this.form.id=t.id}}),i=r("2877"),n=Object(i.a)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",{staticClass:"ls-card"},[r("el-page-header",{attrs:{content:"编辑举报分类"},on:{back:function(e){return t.$router.go(-1)}}})],1),r("div",{staticClass:"ls-card m-t-16"},[r("div",{staticClass:"card-title"},[t._v("编辑举报分类")]),r("div",{staticClass:"card-content m-t-24"},[r("el-form",{ref:"form",attrs:{model:t.form,"label-width":"80px"}},[r("el-form-item",{attrs:{required:"",prop:"name",label:"分类名称"}},[r("el-input",{model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),r("el-form-item",{attrs:{prop:"description",label:"分类描述"}},[r("el-input",{staticStyle:{width:"280px"},attrs:{type:"textarea",rows:"5"},model:{value:t.form.description,callback:function(e){t.$set(t.form,"description",e)},expression:"form.description"}})],1),r("el-form-item",{attrs:{prop:"pid",label:"父级ID"}},[r("el-select",{attrs:{placeholder:"请选择"},model:{value:t.pid,callback:function(e){t.pid=e},expression:"pid"}},t._l(t.options,(function(t){return r("el-option",{key:t.id,attrs:{value:t.id,label:t.name}})})),1)],1),r("el-form-item",{attrs:{required:"",prop:"type",label:"举报位置"}},[r("el-select",{attrs:{placeholder:"请选择"},on:{change:t.setType},model:{value:t.type,callback:function(e){t.type=e},expression:"type"}},t._l(t.types,(function(t){return r("el-option",{key:t.type,attrs:{value:t.type,label:t.name}})})),1)],1),r("el-form-item",{attrs:{prop:"status",label:"状态"}},[r("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:t.form.status,callback:function(e){t.$set(t.form,"status",e)},expression:"form.status"}})],1)],1)],1)]),r("div",{staticClass:"bg-white ls-fixed-footer"},[r("div",{staticClass:"row-center flex",staticStyle:{height:"100%"}},[r("el-button",{attrs:{size:"small"},on:{click:function(e){return t.$router.go(-1)}}},[t._v("取消")]),r("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.submitForm("form")}}},[t._v("编辑")])],1)])])}),[],!1,null,null,null);e.default=n.exports},"6b2d":function(t,e,r){"use strict";var s=r("0613"),a=r("bc3a"),o=r.n(a),i=r("d70b"),n=r("afbc"),p=r("5c96"),c=r("6ddb");const l={baseURL:i.a.baseURL+"/adminapi",headers:{"content-type":"application/json"}},d=(Object(c.g)(()=>(s.a.commit("setToken",""),s.a.commit("setUserInfo",{}),s.a.commit("setPermission",{}),n.b.push("/account/login"),Promise.reject())),o.a.create(l));d.interceptors.request.use(t=>{const e=s.a.getters.token;return e&&(t.headers.token=e),t.headers.version=i.a.version,t},t=>Promise.reject(t)),d.interceptors.response.use(t=>t.data,t=>(Object(p.Message)({type:"error",message:"系统错误，请稍候再试"}),Promise.reject(t))),e.a=d}}]);