lepu-test-platform-web/dist/static/js/6.ecbd846d8b8a22d497cb.js

2 lines
7.9 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

webpackJsonp([6],{"3cEi":function(e,t){},"U+jS":function(e,t){},ZG6o:function(e,t){},zX1F:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=o("mvHQ"),n=o.n(a),l={data:function(){return{queryInfo:{operation:"",ip:"",createTime:"",pageNum:1,pageSize:10},logList:[],currpage:1,total:0,loading:!1}},mounted:function(){},created:function(){this.getLogList()},methods:{selectLogList:function(){this.queryInfo.pageNum=1,this.total=0,this.getLogList()},getLogList:function(){var e=this;this.loading=!0,null==this.queryInfo.createTime&&(this.queryInfo.createTime=""),this.$api.log.queryAllLogInfo(n()(this.queryInfo)).then(function(t){e.loading=!1,e.logList=t.data.data,e.total=t.data.count,e.queryInfo.pageNum=1}).catch(function(){e.loading=!1})},handleSizeChange:function(e){this.queryInfo.pageSize=e,this.getLogList()},handleCurrentChange:function(e){this.queryInfo.pageNum=e,this.getLogList()}}},r={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"sys-log-box"},[o("el-form",{staticClass:"item-form-inline",attrs:{inline:!0}},[o("el-form-item",{attrs:{label:"操作内容"}},[o("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入操作内容",clearable:""},model:{value:e.queryInfo.operation,callback:function(t){e.$set(e.queryInfo,"operation",t)},expression:"queryInfo.operation"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"操作IP"}},[o("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入IP地址",clearable:""},model:{value:e.queryInfo.ip,callback:function(t){e.$set(e.queryInfo,"ip",t)},expression:"queryInfo.ip"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"操作时间"}},[[o("div",{staticClass:"block"},[o("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"选择日期时间"},model:{value:e.queryInfo.createTime,callback:function(t){e.$set(e.queryInfo,"createTime",t)},expression:"queryInfo.createTime"}})],1)]],2),e._v(" "),o("el-form-item",[o("el-button",{attrs:{type:"primary"},on:{click:e.selectLogList}},[e._v("查询")])],1)],1),e._v(" "),o("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.logList.slice((e.currpage-1)*e.queryInfo.pageSize,e.currpage*e.queryInfo.pageSize),border:"",fit:!0}},[o("el-table-column",{attrs:{label:"序号",type:"index",align:"center",width:"80"}}),e._v(" "),o("el-table-column",{attrs:{label:"操作内容",prop:"operation",width:"260"}}),e._v(" "),o("el-table-column",{attrs:{label:"方法名",prop:"method",width:"200","show-overflow-tooltip":""}}),e._v(" "),o("el-table-column",{attrs:{label:"参数",prop:"params",width:"200","show-overflow-tooltip":""}}),e._v(" "),o("el-table-column",{attrs:{label:"耗时",prop:"time",width:"100"}}),e._v(" "),o("el-table-column",{attrs:{label:"IP地址",prop:"ip"}}),e._v(" "),o("el-table-column",{attrs:{label:"操作时间",prop:"createTime",width:"180"}}),e._v(" "),o("el-table-column",{attrs:{label:"请求类型",prop:"requestType",width:"120"}}),e._v(" "),o("el-table-column",{attrs:{label:"接口地址",prop:"interfacePath",width:"300","show-overflow-tooltip":""}})],1),e._v(" "),o("el-pagination",{attrs:{"current-page":e.currpage,"page-sizes":[5,10,20,30],"page-size":e.queryInfo.pageSize,layout:"prev, pager, next, sizes, total, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)},staticRenderFns:[]};var i={data:function(){return{websocket:"",queryInfo:{ip:window.location.hostname,port:"localhost"==window.location.hostname?"9527":"19527",logType:"",logNum:"",logKeyword:""},queryInfoRules:{logType:[{required:!0,message:"请选择日志类型",trigger:"blur"}],logNum:[{required:!0,message:"请输入日志行数",trigger:"blur"},{validator:function(e,t,o){if(/^(?!0)(?:[0-9]{1,4}|10000)$/.test(t))return o();o(new Error("请输入1~10000之间的整数"))},trigger:"blur",max:10}],logKeyword:[{required:!1,message:"请输入关键字",trigger:"blur"}]},loadingShowFlag:!1}},mounted:function(){},created:function(){},destroyed:function(){this.websocket&&this.websocket.close()},methods:{rollBottom:function(){var e=document.getElementById("rtLogContainer");e.scrollTop(e[0].scrollHeight)},clearScreen:function(){var e=document.getElementById("rtLogContainerDiv");e.innerHTML="",e.style.padding="0px",this.loadingShowFlag=!1},getRequestUrl:function(){var e="undifined";return this.queryInfo.logKeyword&&(e=this.queryInfo.logKeyword),"ws://"+this.queryInfo.ip+":"+this.queryInfo.port+"/websocket/rtLog/"+this.queryInfo.logType+"/"+this.queryInfo.logNum+"/"+e},readLogInfo:function(){var e=this;this.$refs.queryInfoRef.validate(function(t){if(t){var o=void 0,a=e;"WebSocket"in window?(o=new WebSocket(e.getRequestUrl()),e.websocket=o):e.$notify({message:"请使用最新版本的谷歌浏览器!",type:"warning"}),o.onerror=function(){a.$notify({message:"WebSocket连接失败",type:"error"})},o.onopen=function(){a.loadingShowFlag=!0},o.onmessage=function(e){var t;e.data?((t=document.getElementById("rtLogContainerDiv")).style.padding="10px",t.style.overflow="auto",t.innerHTML+=e.data,document.getElementById("rtLogContainerBottom").scrollIntoView()):(t=document.getElementById("rtLogContainerDiv")).innerHTML="暂无数据"},o.onclose=function(){}}})}}},s={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"rt-log-box"},[o("div",{staticClass:"rt-operator-area"},[o("el-form",{ref:"queryInfoRef",staticClass:"demo-form-inline",attrs:{model:e.queryInfo,inline:!0,rules:e.queryInfoRules}},[o("el-form-item",{attrs:{label:"日志类型",prop:"logType"}},[o("el-select",{attrs:{clearable:"",placeholder:"请选择"},model:{value:e.queryInfo.logType,callback:function(t){e.$set(e.queryInfo,"logType",t)},expression:"queryInfo.logType"}},[o("el-option",{attrs:{value:"INFO"}},[e._v("INFO")]),e._v(" "),o("el-option",{attrs:{value:"ERROR"}},[e._v("ERROR")])],1)],1),e._v(" "),o("el-form-item",{attrs:{label:"日志行数",prop:"logNum"}},[o("el-input",{attrs:{placeholder:"请输入1~10000之间的整数",clearable:""},model:{value:e.queryInfo.logNum,callback:function(t){e.$set(e.queryInfo,"logNum",t)},expression:"queryInfo.logNum"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"关键字",prop:"logKeyword"}},[o("el-input",{attrs:{placeholder:"请输入关键字",clearable:""},model:{value:e.queryInfo.logKeyword,callback:function(t){e.$set(e.queryInfo,"logKeyword",t)},expression:"queryInfo.logKeyword"}})],1),e._v(" "),o("el-button",{attrs:{type:"primary"},on:{click:e.readLogInfo}},[e._v("查询")]),e._v(" "),o("el-button",{on:{click:e.clearScreen}},[e._v("清屏")])],1)],1),e._v(" "),o("div",{staticClass:"rt-log-container",attrs:{id:"rtLogContainer"}},[o("div",{staticClass:"rt-log-container-div",attrs:{id:"rtLogContainerDiv"}}),e._v(" "),e.loadingShowFlag?o("div",{staticClass:"rt-log-container-bottom",attrs:{id:"rtLogContainerBottom"}},[o("i",{staticClass:"el-icon-loading"})]):e._e()])])},staticRenderFns:[]};var c={data:function(){return{activeName:"system",load:{system:!0,service:!1},pageName:"log"}},mounted:function(){},created:function(){},methods:{handleClick:function(e,t){!1===this.load[e.name]&&(this.load[e.name]=!0)}},components:{SystemLog:o("VU/8")(l,r,!1,function(e){o("3cEi")},"data-v-56f583ee",null).exports,RealTimeLog:o("VU/8")(i,s,!1,function(e){o("ZG6o")},"data-v-1f4c41e0",null).exports}},u={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"log-box"},[o("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[o("el-tab-pane",{attrs:{label:"系统日志",name:"system"}},[o("system-log")],1),e._v(" "),o("el-tab-pane",{attrs:{label:"服务日志",name:"service"}},[o("real-time-log")],1)],1)],1)},staticRenderFns:[]};var d=o("VU/8")(c,u,!1,function(e){o("U+jS")},"data-v-e05dcea4",null);t.default=d.exports}});
//# sourceMappingURL=6.ecbd846d8b8a22d497cb.js.map