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
11 KiB
1 lines
11 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-197901c1"],{"0b65":function(t,e,n){"use strict";e["a"]={shortcuts:[{text:"今天",onClick:function(t){var e=new Date,n=new Date;n.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate())),t.$emit("pick",[n,e])}},{text:"昨天",onClick:function(t){var e=new Date,n=new Date;n.setTime(n.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),t.$emit("pick",[n,e])}},{text:"最近7天",onClick:function(t){var e=new Date,n=new Date;n.setTime(n.getTime()-6048e5),t.$emit("pick",[n,e])}},{text:"最近30天",onClick:function(t){var e=new Date,n=new Date;n.setTime(n.getTime()-2592e6),t.$emit("pick",[n,e])}},{text:"本月",onClick:function(t){var e=new Date,n=new Date;n.setTime(n.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),1))),t.$emit("pick",[n,e])}},{text:"本年",onClick:function(t){var e=new Date,n=new Date;n.setTime(n.setTime(new Date((new Date).getFullYear(),0,1))),t.$emit("pick",[n,e])}}]}},"365a":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"},[n("div",{staticClass:"selCard"},[n("el-form",{ref:"searchForm",attrs:{model:t.tableFrom,inline:!0,size:"small","label-width":"85px"}},[n("el-form-item",{attrs:{label:"时间选择:"}},[n("el-date-picker",{staticStyle:{width:"280px"},attrs:{"value-format":"yyyy/MM/dd",format:"yyyy/MM/dd",size:"small",type:"daterange",placement:"bottom-end",placeholder:"自定义时间","picker-options":t.pickerOptions},on:{change:t.onchangeTime},model:{value:t.timeVal,callback:function(e){t.timeVal=e},expression:"timeVal"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"用户名称:",prop:"username"}},[n("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入用户名称"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(1)}},model:{value:t.tableFrom.username,callback:function(e){t.$set(t.tableFrom,"username",e)},expression:"tableFrom.username"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"关键字:",prop:"keyword"}},[n("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入评论内容"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(1)}},model:{value:t.tableFrom.keyword,callback:function(e){t.$set(t.tableFrom,"keyword",e)},expression:"tableFrom.keyword"}})],1),t._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.getList(1)}}},[t._v("搜索")]),t._v(" "),n("el-button",{attrs:{size:"small"},on:{click:function(e){return t.searchReset()}}},[t._v("重置")])],1)],1)],1),t._v(" "),n("el-card",{staticClass:"mt14"},[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],attrs:{data:t.tableData.data,size:"small"}},[n("el-table-column",{attrs:{prop:"reply_id",label:"ID","min-width":"50"}}),t._v(" "),n("el-table-column",{attrs:{prop:"author.nickname",label:"用户名/ID","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[n("span",[t._v(t._s(a.author.nickname+" / "+a.author.uid))])]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"community.title",label:"文章标题","min-width":"150"}}),t._v(" "),n("el-table-column",{attrs:{prop:"content",label:"评论内容","min-width":"150"}}),t._v(" "),n("el-table-column",{attrs:{prop:"count_reply",label:"评论条数","min-width":"100"}}),t._v(" "),n("el-table-column",{attrs:{prop:"count_start",label:"评论点赞数","min-width":"100"}}),t._v(" "),n("el-table-column",{attrs:{label:"评论时间","min-width":"150",prop:"create_time"}}),t._v(" "),n("el-table-column",{attrs:{label:"审核状态","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("communityStatus")(e.row.status)))]),t._v(" "),-1==e.row.status?n("span",{staticStyle:{display:"block","font-size":"12px",color:"red"}},[t._v("原因 "+t._s(e.row.refusal))]):t._e()]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"操作","min-width":"150",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[null!==e.row.hasReply?n("el-button",{attrs:{type:"text",size:"small"},on:{click:function(n){return t.getAllReply(e.row.reply_id)}}},[t._v("查看回复")]):t._e(),t._v(" "),0==e.row.status?n("el-button",{attrs:{type:"text",size:"small"},on:{click:function(n){return t.handleReview(e.row.reply_id)}}},[t._v("审核")]):t._e(),t._v(" "),n("el-button",{attrs:{type:"text",size:"small"},on:{click:function(n){return t.handleDelete(e.row.reply_id,e.$index)}}},[t._v("删除")])]}}])})],1),t._v(" "),n("div",{staticClass:"block"},[n("el-pagination",{attrs:{background:"","page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1),t._v(" "),t.dialogVisible?n("el-dialog",{attrs:{title:"所有评论",visible:t.dialogVisible,width:"800px","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.replyLoading,expression:"replyLoading"}],attrs:{data:t.replyData.data,size:"small"}},[n("el-table-column",{attrs:{prop:"reply_id",label:"ID","min-width":"50"}}),t._v(" "),n("el-table-column",{attrs:{prop:"community.title",label:"文章标题","min-width":"120"}}),t._v(" "),n("el-table-column",{attrs:{prop:"content",label:"评论内容","min-width":"150"}}),t._v(" "),n("el-table-column",{attrs:{prop:"count_reply",label:"评论条数","min-width":"100"}}),t._v(" "),n("el-table-column",{attrs:{prop:"count_start",label:"评论点赞数","min-width":"100"}}),t._v(" "),n("el-table-column",{attrs:{label:"评论时间","min-width":"150",prop:"create_time"}})],1),t._v(" "),n("div",{staticClass:"block"},[n("el-pagination",{attrs:{"page-size":t.replyForm.limit,"current-page":t.replyForm.page,layout:"prev, pager, next, jumper",total:t.replyData.total},on:{"size-change":t.replySizeChange,"current-change":t.replyPageChange}})],1)],1):t._e()],1)},i=[],o=n("7998"),r=n("e572"),l=n("0b65"),c={name:"communityComment",data:function(){return{pickerOptions:l["a"],fromList:r["a"],tableData:{data:[],total:0},replyData:{data:[],total:0},listLoading:!0,replyLoading:!0,tableFrom:{page:1,limit:20,community_id:this.$route.query.community_id?this.$route.query.community_id:"",date:"",username:"",keyword:""},replyForm:{page:1,limit:10,pid:""},timeVal:[],props:{},tabClickIndex:"",dialogVisible:!1,reply_id:""}},mounted:function(){this.getList(1)},methods:{searchReset:function(){this.timeVal=[],this.tableFrom.date="",this.$refs.searchForm.resetFields(),this.getList(1)},onchangeTime:function(t){this.timeVal=t,this.tableFrom.date=this.timeVal?this.timeVal.join("-"):"",this.tableFrom.page=1,this.getList(1)},getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(o["m"])(this.tableFrom).then((function(t){e.tableData.data=t.data.list,e.tableData.total=t.data.count,e.listLoading=!1})).catch((function(t){e.listLoading=!1,e.$message.error(t.message)}))},pageChange:function(t){this.tableFrom.page=t,this.getList("")},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList("")},handleDelete:function(t,e){var n=this;this.$modalSure("删除该评论").then((function(){Object(o["l"])(t).then((function(t){var a=t.message;n.$message.success(a),n.tableData.data.splice(e,1)})).catch((function(t){var e=t.message;n.$message.error(e)}))}))},handleReview:function(t){var e=this;this.$modalForm(Object(o["n"])(t)).then((function(){return e.getList("")}))},replyPageChange:function(t){this.replyForm.page=t,this.getReplyList()},replySizeChange:function(t){this.replyForm.limit=t,this.getReplyList()},getAllReply:function(t){this.dialogVisible=!0,this.replyForm.pid=t,this.getReplyList()},getReplyList:function(){var t=this;this.replyLoading=!0,Object(o["m"])(this.replyForm).then((function(e){t.replyData.data=e.data.list,t.replyData.total=e.data.count,t.replyLoading=!1})).catch((function(e){t.replyLoading=!1,t.$message.error(e.message)}))},handleClose:function(){this.dialogVisible=!1}}},u=c,s=n("2877"),m=Object(s["a"])(u,a,i,!1,null,"69b67b52",null);e["default"]=m.exports},7998:function(t,e,n){"use strict";n.d(e,"e",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"g",(function(){return r})),n.d(e,"d",(function(){return l})),n.d(e,"f",(function(){return c})),n.d(e,"t",(function(){return u})),n.d(e,"q",(function(){return s})),n.d(e,"w",(function(){return m})),n.d(e,"r",(function(){return d})),n.d(e,"v",(function(){return p})),n.d(e,"s",(function(){return f})),n.d(e,"j",(function(){return g})),n.d(e,"i",(function(){return y})),n.d(e,"a",(function(){return h})),n.d(e,"x",(function(){return b})),n.d(e,"o",(function(){return v})),n.d(e,"h",(function(){return w})),n.d(e,"k",(function(){return _})),n.d(e,"b",(function(){return k})),n.d(e,"u",(function(){return D})),n.d(e,"m",(function(){return x})),n.d(e,"l",(function(){return F})),n.d(e,"n",(function(){return C})),n.d(e,"p",(function(){return L}));var a=n("0c6d");function i(t){return a["a"].get("community/category/lst",t)}function o(){return a["a"].get("community/category/create/form")}function r(t){return a["a"].get("community/category/update/".concat(t,"/form"))}function l(t){return a["a"].delete("community/category/delete/".concat(t))}function c(t,e){return a["a"].post("community/category/status/".concat(t),{status:e})}function u(t){return a["a"].get("community/topic/lst",t)}function s(){return a["a"].get("community/topic/create/form")}function m(t){return a["a"].get("community/topic/update/".concat(t,"/form"))}function d(t){return a["a"].delete("community/topic/delete/".concat(t))}function p(t,e){return a["a"].post("community/topic/status/".concat(t),{status:e})}function f(t,e){return a["a"].post("community/topic/hot/".concat(t),{status:e})}function g(t){return a["a"].get("community/lst",t)}function y(t){return a["a"].get("community/detail/".concat(t))}function h(t,e){return a["a"].post("community/status/".concat(t),e)}function b(t){return a["a"].get("community/update/".concat(t,"/form"))}function v(t,e){return a["a"].post("community/show/".concat(t),{status:e})}function w(t){return a["a"].delete("community/delete/".concat(t))}function _(t){return a["a"].get("community/status/".concat(t,"/form"))}function k(){return a["a"].get("community/category/option")}function D(){return a["a"].get("community/topic/option")}function x(t){return a["a"].get("community/reply/lst",t)}function F(t){return a["a"].delete("community/reply/delete/".concat(t))}function C(t){return a["a"].get("community/reply/status/".concat(t,"/form"))}function L(){return a["a"].get("community/title")}},e572:function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o}));var a=[{label:"开启",value:1},{label:"关闭",value:0}],i={title:"选择时间",custom:!0,fromTxt:[{text:"全部",val:""},{text:"今天",val:"today"},{text:"昨天",val:"yesterday"},{text:"最近7天",val:"lately7"},{text:"最近30天",val:"lately30"},{text:"本月",val:"month"},{text:"本年",val:"year"}]},o={title:"状态",custom:!0,fromTxt:[{text:"全部",val:""},{text:"待审核",val:"0"},{text:"审核已通过",val:"1"},{text:"审核未通过",val:"2"}]}}}]); |