(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d848c108"],{"35a9":function(t,e,n){"use strict";n("699d")},"4b49":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"divBox relative"},[n("el-card",{staticClass:"box-card"},[n("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[n("div",{staticClass:"container mt-1"},[n("el-form",{attrs:{inline:!0}},[n("el-form-item",{staticClass:"mr10",attrs:{label:"分类名称:"}},[n("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入分类名称",size:"small",clearable:""},model:{value:t.name,callback:function(e){t.name="string"===typeof e?e.trim():e},expression:"name"}},[n("el-button",{attrs:{slot:"append",icon:"el-icon-search",size:"small"},on:{click:function(e){return t.getList(1)}},slot:"append"})],1)],1),t._v(" "),n("el-form-item",{staticClass:"mr10",attrs:{label:"显示状态:"}},[n("el-select",{staticClass:"selWidth",attrs:{placeholder:"请选择显示状态",size:"small",clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.isShow,callback:function(e){t.$set(t.tableFrom,"isShow",e)},expression:"tableFrom.isShow"}},[n("el-option",{attrs:{label:"显示",value:"1"}}),t._v(" "),n("el-option",{attrs:{label:"隐藏",value:"0"}})],1)],1),t._v(" "),n("div",{staticClass:"acea-row"},[n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["platform:community:category:add"],expression:"['platform:community:category:add']"}],staticClass:"mr20",attrs:{type:"primary",size:"small"},on:{click:function(e){return t.handlerOpenEdit(0)}}},[t._v("添加社区分类")])],1)],1)],1)]),t._v(" "),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"mini","highlight-current-row":!0,"header-cell-style":{fontWeight:"bold"}}},[n("el-table-column",{attrs:{prop:"id",label:"ID","min-width":"50"}}),t._v(" "),n("el-table-column",{attrs:{label:"分类名称",prop:"name","min-width":"100","show-overflow-tooltip":!0}}),t._v(" "),n("el-table-column",{attrs:{prop:"sort",label:"排序","min-width":"100",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{label:"添加时间","min-width":"120",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.createTime))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"是否开启",fixed:"right","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.checkPermi(["platform:community:category:show:switch"])?n("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"开启","inactive-text":"关闭"},nativeOn:{click:function(n){return t.onchangeIsShow(e.row)}},model:{value:e.row.isShow,callback:function(n){t.$set(e.row,"isShow",n)},expression:"scope.row.isShow"}}):n("div",[t._v(t._s(e.row.isShow?"开启":"关闭"))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"操作","min-width":"130",fixed:"right",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["platform:community:category:update"],expression:"['platform:community:category:update']"}],attrs:{size:"small",type:"text"},on:{click:function(n){return t.handlerOpenEdit(1,e.row)}}},[t._v("编辑")]),t._v(" "),n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["platform:community:category:delete"],expression:"['platform:community:category:delete']"}],attrs:{size:"small",type:"text"},on:{click:function(n){return t.handlerOpenDel(e.row)}}},[t._v("删除")])]}}])})],1),t._v(" "),n("div",{staticClass:"block"},[n("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)],1)},o=[],i=n("7998"),r=n("e350"),c={data:function(){return{tableFrom:{page:1,limit:20,name:"",isShow:""},name:"",tableData:{data:[],total:0},listLoading:!1,keyNum:0,id:0}},mounted:function(){Object(r["a"])(["platform:community:category:page:list"])&&this.getList()},methods:{checkPermi:r["a"],onchangeIsShow:function(t){var e=this;i["e"](t.id).then((function(t){e.$message.success("操作成功"),e.getList()}))},getList:function(t){var e=this;this.tableFrom.page=t||this.tableFrom.page,this.tableFrom.name=encodeURIComponent(this.name),this.listLoading=!0,i["d"](this.tableFrom).then((function(t){e.tableData.data=t.list,e.tableData.total=t.total,e.listLoading=!1})).catch((function(t){e.listLoading=!1}))},pageChange:function(t){this.tableFrom.page=t,this.getList()},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList(1)},handlerOpenEdit:function(t,e){var n=this;this.id=e?e.id:0,this.$modalParserFrom(0===t?"新建分类":"编辑分类","communityClassification",t,0===t?{id:0,name:"",handlingFee:""}:Object.assign({},e),(function(t){n.submit(t),n.resetForm(t)}),this.keyNum+=1)},submit:function(t){var e=this,n={id:this.id,name:t.name,isShow:t.isShow,sort:t.sort};this.id?i["f"](n).then((function(t){e.$message.success("操作成功"),e.$msgbox.close(),e.getList()})).catch((function(){e.loading=!1})):i["b"](n).then((function(t){e.$message.success("操作成功"),e.$msgbox.close(),e.getList()})).catch((function(){e.loading=!1}))},handlerOpenDel:function(t){var e=this;this.$modalSure("删除当前分类吗?删除之后,移动端页面分类筛选不展示此分类,移动端再次发表图文时,也不能够选择此分类。").then((function(){i["c"](t.id).then((function(t){e.$message.success("删除分类成功"),1===e.tableData.data.length&&e.tableFrom.page>1&&(e.tableFrom.page=e.tableFrom.page-1),e.getList()}))}))}}},l=c,u=(n("35a9"),n("2877")),m=Object(u["a"])(l,a,o,!1,null,null,null);e["default"]=m.exports},"699d":function(t,e,n){},7998:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"e",(function(){return r})),n.d(e,"d",(function(){return c})),n.d(e,"f",(function(){return l})),n.d(e,"i",(function(){return u})),n.d(e,"j",(function(){return m})),n.d(e,"k",(function(){return s})),n.d(e,"l",(function(){return d})),n.d(e,"n",(function(){return f})),n.d(e,"m",(function(){return p})),n.d(e,"g",(function(){return h})),n.d(e,"h",(function(){return g})),n.d(e,"o",(function(){return b})),n.d(e,"p",(function(){return y})),n.d(e,"r",(function(){return v})),n.d(e,"q",(function(){return w})),n.d(e,"t",(function(){return O})),n.d(e,"u",(function(){return j})),n.d(e,"v",(function(){return S})),n.d(e,"w",(function(){return _})),n.d(e,"x",(function(){return x})),n.d(e,"s",(function(){return k})),n.d(e,"y",(function(){return F}));var a=n("b775");function o(t){return Object(a["a"])({url:"/admin/platform/community/category/add",method:"post",data:t})}function i(t){return Object(a["a"])({url:"/admin/platform/community/category/delete/".concat(t),method:"post"})}function r(t){return Object(a["a"])({url:"/admin/platform/community/category/show/".concat(t),method:"post"})}function c(t){return Object(a["a"])({url:"/admin/platform/community/category/page/list",method:"get",params:t})}function l(t){return Object(a["a"])({url:"/admin/platform/community/category/update",method:"post",data:t})}function u(t){return Object(a["a"])({url:"/admin/platform/community/note/audit",method:"post",data:t})}function m(t){return Object(a["a"])({url:"/admin/platform/community/note/delete/".concat(t),method:"post"})}function s(t){return Object(a["a"])({url:"/admin/platform/community/note/detail/".concat(t),method:"GET"})}function d(t){return Object(a["a"])({url:"/admin/platform/community/note/forced/down/".concat(t.id),method:"POST",data:t})}function f(t){return Object(a["a"])({url:"/admin/platform/community/note/reply/force/off/".concat(t),method:"POST"})}function p(t){return Object(a["a"])({url:"/admin/platform/community/note/page/list",method:"GET",params:t})}function h(){return Object(a["a"])({url:"/admin/platform/community/category/get/config",method:"GET"})}function g(t){return Object(a["a"])({url:"/admin/platform/community/category/update/config",method:"post",data:t})}function b(t){return Object(a["a"])({url:"/admin/platform/community/reply/audit",method:"post",data:t})}function y(t){return Object(a["a"])({url:"/admin/platform/community/reply/delete/".concat(t),method:"post"})}function v(t){return Object(a["a"])({url:"/admin/platform/community/reply/note/page/list/".concat(t.nid),method:"get",params:t})}function w(t){return Object(a["a"])({url:"/admin/platform/community/reply/page/list",method:"get",params:t})}function O(t){return Object(a["a"])({url:"/admin/platform/community/topic/add",method:"post",data:t})}function j(t){return Object(a["a"])({url:"/admin/platform/community/topic/delete/".concat(t),method:"post"})}function S(t){return Object(a["a"])({url:"/admin/platform/community/topic/page/list",method:"get",params:t})}function _(t){return Object(a["a"])({url:"/admin/platform/community/topic/recommend/".concat(t),method:"POST"})}function x(t){return Object(a["a"])({url:"/admin/platform/community/topic/update",method:"POST",data:t})}function k(t){return Object(a["a"])({url:"/admin/platform/community/note/star/update",method:"POST",data:t})}function F(t){return Object(a["a"])({url:"/admin/platform/community/note/category/batch/update",method:"POST",data:t})}}}]);