index-e73aafc3.js 6.4 KB

1
  1. import{am as D,d as G,r as i,e as J,q as X,M as O,o as d,c as P,f as e,w as r,a as l,N as f,F as Y,v as Q,x as y,y as c,z as v,g as W,t as x,R as Z,C as $,A as ee,B as ae,D as le,j as te,G as re,H as oe,I as ne,J as se,K as ue,_ as pe,__tla as ie}from"./index-8dc1e40a.js";import{_ as de,__tla as ce}from"./index-64aeaa78.js";import{_ as _e,__tla as me}from"./DictTag-85aade2b.js";import{_ as fe,__tla as ye}from"./ContentWrap-0aca5216.js";import{a as ge,D as q,__tla as be}from"./dict-f13a3c8f.js";import{d as he}from"./download-20922b56.js";import{f as we,__tla as ve}from"./formatTime-8a155b2e.js";import xe,{__tla as Ve}from"./ApiAccessLogDetail-0d8ec73e.js";import{u as Te,__tla as Ue}from"./useMessage-7a27dd80.js";import{__tla as Ce}from"./index-803dbf9a.js";import"./color-6e929987.js";import{__tla as Ne}from"./el-card-18df90f0.js";import{__tla as ke}from"./Dialog-41802231.js";import{__tla as Ie}from"./el-descriptions-item-bf830d0d.js";let K,De=Promise.all([(()=>{try{return ie}catch{}})(),(()=>{try{return ce}catch{}})(),(()=>{try{return me}catch{}})(),(()=>{try{return ye}catch{}})(),(()=>{try{return be}catch{}})(),(()=>{try{return ve}catch{}})(),(()=>{try{return Ve}catch{}})(),(()=>{try{return Ue}catch{}})(),(()=>{try{return Ce}catch{}})(),(()=>{try{return Ne}catch{}})(),(()=>{try{return ke}catch{}})(),(()=>{try{return Ie}catch{}})()]).then(async()=>{K=pe(G({name:"InfraApiAccessLog",__name:"index",setup(Pe){const R=Te(),g=i(!0),V=i(0),T=i([]),o=J({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,D.get({url:"/infra/api-access-log/page",params:p}));T.value=t.list,V.value=t.total}finally{g.value=!1}var p},u=()=>{o.pageNo=1,h()},z=()=>{U.value.resetFields(),u()},C=i(),A=async()=>{try{await R.exportConfirm(),b.value=!0;const t=await(p=o,D.download({url:"/infra/api-access-log/export-excel",params:p}));he.excel(t,"API \u8BBF\u95EE\u65E5\u5FD7.xls")}catch{}finally{b.value=!1}var p};return X(()=>{h()}),(p,t)=>{const _=Z,s=$,M=ee,S=ae,E=le,w=te,m=re,H=oe,N=fe,n=ne,F=_e,L=se,j=de,k=O("hasPermi"),B=ue;return d(),P(Y,null,[e(N,null,{default:r(()=>[e(H,{class:"-mb-15px",model:l(o),ref_key:"queryFormRef",ref:U,inline:!0,"label-width":"68px"},{default:r(()=>[e(s,{label:"\u7528\u6237\u7F16\u53F7",prop:"userId"},{default:r(()=>[e(_,{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(u,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(s,{label:"\u7528\u6237\u7C7B\u578B",prop:"userType"},{default:r(()=>[e(S,{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),P(Y,null,Q(l(ge)(l(q).USER_TYPE),a=>(d(),y(M,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(s,{label:"\u5E94\u7528\u540D",prop:"applicationName"},{default:r(()=>[e(_,{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(u,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(s,{label:"\u8BF7\u6C42\u65F6\u95F4",prop:"beginTime"},{default:r(()=>[e(E,{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(s,{label:"\u6267\u884C\u65F6\u957F",prop:"duration"},{default:r(()=>[e(_,{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(u,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(s,{label:"\u7ED3\u679C\u7801",prop:"resultCode"},{default:r(()=>[e(_,{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(u,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(s,null,{default:r(()=>[e(m,{onClick:u},{default:r(()=>[e(w,{icon:"ep:search",class:"mr-5px"}),c(" \u641C\u7D22")]),_:1}),e(m,{onClick:z},{default:r(()=>[e(w,{icon:"ep:refresh",class:"mr-5px"}),c(" \u91CD\u7F6E")]),_:1}),v((d(),y(m,{type:"success",plain:"",onClick:A,loading:l(b)},{default:r(()=>[e(w,{icon:"ep:download",class:"mr-5px"}),c(" \u5BFC\u51FA ")]),_:1},8,["loading"])),[[k,["infra:api-error-log:export"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(N,null,{default:r(()=>[v((d(),y(L,{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(F,{type:l(q).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=>[W("span",null,x(l(we)(a.row.beginTime)),1)]),_:1}),e(n,{label:"\u6267\u884C\u65F6\u957F",align:"center",prop:"duration",width:"180"},{default:r(a=>[c(x(a.row.duration)+" ms ",1)]),_:1}),e(n,{label:"\u64CD\u4F5C\u7ED3\u679C",align:"center",prop:"status"},{default:r(a=>[c(x(a.row.resultCode===0?"\u6210\u529F":"\u5931\u8D25("+a.row.resultMsg+")"),1)]),_:1}),e(n,{label:"\u64CD\u4F5C",align:"center"},{default:r(a=>[v((d(),y(m,{link:"",type:"primary",onClick:Ye=>{return I=a.row,void C.value.open(I);var I}},{default:r(()=>[c(" \u8BE6\u7EC6 ")]),_:2},1032,["onClick"])),[[k,["infra:api-access-log:query"]]])]),_:1})]),_:1},8,["data"])),[[B,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)}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/infra/apiAccessLog/index.vue"]])});export{De as __tla,K as default};