chunk-541ba1be.2c4d27e8.js 2.9 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-541ba1be"],{4403:function(e,t,n){},"4ee4":function(e,t,n){"use strict";n("4403")},"5e72":function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"new-app-container layout-vertical"},[n("YMTableSearch",{attrs:{loading:e.loading,"search-form":e.searchForm},on:{submit:e.onSubmit}}),n("YMTable",{ref:"table",attrs:{"table-key":5,index:!1,selection:!1,columns:e.columns,apis:e.apis,"custom-style":{height:"calc(100vh - 200px)"}}})],1)},r=[],o=n("5530"),i=(n("a9e3"),n("4d90"),n("7e1e"),{name:"UserDiary",data:function(){return{loading:!1,searchForm:[{label:"会员ID",type:"input",prop:"member_id",clearable:!0},{label:"会员昵称",type:"input",prop:"first_name",clearable:!0},{label:"日期范围",type:"daterange",prop:"dateRange",valueFormat:"yyyy-MM-dd",startPlaceholder:"开始日期",endPlaceholder:"结束日期"}]}},computed:{apis:function(){return{list:{url:"user/loginLog",dataParam:"data.data",resultParam:"data"}}},columns:function(){var e=this;return[{label:"会员ID",prop:"member_id",width:100},{label:"会员昵称",prop:"first_name",width:140},{label:"IP地址",prop:"login_ip",width:150,align:"center",method:function(e){return e.login_ip||"--"}},{label:"国家/地区",prop:"country",width:120,align:"center",method:function(e){return e.country||"--"}},{label:"登入网站/包名称",prop:"website",minWidth:200,align:"center",method:function(e){return e.website||"--"}},{label:"平台",prop:"platform",width:100,align:"center",method:function(e){return e.platform||"--"}},{label:"浏览器核心",prop:"browser",width:120,align:"center",method:function(e){return e.browser||"--"}},{label:"操作系统",prop:"os",width:120,align:"center",method:function(e){return e.os||"--"}},{label:"状态",prop:"status",width:80,align:"center",method:function(e){return e.status?1===Number(e.status)?"在线":"离线":"--"}},{label:"在线时长(分)",prop:"online_duration",width:120,align:"center",method:function(e){return null!=e.online_duration?e.online_duration:"--"}},{label:"登入时间",prop:"created_at",width:175,align:"center"},{label:"登出时间",prop:"logout_time",width:175,align:"center",method:function(t){return t.logout_time?e.formatTime(t.logout_time):"--"}}]}},methods:{formatTime:function(e){if(!e)return"--";var t=new Date(1e3*e),n=function(e){return String(e).padStart(2,"0")};return t.getFullYear()+"-"+n(t.getMonth()+1)+"-"+n(t.getDate())+" "+n(t.getHours())+":"+n(t.getMinutes())+":"+n(t.getSeconds())},onSubmit:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(o["a"])({},e);e.dateRange&&2===e.dateRange.length&&(t.start_time=e.dateRange[0],t.end_time=e.dateRange[1]),delete t.dateRange,this.$refs.table.getList(t)}},mounted:function(){this.onSubmit()}}),l=i,u=(n("4ee4"),n("2877")),c=Object(u["a"])(l,a,r,!1,null,"6a84fccf",null);t["default"]=c.exports}}]);