chunk-69e55dac.4c9343e7.js 6.1 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-69e55dac"],{"11f7":function(t,e,a){"use strict";a("81b7")},"6ccc":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"content"},[a("div",{staticClass:"search_box"}),a("div",{staticClass:"table_box"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"listTable",staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#f8fbfc"},border:"",stripe:"",data:t.list,height:t.tableHeight+"px","cell-style":{padding:"10px 0"}}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"50",align:"center",index:function(e){return t.params.page_size*(t.params.page_index-1)+e+1}}}),a("el-table-column",{attrs:{label:"评论人",prop:"status",align:"center",width:"180","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[t._v(" "+t._s(a.user&&a.user.nickname)+" ")]}}])}),a("el-table-column",{attrs:{label:"评论内容",prop:"content",align:"center","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"时间",prop:"updated_at",align:"center"}}),a("el-table-column",{attrs:{label:"状态",prop:"status",width:"80",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[a("el-tag",{attrs:{type:1===n.is_audit?"success":"danger"}},[t._v(t._s(1===n.is_audit?"显示":"隐藏"))])]}}])}),a("el-table-column",{attrs:{label:"操作",prop:"status",width:"150",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[a("el-button",{attrs:{type:"text"},on:{click:function(e){return t.handleDisable(n)}}},[t._v(t._s(0===n.is_audit?"显示":"隐藏"))]),a("el-button",{attrs:{type:"text"},on:{click:function(e){return t.handleDetail(n)}}},[t._v("详情")])]}}])})],1)],1),a("el-dialog",{attrs:{title:"评论详情",visible:t.showDetail,width:"40%"},on:{"update:visible":function(e){t.showDetail=e}}},[a("el-form",{attrs:{model:t.detail}},[a("el-form-item",{attrs:{label:"评论时间:","label-width":"90px"}},[t._v(" "+t._s(t.detail.updated_at)+" ")]),a("el-form-item",{attrs:{label:"评论内容:","label-width":"90px"}},[t._v(" "+t._s(t.detail.content)+" ")]),a("el-form-item",{attrs:{label:"评论审核:","label-width":"90px"}},[a("el-radio-group",{model:{value:t.detail.is_audit,callback:function(e){t.$set(t.detail,"is_audit",e)},expression:"detail.is_audit"}},[a("el-radio",{attrs:{label:1}},[t._v("显示")]),a("el-radio",{attrs:{label:0}},[t._v("隐藏")])],1)],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.showDetail=!1}}},[t._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.handleDisable(t.detail)}}},[t._v("确 定")])],1)],1),a("div",{staticClass:"batch-container"},[a("pagination",{attrs:{total:t.totalPage,limit:t.params.page_size,page:t.params.page_index},on:{pagination:t.changePagination,"update:limit":t.changePagination}})],1)],1)},i=[],l=(a("d3b7"),a("d800")),r={name:"CommntList",filters:{getStatus:function(t){return 1===t}},data:function(){return{total:0,loading:!1,dialogFormVisible:!1,form:{},params:{page_index:1,page_size:20,type:0},list:[],totalPage:0,tableHeight:0,detail:"",showDetail:!1}},created:function(){this.getList()},mounted:function(){var t=this;this.$nextTick((function(){t.tableHeight=document.getElementsByClassName("table_box")[0].offsetHeight}))},methods:{handleDetail:function(t){this.detail=t,this.showDetail=!0},handleDisable:function(t){var e=this,a=t.id,n=t.is_audit,i=0==n?"显示":"隐藏";this.$confirm("确认要".concat(i,"该评论内容"),{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(t){Object(l["a"])({comment_id:a}).then((function(t){200===t.status_code?(e.getList(),e.$message.success("已".concat(i,"该评论内容")),e.showDetail=!1):e.$message.error("设置失败")}))}))},getList:function(){var t=this;Object(l["i"])(this.params).then((function(e){200===e.status_code?(t.list=e.data.list,t.totalPage=e.data.total):t.$message.error(e.msg||"获取评论列表失败")})).catch((function(t){})).finally((function(e){t.loading=!1}))},handleSearch:function(t){this.params.search_name?(this.loading=!0,!t&&(this.page=1),this.getList()):(this.page=1,this.created())},changePagination:function(t){var e=t.page,a=t.limit;this.params.page_size=a,this.params.page_index=e,this.getList()}}},o=r,s=(a("11f7"),a("2877")),c=Object(s["a"])(o,n,i,!1,null,"84b74e46",null);e["default"]=c.exports},"81b7":function(t,e,a){},d800:function(t,e,a){"use strict";a.d(e,"k",(function(){return i})),a.d(e,"l",(function(){return l})),a.d(e,"g",(function(){return r})),a.d(e,"f",(function(){return o})),a.d(e,"c",(function(){return s})),a.d(e,"b",(function(){return c})),a.d(e,"j",(function(){return u})),a.d(e,"d",(function(){return d})),a.d(e,"h",(function(){return f})),a.d(e,"e",(function(){return p})),a.d(e,"i",(function(){return h})),a.d(e,"a",(function(){return m}));var n=a("b775"),i=function(t){return Object(n["a"])({url:"/article/uploadImg",method:"post",data:t})},l=function(t){return Object(n["a"])({url:"/article/uploadAudioSimple",method:"post",data:t})},r=function(t){return Object(n["a"])({url:"/article/getArticleList",method:"get",params:t})},o=function(t){return Object(n["a"])({url:"/article/getArticleDetail",method:"get",params:t})},s=function(t){return Object(n["a"])({url:"/article/deleteArticle",method:"post",data:t})},c=function(t){return Object(n["a"])({url:"/article/cancelShelvesArticle",method:"post",data:t})},u=function(t){return Object(n["a"])({url:"/article/manualRelease",method:"post",data:t})},d=function(t){return Object(n["a"])({url:"/article/editArticle",method:"post",data:t})},f=function(t){return Object(n["a"])({url:"/article/getArticleListNum",method:"get",params:t})},p=function(t){return Object(n["a"])({url:"/article/getArticleComment",method:"get",params:t})},h=function(t){return Object(n["a"])({url:"/article/getCommentList",method:"get",params:t})},m=function(t){return Object(n["a"])({url:"/article/authComment",method:"post",data:t})}}}]);