(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f53ec21e"],{7344: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.isHot,callback:function(e){t.$set(t.tableFrom,"isHot",e)},expression:"tableFrom.isHot"}},[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:topic:add"],expression:"['platform:community:topic: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",height:"500px","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:"countUse",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:topic:recommend: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.isHot,callback:function(n){t.$set(e.row,"isHot",n)},expression:"scope.row.isHot"}}):n("div",[t._v(t._s(1===e.row.isHot?"推荐":"不推荐"))])]}}])}),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:topic:update"],expression:"['platform:community:topic: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:topic:delete"],expression:"['platform:community:topic: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{form:{},rules:{},tableFrom:{page:1,limit:20,name:"",isHot:""},name:"",tableData:{data:[],total:0},listLoading:!1,keyNum:0,id:0}},mounted:function(){Object(r["a"])(["platform:community:topic:page:list"])&&this.getList()},methods:{checkPermi:r["a"],onchangeIsShow:function(t){var e=this;i["w"](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["v"](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?"新建话题":"编辑话题","communityTopics",t,0===t?{id:0,name:"",handlingFee:""}:Object.assign({},e),(function(t){n.submit(t),n.resetForm(t)}),this.keyNum=Math.random())},submit:function(t){var e=this,n={id:this.id,name:t.name};this.id?i["x"](n).then((function(t){e.$message.success("操作成功"),e.$msgbox.close(),e.getList()})).catch((function(){e.loading=!1})):i["t"](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["u"](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("c607"),n("2877")),m=Object(u["a"])(l,a,o,!1,null,null,null);e["default"]=m.exports},7496: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 p})),n.d(e,"m",(function(){return f})),n.d(e,"g",(function(){return h})),n.d(e,"h",(function(){return b})),n.d(e,"o",(function(){return g})),n.d(e,"p",(function(){return v})),n.d(e,"r",(function(){return y})),n.d(e,"q",(function(){return O})),n.d(e,"t",(function(){return w})),n.d(e,"u",(function(){return j})),n.d(e,"v",(function(){return x})),n.d(e,"w",(function(){return _})),n.d(e,"x",(function(){return k})),n.d(e,"s",(function(){return F})),n.d(e,"y",(function(){return C}));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 p(t){return Object(a["a"])({url:"/admin/platform/community/note/reply/force/off/".concat(t),method:"POST"})}function f(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 b(t){return Object(a["a"])({url:"/admin/platform/community/category/update/config",method:"post",data:t})}function g(t){return Object(a["a"])({url:"/admin/platform/community/reply/audit",method:"post",data:t})}function v(t){return Object(a["a"])({url:"/admin/platform/community/reply/delete/".concat(t),method:"post"})}function y(t){return Object(a["a"])({url:"/admin/platform/community/reply/note/page/list/".concat(t.nid),method:"get",params:t})}function O(t){return Object(a["a"])({url:"/admin/platform/community/reply/page/list",method:"get",params:t})}function w(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 x(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 k(t){return Object(a["a"])({url:"/admin/platform/community/topic/update",method:"POST",data:t})}function F(t){return Object(a["a"])({url:"/admin/platform/community/note/star/update",method:"POST",data:t})}function C(t){return Object(a["a"])({url:"/admin/platform/community/note/category/batch/update",method:"POST",data:t})}},c607:function(t,e,n){"use strict";n("7496")}}]);