chunk-2d238646.a38c32f3.js 6.3 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d238646"],{fed5:function(e,t,l){"use strict";l.r(t);var a=function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("div",{staticClass:"ele-body"},[l("el-card",{attrs:{shadow:"never"}},[l("el-form",{staticClass:"ele-form-search",attrs:{model:e.table.where,"label-width":"77px"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.$refs.table.reload()},submit:function(e){e.preventDefault()}}},[l("el-row",{attrs:{gutter:15}},[l("el-col",{attrs:{md:6,sm:12}},[l("el-form-item",{attrs:{label:"用户账号:"}},[l("el-input",{attrs:{placeholder:"请输入用户账号",clearable:""},model:{value:e.table.where.username,callback:function(t){e.$set(e.table.where,"username",t)},expression:"table.where.username"}})],1)],1),l("el-col",{attrs:{md:6,sm:12}},[l("div",{staticClass:"ele-form-actions"},[l("el-button",{staticClass:"ele-btn-icon",attrs:{type:"primary",icon:"el-icon-search"},on:{click:function(t){return e.$refs.table.reload()}}},[e._v("查询 ")]),l("el-button",{on:{click:e.reload}},[e._v("重置")])],1)])],1)],1),l("ele-data-table",{ref:"table",attrs:{config:e.table,height:"calc(100vh - 260px)","highlight-current-row":""},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.index;return[l("el-table-column",{attrs:{type:"index",index:a,label:"编号",width:"60",align:"center",fixed:"left","show-overflow-tooltip":""}}),l("el-table-column",{attrs:{prop:"title",label:"日志标题",align:"center","show-overflow-tooltip":"","min-width":"100"}}),l("el-table-column",{attrs:{prop:"username",label:"登录账号",align:"center","show-overflow-tooltip":"","min-width":"100"}}),l("el-table-column",{attrs:{prop:"method",label:"请求方式",align:"center","show-overflow-tooltip":"","min-width":"100"}}),l("el-table-column",{attrs:{prop:"module",label:"操作模块",align:"center","show-overflow-tooltip":"","min-width":"100"}}),l("el-table-column",{attrs:{prop:"action",label:"操作方法",align:"center","show-overflow-tooltip":"","min-width":"150"}}),l("el-table-column",{attrs:{prop:"url",label:"操作URL",align:"center","show-overflow-tooltip":"","min-width":"200"}}),l("el-table-column",{attrs:{prop:"param",label:"请求参数",align:"center","show-overflow-tooltip":"","min-width":"200"}}),l("el-table-column",{attrs:{prop:"ip",label:"操作IP",align:"center","show-overflow-tooltip":"","min-width":"130"}}),l("el-table-column",{attrs:{prop:"type",label:"操作类型",align:"center","min-width":"110","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(e){var t=e.row;return[l("ele-dot",{attrs:{type:["","success","warning"][t.type-1],ripple:0===t.type,text:["登录系统","注销系统","操作日志"][t.type-1]}})]}}],null,!0)}),l("el-table-column",{attrs:{prop:"create_time",label:"操作时间",align:"center","min-width":"160","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){var l=t.row;return[e._v(e._s(e._f("toDateString")(l.create_time)))]}}],null,!0)}),l("el-table-column",{attrs:{label:"操作",width:"90px",align:"center",resizable:!1,fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[l("el-link",{attrs:{icon:"el-icon-view",type:"primary",underline:!1},on:{click:function(t){return e.view(a)}}},[e._v("详情")])]}}],null,!0)})]}}])})],1),l("el-dialog",{attrs:{title:"详情",visible:e.showView,width:"600px","destroy-on-close":!0,"lock-scroll":!1},on:{"update:visible":function(t){e.showView=t}}},[l("el-form",{staticClass:"ele-form-detail",attrs:{"label-width":"82px",size:"mini"}},[l("el-row",{attrs:{gutter:15}},[l("el-col",{attrs:{sm:12}},[l("el-form-item",{attrs:{label:"操作账号:",prop:"username"}},[l("div",{staticClass:"ele-text-secondary"},[e._v(e._s(e.viewForm.username))])]),l("el-form-item",{attrs:{label:"请求方式:",prop:"method"}},[l("div",{staticClass:"ele-text-secondary"},[e._v(e._s(e.viewForm.method))])]),l("el-form-item",{attrs:{label:"操作方法:",prop:"action"}},[l("div",{staticClass:"ele-text-secondary"},[e._v(e._s(e.viewForm.action))])]),l("el-form-item",{attrs:{label:"操作类型:",prop:"type"}},[l("el-tag",{attrs:{type:["","success"][e.viewForm.type],size:"mini"}},[e._v(" "+e._s(["登录系统","注销系统"][e.viewForm.type])+" ")])],1)],1),l("el-col",{attrs:{sm:12}},[l("el-form-item",{attrs:{label:"日志标题:",prop:"title"}},[l("div",{staticClass:"ele-text-secondary"},[e._v(e._s(e.viewForm.title))])]),l("el-form-item",{attrs:{label:"操作模块:",prop:"module"}},[l("div",{staticClass:"ele-text-secondary"},[e._v(e._s(e.viewForm.module))])]),l("el-form-item",{attrs:{label:"操作IP:",prop:"ip"}},[l("div",{staticClass:"ele-text-secondary"},[e._v(e._s(e.viewForm.ip))])]),l("el-form-item",{attrs:{label:"操作时间:",prop:"create_time"}},[l("div",{staticClass:"ele-text-secondary"},[e._v(e._s(e._f("toDateString")(e.viewForm.create_time)))])])],1)],1),l("div",{staticStyle:{margin:"12px 0"}},[l("el-divider")],1),l("el-form-item",{attrs:{label:"操作URL:",prop:"url"}},[l("div",{staticClass:"ele-text-secondary"},[e._v(e._s(e.viewForm.url))])]),l("el-form-item",{attrs:{label:"请求参数:",prop:"operParam"}},[l("div",{staticClass:"ele-text-secondary"},[e._v(e._s(e.viewForm.param))])])],1),l("div",{attrs:{slot:"footer"},slot:"footer"},[l("el-button",{on:{click:function(t){e.showView=!1}}},[e._v("关闭")])],1)],1)],1)},r=[],o={name:"SysOperRecord",data:function(){return{table:{url:"/actionlog/index",where:{}},showView:!1,viewForm:{},daterange:"",pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(e){var t=new Date,l=new Date;l.setTime(l.getTime()-6048e5),e.$emit("pick",[l,t])}},{text:"最近一个月",onClick:function(e){var t=new Date,l=new Date;l.setTime(l.getTime()-2592e6),e.$emit("pick",[l,t])}},{text:"最近三个月",onClick:function(e){var t=new Date,l=new Date;l.setTime(l.getTime()-7776e6),e.$emit("pick",[l,t])}}]}}},methods:{view:function(e){this.viewForm=Object.assign({},e),this.showView=!0},onDateRangeChoose:function(){this.daterange?(this.table.where.createTimeStart=this.daterange[0],this.table.where.createTimeEnd=this.daterange[1]):(this.table.where.createTimeStart=null,this.table.where.createTimeEnd=null)},reload:function(){this.daterange=null,this.table.where={},this.$refs.table.reload()}}},i=o,n=l("2877"),s=Object(n["a"])(i,a,r,!1,null,"6eb02fd8",null);t["default"]=s.exports}}]);