(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2cd1b586"],{"1bfc":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"login_logs_view"},[a("div",{staticClass:"content-select"},[a("div",{staticClass:"select-content"},[a("el-form",{ref:"filterForm",attrs:{model:e.queryParams}},[a("el-row",{staticClass:"row-first"},[a("el-col",{attrs:{span:5}},[a("el-form-item",{attrs:{label:"登录地址",prop:"title"}},[a("el-input",{staticStyle:{width:"220px"},attrs:{placeholder:"请输入登录地址",clearable:""},model:{value:e.queryParams.cliIp,callback:function(t){e.$set(e.queryParams,"cliIp",t)},expression:"queryParams.cliIp"}})],1)],1),a("el-col",{attrs:{span:5}},[a("el-form-item",{attrs:{label:"用户名称",prop:"operName"}},[a("el-input",{staticStyle:{width:"220px"},attrs:{placeholder:"请输入操作人员",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery.apply(null,arguments)}},model:{value:e.queryParams.userName,callback:function(t){e.$set(e.queryParams,"userName",t)},expression:"queryParams.userName"}})],1)],1),a("el-col",{attrs:{span:5}},[a("el-form-item",{attrs:{label:"状态",prop:"status"}},[a("el-select",{staticStyle:{width:"220px"},attrs:{placeholder:"操作状态",clearable:""},model:{value:e.queryParams.oprtStatus,callback:function(t){e.$set(e.queryParams,"oprtStatus",t)},expression:"queryParams.oprtStatus"}},e._l(e.operateSta,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),a("el-col",{attrs:{span:5}},[a("el-form-item",{attrs:{label:"登录时间",prop:"loginTime"}},[a("el-date-picker",{staticStyle:{width:"220px"},attrs:{"value-format":"yyyy-MM-dd",type:"daterange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:e.queryParams.oprtTimeRange,callback:function(t){e.$set(e.queryParams,"oprtTimeRange",t)},expression:"queryParams.oprtTimeRange"}})],1)],1),a("el-col",{attrs:{span:4}},[a("el-button",{attrs:{type:"primary",disabled:e.loading},on:{click:e.handleQuery}},[e._v("查询")]),a("el-button",{attrs:{type:"default"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1)],1)],1)]),a("div",{staticClass:"content-main"},[a("div",{staticClass:"top-left",staticStyle:{"margin-bottom":"5px"}},[a("el-button",{attrs:{type:"danger",disabled:0==e.selections.length,plain:"",icon:"el-icon-delete"},on:{click:e.handleDelete}},[e._v("删除")]),a("el-button",{attrs:{type:"danger",plain:"",icon:"el-icon-delete"},on:{click:e.handleClean}},[e._v("清空")]),a("el-button",{attrs:{type:"warning",plain:"",icon:"el-icon-download"},on:{click:e.alertExportLogs}},[e._v("导出")])],1),a("div",{staticClass:"content-table"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"table",staticStyle:{width:"100%"},attrs:{data:e.records,stripe:"","header-cell-style":e.handleHeaderCellStyle,border:""},on:{"selection-change":e.handleSelection}},[a("el-table-column",{attrs:{type:"selection",fixed:"left"}}),a("el-table-column",{attrs:{label:"访问编号",align:"center",prop:"id"}}),a("el-table-column",{attrs:{label:"用户名称",align:"center",prop:"userName"}}),a("el-table-column",{attrs:{label:"登录地址",align:"center",prop:"cliIp"}}),a("el-table-column",{attrs:{label:"登录地点","show-overflow-tooltip":!0,align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.cliCountry)+" "+e._s(t.row.cliProvince)+" "+e._s(t.row.cliCity)+" ")]}}])}),a("el-table-column",{attrs:{label:"浏览器",align:"center",prop:"cliBrowser"}}),a("el-table-column",{attrs:{label:"操作系统",align:"center",prop:"cliOs"}}),a("el-table-column",{attrs:{label:"操作来源",align:"center",prop:"oprtSource",formatter:e.handleTableValueFormat}}),a("el-table-column",{attrs:{label:"登录状态",align:"center",prop:"oprtStatus"},scopedSlots:e._u([{key:"default",fn:function(t){return["Y"==t.row.oprtStatus?a("span",[a("el-tag",[e._v("成功")])],1):a("span",[a("el-tag",{attrs:{type:"danger"}},[e._v("失败")])],1)]}}])}),a("el-table-column",{attrs:{label:"操作信息",align:"center","show-overflow-tooltip":!0,prop:"errorMessage",formatter:e.handleTableValueFormat}}),a("el-table-column",{attrs:{label:"登录日期",align:"center",prop:"oprtTime"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e.fmtOrderTime(t.row.oprtTime)))])]}}])})],1)],1),a("div",{staticClass:"content-page"},[a("el-pagination",{attrs:{background:"","page-sizes":[15,30,50,100],"page-size":e.queryParams.size,layout:"total, sizes, prev, pager, next",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)]),a("el-dialog",{attrs:{width:"30%","append-to-body":"",visible:e.exportLogsVisible},on:{"update:visible":function(t){e.exportLogsVisible=t}}},[a("div",{staticStyle:{margin:"10px 20px"}},[a("p",{staticStyle:{"font-size":"20px"}},[e._v("你是否要导出已勾选的"+e._s(e.exportCounts)+"数据。")])]),a("div",{staticClass:"button-footer",staticStyle:{"text-align":"center"},attrs:{slot:"footer"},slot:"footer"},[a("el-button",{staticClass:"button-left",attrs:{type:"default"},on:{click:function(t){e.exportLogsVisible=!1}}},[e._v("取消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.handleExportLogs}},[e._v("确认")])],1)]),a("el-dialog",{attrs:{width:"30%","append-to-body":"",visible:e.deleteVisible},on:{"update:visible":function(t){e.deleteVisible=t}}},[a("div",{staticStyle:{margin:"10px 20px"}},[a("p",{staticStyle:{"font-size":"20px"}},[e._v('是否确认删除日志编号为"'+e._s(e.deleteIds)+'"的数据项？')])]),a("div",{staticClass:"button-footer",staticStyle:{"text-align":"center"},attrs:{slot:"footer"},slot:"footer"},[a("el-button",{staticClass:"button-left",attrs:{type:"default"},on:{click:function(t){e.deleteVisible=!1}}},[e._v("取消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.handleDeletedLogs}},[e._v("确认")])],1)])],1)},l=[],r=a("1ce7"),i=a("c6c8"),o={name:"logs",mixins:[r["g"]],data(){return{operateSta:[{label:"成功",value:"Y"},{label:"失败",value:"N"}],operatteSource:[],queryParams:{page:1,size:15,cliIp:void 0,userName:void 0,oprtStatus:void 0,bizName:void 0,dateRange:[]},detailInfo:{},records:[],loading:!1,total:0,paging:{total:0,size:15,current:1},pageSizes:[15,30,50,100],selections:[],detailVisible:!1,exportLogsVisible:!1,exportCounts:0,deleteVisible:!1,deleteIds:[]}},created(){this.getDicts("sys-oprt-source").then(e=>{let{data:t}=e;return this.operatteSource=t}),this.getList()},methods:{getList(){this.loading=!0,this.queryParams.bizName="登录注册",Object(i["e"])(this.queryParams).then(e=>{e.success&&(this.records=e.data.records,this.total=e.data.total),this.loading=!1})},handleQuery(){this.queryParams.page=1,this.getList()},resetQuery(){this.queryParams.userName=void 0,this.queryParams.oprtStatus=void 0,this.queryParams.oprtTimeRange=[],this.queryParams.cliIp=void 0},handleSizeChange(e){this.queryParams.page=1,this.queryParams.size=e,this.getList()},handleCurrentChange(e){console.log("下一页"),this.queryParams.page=e,this.getList()},fmtDate(e,t){let a=e[t.property];return void 0==a||null==a?"":this.$moment(a).format("YYYY-MM-DD")},handleSelection(e){this.selections=e},fmtOrderTime(e){return void 0==e||null==e?"--":e.substring(0,11)},formatBizType(e){let t=this.operatteType.find(t=>t.value==e).label;return null!=t?t:e},handleView(e){this.detailVisible=!0,Object(i["d"])(e.id).then(e=>{e.success&&(this.detailInfo=e.data)})},alertExportLogs(){0==this.selections.length?this.exportCounts=this.total:(this.exportCounts=this.selections.length,this.queryParams.ids=this.selections.map(e=>e.id)),this.exportLogsVisible=!0},async handleExportLogs(){this.queryParams.bizName="登录注册";const e=await Object(i["a"])(this.queryParams);this.exportLogsVisible=!1,this.downloadFile(e)},handleDelete(){!this.selections.length>0?this.toast("请选择删除的日志记录","warning"):(this.deleteIds=this.selections.map(e=>e.id),this.deleteVisible=!0)},handleDeletedLogs(){this.queryParams.ids=this.deleteIds,this.queryParams.operType="DELETED",Object(i["c"])(this.queryParams).then(e=>{e.success&&(this.toast("删除成功","success"),this.queryParams.ids=[],this.getList())}),this.deleteVisible=!1},handleClean(){this.$confirm("是否确认清空所有查询出来的操作日志数据项？","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.queryParams.operType="CLEAN",this.queryParams.bizName="登录注册",Object(i["b"])(this.queryParams).then(e=>{e.success&&(this.toast("清空成功","success"),this.queryParams.ids=[],this.getList())})}).catch(()=>{this.toast("取消清空","warning")})},handleTableValueFormat(e,t){let a=e[t.property];switch(t.label){case"操作信息":if("Y"!=e.oprtStatus)return e.errorMessage;if("SIGNIN"==e.bizType)return"登录成功";if("LOGOUT"==e.bizType)return"退出成功";break;case"操作来源":var s=this.operatteSource.find(t=>t.value==e.oprtSource);return null!=s?s.label:e.oprtSource;default:return a}}}},n=o,c=(a("d3c3"),a("2877")),u=Object(c["a"])(n,s,l,!1,null,"3e51f937",null);t["default"]=u.exports},"1d4a":function(e,t,a){},c6c8:function(e,t,a){"use strict";a.d(t,"e",(function(){return l})),a.d(t,"d",(function(){return r})),a.d(t,"a",(function(){return i})),a.d(t,"c",(function(){return o})),a.d(t,"b",(function(){return n}));var s=a("8e44");const l=e=>Object(s["f"])("/system/oprt/log/list",e).then(e=>e),r=e=>Object(s["e"])("/system/oprt/log/detail/"+e).then(e=>e),i=e=>Object(s["c"])("/system/oprt/log/exportOprtLogExcel",e).then(e=>e),o=e=>Object(s["b"])("/system/oprt/log",e).then(e=>e),n=e=>Object(s["b"])("/system/oprt/log/clean",e).then(e=>e)},d3c3:function(e,t,a){"use strict";a("1d4a")}}]);
//# sourceMappingURL=chunk-2cd1b586.c65ca1bd.js.map