webpackJsonp([38],{"9efd":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("0zQk"),n=a("gyMJ"),l=a("0xDb"),s={name:"reportIndex",data:function(){return{tableData:[],listLoading:!1,delVisible:!1,multipleSelection:[],total:0,idx:-1,pages:{total:0,page:1},delParams:{id:""}}},created:function(){this.fetchData()},computed:{data:function(){}},methods:{pageSizeChange:function(t){this.pages.limit=t,this.fetchData()},pageCurrentChange:function(t){this.pages.page=t,this.fetchData()},fetchData:function(){var t=this;this.listLoading=!0,n.a.reportList(this.pages).then(function(e){t.tableData=e.data.data,t.pages.total=parseInt(e.data.total),t.listLoading=!1})},handleSelectionChange:function(t){this.multipleSelection=t},toggleSelection:function(t){var e=this;t?t.forEach(function(t){e.$refs.multipleTable.toggleRowSelection(t)}):this.$refs.multipleTable.clearSelection()},parseTime:function(t){return Object(l.a)(t)},goInfoView:function(t){window.open(t.url)},handleDelete:function(t,e){this.idx=t,this.delVisible=!0,this.delParams.id=[e.id]},batchDelete:function(){if(0==this.multipleSelection.length)return this.$message.warning("请选择数据"),!1;this.delVisible=!0},deleteSubmit:function(){var t=this,e={id:[]};if(this.idx>=0)e.id=this.delParams.id;else for(var a in this.multipleSelection)e.id.push(this.multipleSelection[a].id);n.a.reportDelete(e).then(function(a){1==a.code&&(t.$message.success("删除成功"),t.delVisible=!1,1==e.id.length?t.tableData.splice(t.idx,1):t.fetchData())})},lockReport:function(t){var e=this,a={data_id:t.data_id};n.a.reportDelete(a).then(function(a){1==a.code&&(t.status=-1,e.$message.success(a.msg))})}},components:{Pages:i.a}},o={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"container"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.tableData},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"30"}}),t._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"时间",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("small",[t._v(t._s(t.parseTime(e.row.create_time)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"type_name",label:"类型",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{size:"small",type:"danger"}},[t._v(t._s(e.row.type_name))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"被举报信息"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"link",on:{click:function(a){t.goInfoView(e.row)}}},[t._v(t._s(e.row.name))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"ip",label:"举报人(IP)",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("small",[t._v(t._s(e.row.ip))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作",width:"70"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"删除",placement:"top"}},[a("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(a){t.handleDelete(e.$index,e.row)}}},[a("i",{staticClass:"fa fa-trash"})])],1),t._v(" "),0==e.row.status?a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"锁定",placement:"top"}},[a("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(a){t.lockReport(e.row)}}},[a("i",{staticClass:"fa fa-lock"})])],1):t._e()]}}])})],1),t._v(" "),a("el-row",{staticClass:"handle-box mt-md",attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("div",[a("el-button",{attrs:{type:"",size:"mini"},on:{click:function(e){t.toggleSelection(t.tableData)}}},[t._v("全选/反选")]),t._v(" "),a("el-button",{attrs:{type:"",size:"mini"},on:{click:t.batchDelete}},[t._v("批量删除")])],1)]),t._v(" "),a("el-col",{attrs:{span:12}},[a("Pages",{attrs:{page:t.pages.page,total:t.pages.total},on:{pageSizeChange:t.pageSizeChange,pageCurrentChange:t.pageCurrentChange}})],1)],1),t._v(" "),a("el-dialog",{attrs:{title:"提示",visible:t.delVisible,width:"300px"},on:{"update:visible":function(e){t.delVisible=e}}},[a("div",{staticClass:"del-dialog-cnt"},[t._v("删除不可恢复，是否确定删除？")]),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:t.deleteSubmit}},[t._v("确 定")])],1)])],1)},staticRenderFns:[]};var c=a("XAIM")(s,o,!1,function(t){a("KLDh")},"data-v-2b4a5a94",null);e.default=c.exports},KLDh:function(t,e,a){var i=a("iNC1");"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);a("6imX")("2f1d9985",i,!0)},iNC1:function(t,e,a){(t.exports=a("bKW+")(!1)).push([t.i,"\n.del-dialog-cnt[data-v-2b4a5a94] {\n  font-size: 16px;\n  text-align: center\n}\n.link[data-v-2b4a5a94]{\n  cursor: pointer;\n  color:#337ab7;\n}\n",""])}});