webpackJsonp([36],{"75AJ":function(t,e,a){(t.exports=a("bKW+")(!1)).push([t.i,"\n.handle-box[data-v-332975c0] {\r\n  margin-bottom: 20px;\n}\n.handle-select[data-v-332975c0] {\r\n  width: 120px;\n}\n.handle-input[data-v-332975c0] {\r\n  width: 300px;\r\n  display: inline-block;\n}\n.del-dialog-cnt[data-v-332975c0] {\r\n  font-size: 16px;\r\n  text-align: center\n}\r\n",""])},QZXo:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var l=a("0zQk"),n=a("5eyz"),s=a("0xDb"),i={name:"userLog",data:function(){return{tableData:[],pages:{page:1,total:0},options:[{value:"30",label:"30天前"},{value:"60",label:"60天前"},{value:"90",label:"90天前"}],days:"",delVisible:!1}},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.logList(this.pages).then(function(e){1==e.code&&(t.tableData=e.msg.data,t.pages.total=e.msg.total,t.listLoading=!1)})},parseTime:function(t){return Object(s.a)(t)},clearLog:function(){this.delVisible=!0},handleDelete:function(){var t=this;if(!this.days)return this.$message.warning("请选择日期"),!1;var e={days:this.days};n.a.logDelete(e).then(function(e){1==e.code&&(t.$message.success("清除成功"),t.delVisible=!1,t.fetchData())})}},components:{Pages:l.a}},o={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"table"},[a("div",{staticClass:"container"},[a("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.tableData}},[a("el-table-column",{attrs:{prop:"event",label:"事件",width:"150"}}),t._v(" "),a("el-table-column",{attrs:{label:"时间",width:"180"},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:"name",label:"用户",width:"120"}}),t._v(" "),a("el-table-column",{attrs:{prop:"ip",label:"IP",width:"140"},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:{prop:"os",label:"系统",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("small",[t._v(t._s(e.row.os))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"browser",label:"浏览器",width:"200"}}),t._v(" "),a("el-table-column",{attrs:{prop:"memo",label:"详情"}})],1),t._v(" "),a("el-row",{staticClass:"handle-box mt-md",attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("div",[a("el-select",{attrs:{size:"mini",placeholder:"请选择时间"},model:{value:t.days,callback:function(e){t.days=e},expression:"days"}},t._l(t.options,function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),t._v(" "),a("el-button",{attrs:{size:"mini",icon:"search"},on:{click:t.clearLog}},[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)],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.handleDelete}},[t._v("确 定")])],1)])],1)},staticRenderFns:[]};var r=a("XAIM")(i,o,!1,function(t){a("V/fF")},"data-v-332975c0",null);e.default=r.exports},"V/fF":function(t,e,a){var l=a("75AJ");"string"==typeof l&&(l=[[t.i,l,""]]),l.locals&&(t.exports=l.locals);a("6imX")("eac2b3ee",l,!0)}});