Newer
Older
smartwell_front_dz / smartwell / static / js / 8097.6c4927b3.js
wangxitong on 11 Sep 2023 3 KB first commit
"use strict";(self["webpackChunknewfront"]=self["webpackChunknewfront"]||[]).push([[8097],{8097:(t,e,l)=>{l.r(e),l.d(e,{default:()=>c});l(74916),l(64765),l(73210);var s=function(){var t=this,e=t._self._c;return e("app-container",[e("search-area",{attrs:{size:"small"},on:{search:t.search}},[e("search-item",[e("el-input",{attrs:{size:"small",placeholder:"日志名称",clearable:""},model:{value:t.listQuery.keywords,callback:function(e){t.$set(t.listQuery,"keywords","string"===typeof e?e.trim():e)},expression:"listQuery.keywords"}})],1),e("search-item",[e("el-date-picker",{attrs:{type:"datetime",size:"small","value-format":"yyyy-MM-dd HH:mm:ss",placeholder:"选择开始时间"},model:{value:t.listQuery.beginTime,callback:function(e){t.$set(t.listQuery,"beginTime",e)},expression:"listQuery.beginTime"}})],1),e("search-item",[e("el-date-picker",{attrs:{type:"datetime",size:"small","value-format":"yyyy-MM-dd HH:mm:ss",placeholder:"选择结束时间"},model:{value:t.listQuery.endTime,callback:function(e){t.$set(t.listQuery,"endTime",e)},expression:"listQuery.endTime"}})],1),e("template",{slot:"btns"},[t.hasPerm("/sys/log/biz/delLog")?e("el-button",{staticClass:"filter-item",attrs:{size:"small",type:"info",icon:"el-icon-delete"},on:{click:t.cleanAll}},[t._v(" 清空日志 ")]):t._e()],1)],2),e("normal-table",{attrs:{data:t.list,total:t.total,columns:t.columns,query:t.listQuery,"list-loading":t.listLoading},on:{change:t.changePage}},[e("template",{slot:"columns"},[e("el-table-column",{attrs:{label:"操作",width:"70",align:"center"},scopedSlots:t._u([{key:"default",fn:function(l){return[e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.detail(l.row)}}},[t._v(" 详情 ")])]}}])})],1)],2)],1)},i=[],n=(l(91058),l(96919));const a={name:"ListLog",data:function(){return{listQuery:{keywords:"",beginTime:"",endTime:"",offset:1,limit:20,sort:"",order:""},columns:[{text:"日志名称",value:"logName",width:150},{text:"用户",value:"userName"},{text:"时间",value:"createTime"},{text:"详细信息",value:"message"}],list:[],total:20,logTypeList:null,listLoading:!0,dialogFormVisible:!1,dialogStatus:""}},created:function(){this.fetchData()},methods:{detail:function(t){var e=this;(0,n.aK)(t.id).then((function(t){200===t.code&&e.$alert(t.data,"详情",{confirmButtonText:"确定"})}))},cleanAll:function(){var t=this;this.$confirm("确定要清空全部日志吗?","确认操作",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){(0,n.Oy)(t.query).then((function(e){200===e.code&&(t.$message.success("删除成功"),t.list=null,t.total=0)}))}))},search:function(){this.fetchData(!1)},fetchData:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.listLoading=!0,e||(this.listQuery.offset=1),(0,n.mV)(this.listQuery).then((function(e){t.list=e.data.rows,t.total=parseInt(e.data.total),t.listLoading=!1}))},fetchLogType:function(){var t=this;(0,n.Ke)(this.listQuery).then((function(e){t.logTypeList=e.data}))},changePage:function(t){t&&t.size&&(this.listQuery.limit=t.size),t&&t.page&&(this.listQuery.offset=t.page),this.fetchData()}}},o=a;var r=l(1001),u=(0,r.Z)(o,s,i,!1,null,"3dfeeb90",null);const c=u.exports},96919:(t,e,l)=>{l.d(e,{E$:()=>d,HI:()=>a,Ke:()=>r,Mg:()=>o,Oy:()=>u,Rc:()=>c,aK:()=>n,mV:()=>i,wf:()=>m});var s=l(84471);function i(t){return(0,s.Z)({url:"sys/log/biz/list",method:"get",params:t})}function n(t){return(0,s.Z)({url:"sys/log/biz/detail/"+t,method:"get"})}function a(t){return(0,s.Z)({url:"sys/log/error/list",method:"get",params:t})}function o(t){return(0,s.Z)({url:"sys/log/error/detail/"+t,method:"get"})}function r(){return(0,s.Z)({url:"sys/dict/code/logType",method:"get"})}function u(){return(0,s.Z)({url:"sys/log/biz/delLog",method:"post"})}function c(){return(0,s.Z)({url:"sys/log/error/delLog",method:"post"})}function d(t){return(0,s.Z)({url:"sys/loginLog/list",method:"get",params:t})}function m(){return(0,s.Z)({url:"sys/loginLog/delLoginLog",method:"post"})}}}]);