5Zux.6e3b4843.js 9.8 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["5Zux"],{"5Zux":function(e,t,a){"use strict";a.r(t);var n=a("QbLZ"),o=a.n(n),l=a("t3Un");var r={name:"Operlog",data:function(){return{loading:!0,ids:[],multiple:!0,total:0,list:[],open:!1,typeOptions:[],statusOptions:[],dateRange:[],form:{},queryParams:{pageNum:1,pageSize:10,title:void 0,operName:void 0,businessType:void 0,status:void 0}}},created:function(){var e=this;this.getList(),this.getDicts("sys_oper_type").then(function(t){e.typeOptions=t.data.data}),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(l.a)({method:"get",params:o()({_gp:"admin.log.operlog",_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)},typeFormat:function(e,t){return this.selectDictLabel(this.typeOptions,e.businessType)},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.operId}),this.multiple=!e.length},handleView:function(e){this.open=!0,this.form=e},handleDelete:function(e){var t=this,a=e.operId||this.ids.join(",");this.$confirm('是否确认删除日志编号为"'+a+'"的数据项?',"警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){return function(e){return Object(l.a)({method:"post",params:{_gp:"admin.log.operlog",_mt:"delete",operIds: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(l.a)({method:"post",params:{_gp:"admin.log.operlog",_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(l.a)({method:"get",params:o()({_gp:"admin.log.operlog",_mt:"export"},e)})}(t)}).then(function(t){e.download(t.data.data)}).catch(function(){})}}},s=a("KHd+"),i=Object(s.a)(r,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:"title"}},[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.title,callback:function(t){e.$set(e.queryParams,"title",t)},expression:"queryParams.title"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"操作人员",prop:"operName"}},[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.operName,callback:function(t){e.$set(e.queryParams,"operName",t)},expression:"queryParams.operName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"类型",prop:"businessType"}},[a("el-select",{staticStyle:{width:"240px"},attrs:{placeholder:"操作类型",clearable:"",size:"small"},model:{value:e.queryParams.businessType,callback:function(t){e.$set(e.queryParams,"businessType",t)},expression:"queryParams.businessType"}},e._l(e.typeOptions,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:"状态",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:operlog:remove"],expression:"['monitor:operlog: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:operlog:remove"],expression:"['monitor:operlog: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:config:export"],expression:"['system:config: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:"operId"}}),e._v(" "),a("el-table-column",{attrs:{label:"系统模块",align:"center",prop:"title"}}),e._v(" "),a("el-table-column",{attrs:{formatter:e.typeFormat,label:"操作类型",align:"center",prop:"businessType"}}),e._v(" "),a("el-table-column",{attrs:{label:"请求方式",align:"center",prop:"requestMethod"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作人员",align:"center",prop:"operName"}}),e._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":!0,label:"主机",align:"center",prop:"operIp",width:"130"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作地点",align:"center",prop:"operLocation"}}),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:"operTime",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e.parseTime(t.row.operTime)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["monitor:operlog:query"],expression:"['monitor:operlog:query']"}],attrs:{size:"mini",type:"text",icon:"el-icon-view"},on:{click:function(a){e.handleView(t.row,t.index)}}},[e._v("详细")])]}}])})],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}}),e._v(" "),a("el-dialog",{attrs:{visible:e.open,title:"操作日志详细",width:"700px"},on:{"update:visible":function(t){e.open=t}}},[a("el-form",{ref:"form",attrs:{model:e.form,"label-width":"100px",size:"mini"}},[a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"操作模块:"}},[e._v(e._s(e.form.title)+" / 修改")]),e._v(" "),a("el-form-item",{attrs:{label:"登录信息:"}},[e._v(e._s(e.form.operName)+" / "+e._s(e.form.operIp)+" / "+e._s(e.form.operLocation))])],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"请求地址:"}},[e._v(e._s(e.form.operUrl))]),e._v(" "),a("el-form-item",{attrs:{label:"请求方式:"}},[e._v(e._s(e.form.requestMethod))])],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"操作方法:"}},[e._v(e._s(e.form.method))])],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"请求参数:"}},[e._v(e._s(e.form.operParam))])],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"返回参数:"}},[e._v(e._s(e.form.jsonResult))])],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"操作状态:"}},[0===e.form.status?a("div",[e._v("正常")]):1===e.form.status?a("div",[e._v("失败")]):e._e()])],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"操作时间:"}},[e._v(e._s(e.parseTime(e.form.operTime)))])],1),e._v(" "),a("el-col",{attrs:{span:24}},[1===e.form.status?a("el-form-item",{attrs:{label:"异常信息:"}},[e._v(e._s(e.form.errorMsg))]):e._e()],1)],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.open=!1}}},[e._v("关 闭")])],1)],1)],1)},[],!1,null,null,null);i.options.__file="index.vue";t.default=i.exports}}]);