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 line
7.6 KiB
1 line
7.6 KiB
5 months ago
|
webpackJsonp([81],{Sq2b:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a("mvHQ"),n=a.n(r),s=a("Xxa5"),i=a.n(s),o=a("exGp"),c=a.n(o),l=a("Dd8w"),m=a.n(l),u=a("NYxO"),p=a("PJh5"),h=a.n(p),d={data:function(){return{statusText:{1:{type:"info",text:"未审核"},2:{type:"",text:"审核通过"},3:{type:"danger",text:"已驳回"}},pickerOptions:{disabledDate:function(t){return t.getTime()>1e3*(h()(h()(Date.now()).format("YYYY-MM-DD")).unix()+86400-1)}},searchForm:{page:1,limit:10,status:0,start_time:"",end_time:"",user_name:""},loading:!1,tableData:[],total:0,count:{}}},created:function(){this.getTableDataList(1)},computed:m()({},Object(u.d)({routesItem:function(t){return t.routes}})),methods:{resetForm:function(t){this.$refs[t].resetFields(),this.getTableDataList(1)},handleSizeChange:function(t){this.searchForm.limit=t,this.handleCurrentChange(1)},handleCurrentChange:function(t){this.searchForm.page=t,this.getTableDataList()},toChange:function(t){var e=this;return c()(i.a.mark(function a(){return i.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:e.searchForm.status=t,e.getTableDataList(1);case 2:case"end":return a.stop()}},a,e)}))()},getTableDataList:function(t){var e=this;return c()(i.a.mark(function a(){var r,s,o,c,l,m,u,p,h,d;return i.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return t&&(e.searchForm.page=1),e.tableData=[],e.loading=!0,r=JSON.parse(n()(e.searchForm)),(s=r.start_time)&&s.length>0?(r.start_time=s[0]/1e3,r.end_time=s[1]/1e3):(r.start_time="",r.end_time=""),-1===r.status&&(r.is_update=1,delete r.status),a.next=9,e.$api.dynamic.commentList(r);case 9:if(o=a.sent,c=o.code,l=o.data,e.loading=!1,200===c){a.next=15;break}return a.abrupt("return");case 15:m=l.all,u=l.nopass,p=l.ing,h=l.pass,d=l.total,e.tableData=l.data,e.total=d,e.count={all:m,nopass:u,ing:p,pass:h};case 19:case"end":return a.stop()}},a,e)}))()},confirmDel:function(t,e){var a=this;this.$confirm("你确认要"+{"-1":"删除",2:"通过",3:"驳回"}[e]+"评论吗?",this.$t("tips.reminder"),{confirmButtonText:this.$t("action.comfirm"),cancelButtonText:this.$t("action.cancel"),type:"warning"}).then(function(){a.updateItem(t,e)}).catch(function(){})},updateItem:function(t,e){var a=this;return c()(i.a.mark(function r(){var n;return i.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:n=-1===e?"commentDel":"commentCheck",a.$api.dynamic[n]({id:t,status:e}).then(function(t){if(200===t.code)a.$message.success(a.$t(-1===e?"tips.successDel":"tips.successOper")),-1===e&&(a.searchForm.page=a.searchForm.page<Math.ceil((a.total-1)/a.searchForm.limit)?a.searchForm.page:Math.ceil((a.total-1)/a.searchForm.limit)),a.getTableDataList();else{if(-1===e)return;a.getTableDataList()}});case 2:case"end":return r.stop()}},r,a)}))()}},filters:{handleTime:function(t,e){return 1===e?h()(1e3*t).format("YYYY-MM-DD"):2===e?h()(1e3*t).format("HH:mm:ss"):h()(1e3*t).format("YYYY-MM-DD HH:mm:ss")}}},f={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"lb-dynamic-comment"},[a("top-nav"),t._v(" "),a("div",{staticClass:"page-main"},[a("el-row",{staticClass:"page-top-operate"},[a("el-button",{attrs:{type:0===t.searchForm.status?"primary":"",plain:"",size:"medium"},on:{click:function(e){return t.toChange(0)}}},[t._v("全部("+t._s(t.count.all||0)+")")]),t._v(" "),a("el-button",{attrs:{type:1===t.searchForm.status?"primary":"",plain:"",size:"medium"},on:{click:function(e){return t.toChange(1)}}},[t._v("未审核("+t._s(t.count.ing||0)+")")]),t._v(" "),a("el-button",{attrs:{type:2===t.searchForm.status?"primary":"",plain:"",size:"medium"},on:{click:function(e){return t.toChange(2)}}},[t._v("审核通过("+t._s(t.count.pass||0)+")")]),t._v(" "),a("el-button",{attrs:{type:3===t.searchForm.status?"primary":"",plain:"",size:"medium"},on:{click:function(e){return t.toChange(3)}}},[t._v("已驳回("+t._s(t.count.nopass||0)+")")])],1),t._v(" "),a("el-row",{staticClass:"page-search-form"},[a("el-form",{ref:"searchForm",attrs:{inline:!0,model:t.searchForm},nativeOn:{submit:function(t){t
|