hwQO.a75ec745.js 6.9 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["hwQO"],{hwQO:function(e,t,a){"use strict";a.r(t);var n=a("QbLZ"),i=a.n(n),r=a("t3Un");var l={name:"Logininfor",data:function(){return{loading:!0,ids:[],multiple:!0,total:0,list:[],statusOptions:[],dateRange:[],queryParams:{pageNum:1,pageSize:10,ipaddr:void 0,userName:void 0,status:void 0}}},created:function(){var e=this;this.getList(),this.getDicts("sys_common_status").then(function(t){e.statusOptions=t.data.data})},methods:{getList:function(){var e=this;this.loading=!0,function(e){return Object(r.a)({method:"get",params:i()({_gp:"admin.log.logininfor",_mt:"list"},e)})}(this.addDateRange(this.queryParams,this.dateRange)).then(function(t){e.list=t.data.data.items,e.total=t.data.data.count,e.loading=!1})},statusFormat:function(e,t){return this.selectDictLabel(this.statusOptions,e.status)},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.dateRange=[],this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map(function(e){return e.infoId}),this.multiple=!e.length},handleDelete:function(e){var t=this,a=e.infoId||this.ids.join(",");this.$confirm('是否确认删除访问编号为"'+a+'"的数据项?',"警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){return function(e){return Object(r.a)({method:"post",params:{_gp:"admin.log.logininfor",_mt:"delete",infoIds:e}})}(a)}).then(function(){t.getList(),t.$notify.success({title:"成功",message:"删除成功"})}).catch(function(){})},handleClean:function(){var e=this;this.$confirm("是否确认清空所有登录日志数据项?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){return Object(r.a)({method:"post",params:{_gp:"admin.log.logininfor",_mt:"clean"}})}).then(function(){e.getList(),e.$notify.success({title:"成功",message:"清空成功"})}).catch(function(){})},handleExport:function(){var e=this,t=this.queryParams;this.$confirm("是否确认导出所有操作日志数据项?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){return function(e){return Object(r.a)({method:"get",params:i()({_gp:"admin.log.logininfor",_mt:"export"},e)})}(t)}).then(function(t){e.download(t.data.data)}).catch(function(){})}}},o=a("KHd+"),s=Object(o.a)(l,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-form",{ref:"queryForm",attrs:{model:e.queryParams,inline:!0,"label-width":"68px"}},[a("el-form-item",{attrs:{label:"登录地址",prop:"ipaddr"}},[a("el-input",{staticStyle:{width:"240px"},attrs:{placeholder:"请输入登录地址",clearable:"",size:"small"},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleQuery(t):null}},model:{value:e.queryParams.ipaddr,callback:function(t){e.$set(e.queryParams,"ipaddr",t)},expression:"queryParams.ipaddr"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"用户名称",prop:"userName"}},[a("el-input",{staticStyle:{width:"240px"},attrs:{placeholder:"请输入用户名称",clearable:"",size:"small"},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleQuery(t):null}},model:{value:e.queryParams.userName,callback:function(t){e.$set(e.queryParams,"userName",t)},expression:"queryParams.userName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"状态",prop:"status"}},[a("el-select",{staticStyle:{width:"240px"},attrs:{placeholder:"登录状态",clearable:"",size:"small"},model:{value:e.queryParams.status,callback:function(t){e.$set(e.queryParams,"status",t)},expression:"queryParams.status"}},e._l(e.statusOptions,function(e){return a("el-option",{key:e.dictValue,attrs:{label:e.dictLabel,value:e.dictValue}})}))],1),e._v(" "),a("el-form-item",{attrs:{label:"登录时间"}},[a("el-date-picker",{attrs:{size:"small","value-format":"yyyy-MM-dd HH:mm:ss",type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:e.dateRange,callback:function(t){e.dateRange=t},expression:"dateRange"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),e._v(" "),a("el-row",{staticClass:"mb8",attrs:{gutter:10}},[a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["monitor:logininfor:remove"],expression:"['monitor:logininfor:remove']"}],attrs:{disabled:e.multiple,type:"danger",icon:"el-icon-delete",size:"mini"},on:{click:e.handleDelete}},[e._v("删除")])],1),e._v(" "),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["monitor:logininfor:remove"],expression:"['monitor:logininfor:remove']"}],attrs:{type:"danger",icon:"el-icon-delete",size:"mini"},on:{click:e.handleClean}},[e._v("清空")])],1),e._v(" "),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["system:logininfor:export"],expression:"['system:logininfor:export']"}],attrs:{type:"warning",icon:"el-icon-download",size:"mini"},on:{click:e.handleExport}},[e._v("导出")])],1)],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.list},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"访问编号",align:"center",prop:"infoId",width:"80"}}),e._v(" "),a("el-table-column",{attrs:{label:"用户名称",align:"center",prop:"userName"}}),e._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":!0,label:"登录地址",align:"center",prop:"ipaddr",width:"130"}}),e._v(" "),a("el-table-column",{attrs:{label:"登录地点",align:"center",prop:"loginLocation"}}),e._v(" "),a("el-table-column",{attrs:{label:"浏览器",align:"center",prop:"browser"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作系统",align:"center",prop:"os"}}),e._v(" "),a("el-table-column",{attrs:{formatter:e.statusFormat,label:"登录状态",align:"center",prop:"status"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作信息",align:"center",prop:"msg"}}),e._v(" "),a("el-table-column",{attrs:{label:"登录日期",align:"center",prop:"loginTime",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e.parseTime(t.row.loginTime)))])]}}])})],1),e._v(" "),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}})],1)},[],!1,null,null,null);s.options.__file="index.vue";t.default=s.exports}}]);