(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-7565777e"],{"301f":function(t,e,r){"use strict";r.r(e);var a=r("3879"),n={data:()=>({table:{currentPage:1,pageSizes:[10],total:0,data:null},type:"article",types:[{type:"article",name:"文章"},{type:"circle",name:"圈子"},{type:"group",name:"群聊"},{type:"user",name:"用户"},{type:"shop",name:"自营商城"},{type:"twoshop",name:"闲置商城"}]}),methods:{doSwitchChange(t,e){Object(a.e)({id:e,status:t}).then(t=>{1==t.code?(this.$message.success("更新成功!"),this.getData(10,this.table.currentPage)):this.$message.error(t.msg)})},typeChange(t){this.type=t,this.getData(10,this.table.currentPage)},jumpEdit(t){this.$router.push({path:"/report/reportCategoryEdit",query:{id:t}})},handleSizeChange(t){},handleCurrentChange(t){this.table.currentPage=t},getData(t,e){Object(a.d)({type:this.type}).then(t=>{this.table.currentPage=e,this.table.total=t.data.length,this.table.data=t.data})},del(t){this.$confirm("此操作将永久删除该类型, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Object(a.b)({id:t}).then(t=>{1==t.code?(this.$message.success("删除成功!"),this.getData(10,this.table.currentPage)):this.$message.error(t.msg)})}).catch(()=>{})},jumpReportType(){this.$router.push({path:"/report/reportCategoryAdd",query:{type:this.type}})}},mounted(){this.getData(10,1)}},o=r("2877"),s=Object(o.a)(n,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",{staticClass:"ls-card m-b-12"},[r("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.jumpReportType}},[t._v("新建举报分类")]),r("span",{staticStyle:{"margin-left":"10px"}},[t._v("位置:")]),r("el-select",{staticStyle:{"margin-left":"12px"},attrs:{size:"mini",placeholder:"过滤"},on:{change:t.typeChange},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-table",{staticStyle:{width:"100%"},attrs:{data:null==t.table.data?[]:t.table.data,"fixed-columns-roll":"","tree-props":{children:"sub"},"use-virtual":"","row-key":"id"}},[r("el-table-column",{attrs:{prop:"id",label:"ID",width:"80"}}),r("el-table-column",{attrs:{"tree-node":!0,prop:"name",label:"分类名称",width:"220"}}),r("el-table-column",{attrs:{label:"状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-switch",{attrs:{"active-value":1,"inactive-value":0},on:{change:function(r){return t.doSwitchChange(r,e.row.id)}},model:{value:e.row.status,callback:function(r){t.$set(e.row,"status",r)},expression:"scope.row.status"}})]}}])}),r("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-button",{attrs:{type:"text"},on:{click:function(r){return t.jumpEdit(e.row.id)}}},[t._v("编辑")]),r("el-button",{staticStyle:{color:"red"},attrs:{type:"text"},on:{click:function(r){return t.del(e.row.id)}}},[t._v("删除")])]}}])})],1)],1)}),[],!1,null,null,null);e.default=s.exports},3879:function(t,e,r){"use strict";r.d(e,"a",(function(){return n})),r.d(e,"d",(function(){return o})),r.d(e,"c",(function(){return s})),r.d(e,"e",(function(){return l})),r.d(e,"b",(function(){return i})),r.d(e,"h",(function(){return p})),r.d(e,"g",(function(){return u})),r.d(e,"i",(function(){return c})),r.d(e,"f",(function(){return d}));var a=r("6b2d");const n=t=>a.a.post("/report.reportCategory/add",t),o=t=>a.a.get("/report.reportCategory/list",{params:t}),s=t=>a.a.get("/report.reportCategory/detail",{params:t}),l=t=>a.a.post("/report.reportCategory/update",t),i=t=>a.a.get("/report.reportCategory/del",{params:t}),p=t=>a.a.get("/report.report/list",{params:t}),u=t=>a.a.get("/report.report/detail",{params:t}),c=t=>a.a.post("/report.report/update",t),d=t=>a.a.get("/report.report/del",{params:t})}}]);