You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
5.8 KiB
1 lines
5.8 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-75c85cc9"],{7998:function(t,n,e){"use strict";e.d(n,"e",(function(){return a})),e.d(n,"c",(function(){return c})),e.d(n,"g",(function(){return i})),e.d(n,"d",(function(){return r})),e.d(n,"f",(function(){return u})),e.d(n,"t",(function(){return s})),e.d(n,"q",(function(){return l})),e.d(n,"w",(function(){return m})),e.d(n,"r",(function(){return d})),e.d(n,"v",(function(){return f})),e.d(n,"s",(function(){return g})),e.d(n,"j",(function(){return h})),e.d(n,"i",(function(){return p})),e.d(n,"a",(function(){return y})),e.d(n,"x",(function(){return v})),e.d(n,"o",(function(){return b})),e.d(n,"h",(function(){return w})),e.d(n,"k",(function(){return _})),e.d(n,"b",(function(){return k})),e.d(n,"u",(function(){return x})),e.d(n,"m",(function(){return L})),e.d(n,"l",(function(){return C})),e.d(n,"n",(function(){return $})),e.d(n,"p",(function(){return z}));var o=e("0c6d");function a(t){return o["a"].get("community/category/lst",t)}function c(){return o["a"].get("community/category/create/form")}function i(t){return o["a"].get("community/category/update/".concat(t,"/form"))}function r(t){return o["a"].delete("community/category/delete/".concat(t))}function u(t,n){return o["a"].post("community/category/status/".concat(t),{status:n})}function s(t){return o["a"].get("community/topic/lst",t)}function l(){return o["a"].get("community/topic/create/form")}function m(t){return o["a"].get("community/topic/update/".concat(t,"/form"))}function d(t){return o["a"].delete("community/topic/delete/".concat(t))}function f(t,n){return o["a"].post("community/topic/status/".concat(t),{status:n})}function g(t,n){return o["a"].post("community/topic/hot/".concat(t),{status:n})}function h(t){return o["a"].get("community/lst",t)}function p(t){return o["a"].get("community/detail/".concat(t))}function y(t,n){return o["a"].post("community/status/".concat(t),n)}function v(t){return o["a"].get("community/update/".concat(t,"/form"))}function b(t,n){return o["a"].post("community/show/".concat(t),{status:n})}function w(t){return o["a"].delete("community/delete/".concat(t))}function _(t){return o["a"].get("community/status/".concat(t,"/form"))}function k(){return o["a"].get("community/category/option")}function x(){return o["a"].get("community/topic/option")}function L(t){return o["a"].get("community/reply/lst",t)}function C(t){return o["a"].delete("community/reply/delete/".concat(t))}function $(t){return o["a"].get("community/reply/status/".concat(t,"/form"))}function z(){return o["a"].get("community/title")}},cc56:function(t,n,e){"use strict";e.r(n);var o=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"divBox"},[e("el-card",{staticClass:"box-card"},[e("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[e("el-button",{staticClass:"mb20",attrs:{size:"small",type:"primary"},on:{click:t.onAdd}},[t._v("添加社区分类")])],1),t._v(" "),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"small","row-key":"category_id"}},[e("el-table-column",{attrs:{label:"分类名称","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("span",[t._v(t._s(n.row.cate_name))])]}}])}),t._v(" "),e("el-table-column",{attrs:{prop:"sort",label:"排序","min-width":"100"}}),t._v(" "),e("el-table-column",{attrs:{prop:"status",label:"是否显示","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"显示","inactive-text":"隐藏"},on:{change:function(e){return t.onchangeIsShow(n.row)}},model:{value:n.row.is_show,callback:function(e){t.$set(n.row,"is_show",e)},expression:"scope.row.is_show"}})]}}])}),t._v(" "),e("el-table-column",{attrs:{label:"操作","min-width":"100",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.onEdit(n.row.category_id)}}},[t._v("编辑")]),t._v(" "),e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.handleDelete(n.row.category_id,n.$index)}}},[t._v("删除")])]}}])})],1),t._v(" "),e("div",{staticClass:"block"},[e("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)},a=[],c=e("7998"),i={name:"communityClassify",data:function(){return{isChecked:!1,listLoading:!0,tableData:{data:[],total:0},tableFrom:{page:1,limit:20}}},mounted:function(){this.getList()},methods:{getList:function(){var t=this;this.listLoading=!0,Object(c["e"])(this.tableFrom).then((function(n){t.tableData.data=n.data.list,t.tableData.total=n.data.count,t.listLoading=!1})).catch((function(n){t.listLoading=!1,t.$message.error(n.message)}))},pageChange:function(t){this.tableFrom.page=t,this.getList()},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList()},onAdd:function(){var t=this;this.$modalForm(Object(c["c"])()).then((function(){return t.getList()}))},onEdit:function(t){var n=this;this.$modalForm(Object(c["g"])(t)).then((function(){return n.getList()}))},handleDelete:function(t,n){var e=this;this.$modalSure("删除该分类").then((function(){Object(c["d"])(t).then((function(t){var n=t.message;e.$message.success(n),e.getList()})).catch((function(t){var n=t.message;e.$message.error(n)}))}))},onchangeIsShow:function(t){var n=this;Object(c["f"])(t.category_id,t.is_show).then((function(t){var e=t.message;n.$message.success(e)})).catch((function(t){var e=t.message;n.$message.error(e)}))}}},r=i,u=e("2877"),s=Object(u["a"])(r,o,a,!1,null,"dd0e1208",null);n["default"]=s.exports}}]); |