index-462e58b5.js 6.5 KB

1
  1. import{az as E,d as Q,r as i,x as W,b as X,a3 as j,o as d,c as S,f as e,A as r,a as l,a4 as f,F as Y,Q as G,C as y,D as _,k as x,B as O,E as v,a8 as Z,U as $,R as ee,S as ae,I as le,_ as te,J as re,V as oe,W as ne,X as ue,Y as se,__tla as pe}from"./index-f65577b8.js";import{_ as ie,__tla as de}from"./index.vue_vue_type_script_setup_true_lang-53598c8e.js";import{_ as _e,__tla as ce}from"./DictTag.vue_vue_type_script_lang-48f8deb5.js";import{_ as me,__tla as fe}from"./ContentWrap.vue_vue_type_script_setup_true_lang-9fbbd655.js";import{a as ye,D,__tla as ge}from"./dict-fa3ffbd2.js";import{d as be}from"./download-20922b56.js";import{f as he,__tla as we}from"./formatTime-411ed1a1.js";import{_ as xe,__tla as ve}from"./ApiAccessLogDetail.vue_vue_type_script_setup_true_lang-509dce1c.js";import{u as Ve,__tla as Te}from"./useMessage-4dbf0ae4.js";import{__tla as Ue}from"./index-1896261a.js";import"./color-6e929987.js";import{__tla as Ce}from"./el-card-ab53e6aa.js";import{__tla as ke}from"./Dialog-bd3317a7.js";import"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as Ne}from"./el-descriptions-item-3096f9fe.js";let P,Ie=Promise.all([(()=>{try{return pe}catch{}})(),(()=>{try{return de}catch{}})(),(()=>{try{return ce}catch{}})(),(()=>{try{return fe}catch{}})(),(()=>{try{return ge}catch{}})(),(()=>{try{return we}catch{}})(),(()=>{try{return ve}catch{}})(),(()=>{try{return Te}catch{}})(),(()=>{try{return Ue}catch{}})(),(()=>{try{return Ce}catch{}})(),(()=>{try{return ke}catch{}})(),(()=>{try{return Ne}catch{}})()]).then(async()=>{P=Q({name:"InfraApiAccessLog",__name:"index",setup(Ee){const q=Ve(),g=i(!0),V=i(0),T=i([]),o=W({pageNo:1,pageSize:10,userId:null,userType:null,applicationName:null,requestUrl:null,duration:null,resultCode:null,beginTime:[]}),U=i(),b=i(!1),h=async()=>{g.value=!0;try{const t=await(p=o,E.get({url:"/infra/api-access-log/page",params:p}));T.value=t.list,V.value=t.total}finally{g.value=!1}var p},s=()=>{o.pageNo=1,h()},M=()=>{U.value.resetFields(),s()},C=i(),R=async()=>{try{await q.exportConfirm(),b.value=!0;const t=await(p=o,E.download({url:"/infra/api-access-log/export-excel",params:p}));be.excel(t,"API \u8BBF\u95EE\u65E5\u5FD7.xls")}catch{}finally{b.value=!1}var p};return X(()=>{h()}),(p,t)=>{const c=Z,u=$,z=ee,A=ae,K=le,w=te,m=re,F=oe,k=me,n=ne,H=_e,B=ue,J=ie,N=j("hasPermi"),L=se;return d(),S(Y,null,[e(k,null,{default:r(()=>[e(F,{class:"-mb-15px",model:l(o),ref_key:"queryFormRef",ref:U,inline:!0,"label-width":"68px"},{default:r(()=>[e(u,{label:"\u7528\u6237\u7F16\u53F7",prop:"userId"},{default:r(()=>[e(c,{modelValue:l(o).userId,"onUpdate:modelValue":t[0]||(t[0]=a=>l(o).userId=a),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u7F16\u53F7",clearable:"",onKeyup:f(s,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u7528\u6237\u7C7B\u578B",prop:"userType"},{default:r(()=>[e(A,{modelValue:l(o).userType,"onUpdate:modelValue":t[1]||(t[1]=a=>l(o).userType=a),placeholder:"\u8BF7\u9009\u62E9\u7528\u6237\u7C7B\u578B",clearable:"",class:"!w-240px"},{default:r(()=>[(d(!0),S(Y,null,G(l(ye)(l(D).USER_TYPE),a=>(d(),y(z,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(u,{label:"\u5E94\u7528\u540D",prop:"applicationName"},{default:r(()=>[e(c,{modelValue:l(o).applicationName,"onUpdate:modelValue":t[2]||(t[2]=a=>l(o).applicationName=a),placeholder:"\u8BF7\u8F93\u5165\u5E94\u7528\u540D",clearable:"",onKeyup:f(s,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u8BF7\u6C42\u65F6\u95F4",prop:"beginTime"},{default:r(()=>[e(K,{modelValue:l(o).beginTime,"onUpdate:modelValue":t[3]||(t[3]=a=>l(o).beginTime=a),"value-format":"YYYY-MM-DD HH:mm:ss",type:"daterange","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")],class:"!w-240px"},null,8,["modelValue","default-time"])]),_:1}),e(u,{label:"\u6267\u884C\u65F6\u957F",prop:"duration"},{default:r(()=>[e(c,{modelValue:l(o).duration,"onUpdate:modelValue":t[4]||(t[4]=a=>l(o).duration=a),placeholder:"\u8BF7\u8F93\u5165\u6267\u884C\u65F6\u957F",clearable:"",onKeyup:f(s,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u7ED3\u679C\u7801",prop:"resultCode"},{default:r(()=>[e(c,{modelValue:l(o).resultCode,"onUpdate:modelValue":t[5]||(t[5]=a=>l(o).resultCode=a),placeholder:"\u8BF7\u8F93\u5165\u7ED3\u679C\u7801",clearable:"",onKeyup:f(s,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(u,null,{default:r(()=>[e(m,{onClick:s},{default:r(()=>[e(w,{icon:"ep:search",class:"mr-5px"}),_(" \u641C\u7D22")]),_:1}),e(m,{onClick:M},{default:r(()=>[e(w,{icon:"ep:refresh",class:"mr-5px"}),_(" \u91CD\u7F6E")]),_:1}),x((d(),y(m,{type:"success",plain:"",onClick:R,loading:l(b)},{default:r(()=>[e(w,{icon:"ep:download",class:"mr-5px"}),_(" \u5BFC\u51FA ")]),_:1},8,["loading"])),[[N,["infra:api-error-log:export"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(k,null,{default:r(()=>[x((d(),y(B,{data:l(T)},{default:r(()=>[e(n,{label:"\u65E5\u5FD7\u7F16\u53F7",align:"center",prop:"id"}),e(n,{label:"\u7528\u6237\u7F16\u53F7",align:"center",prop:"userId"}),e(n,{label:"\u7528\u6237\u7C7B\u578B",align:"center",prop:"userType"},{default:r(a=>[e(H,{type:l(D).USER_TYPE,value:a.row.userType},null,8,["type","value"])]),_:1}),e(n,{label:"\u5E94\u7528\u540D",align:"center",prop:"applicationName"}),e(n,{label:"\u8BF7\u6C42\u65B9\u6CD5",align:"center",prop:"requestMethod",width:"80"}),e(n,{label:"\u8BF7\u6C42\u5730\u5740",align:"center",prop:"requestUrl",width:"250"}),e(n,{label:"\u8BF7\u6C42\u65F6\u95F4",align:"center",prop:"beginTime",width:"180"},{default:r(a=>[O("span",null,v(l(he)(a.row.beginTime)),1)]),_:1}),e(n,{label:"\u6267\u884C\u65F6\u957F",align:"center",prop:"duration",width:"180"},{default:r(a=>[_(v(a.row.duration)+" ms ",1)]),_:1}),e(n,{label:"\u64CD\u4F5C\u7ED3\u679C",align:"center",prop:"status"},{default:r(a=>[_(v(a.row.resultCode===0?"\u6210\u529F":"\u5931\u8D25("+a.row.resultMsg+")"),1)]),_:1}),e(n,{label:"\u64CD\u4F5C",align:"center"},{default:r(a=>[x((d(),y(m,{link:"",type:"primary",onClick:Se=>{return I=a.row,void C.value.open(I);var I}},{default:r(()=>[_(" \u8BE6\u7EC6 ")]),_:2},1032,["onClick"])),[[N,["infra:api-access-log:query"]]])]),_:1})]),_:1},8,["data"])),[[L,l(g)]]),e(J,{total:l(V),page:l(o).pageNo,"onUpdate:page":t[6]||(t[6]=a=>l(o).pageNo=a),limit:l(o).pageSize,"onUpdate:limit":t[7]||(t[7]=a=>l(o).pageSize=a),onPagination:h},null,8,["total","page","limit"])]),_:1}),e(xe,{ref_key:"detailRef",ref:C},null,512)],64)}}})});export{Ie as __tla,P as default};