沙钢智慧能源系统前端代码
houzhongjian
2024-10-09 314507f8ddadd9c66e98d260c3b2a5dad1a04015
1
import{aV as Y,d as L,Q,r as s,A as W,b as X,a1 as Z,o as d,c as E,k as e,B as r,a,a2 as g,F as M,i as $,a3 as j,N as v,g as b,O as c,P as x,C as G,D as V,a7 as J,S as ee,$ as le,R as ae,T as re,U as te,V as oe,W as pe,X as ne,Y as ue,Z as ie}from"./index-BP6bNRoi.js";import{_ as se}from"./index.vue_vue_type_script_setup_true_lang-sJUY8qtC.js";import{_ as de}from"./DictTag.vue_vue_type_script_lang-DwXPHgid.js";import{_ as ce}from"./ContentWrap.vue_vue_type_script_setup_true_lang-CR_2gECF.js";import{d as me}from"./download-e0EdwhTv.js";import{f as fe}from"./formatTime-DwR9f7DP.js";import{_ as ge}from"./ApiAccessLogDetail.vue_vue_type_script_setup_true_lang-ClbnDPKP.js";import"./index-BZESAUPP.js";import"./color-DXkOL5Tu.js";import"./el-card-bU92WWV4.js";import"./Dialog.vue_vue_type_style_index_0_lang-DFckl8Er.js";import"./el-descriptions-item-BuMEVwqR.js";const be=L({name:"InfraApiAccessLog",__name:"index",setup(_e){const A=Q(),_=s(!0),T=s(0),U=s([]),o=W({pageNo:1,pageSize:10,userId:null,userType:null,applicationName:null,requestUrl:null,duration:null,resultCode:null,beginTime:[]}),C=s(),y=s(!1),w=async()=>{_.value=!0;try{const t=await(i=o,Y.get({url:"/infra/api-access-log/page",params:i}));U.value=t.list,T.value=t.total}finally{_.value=!1}var i},u=()=>{o.pageNo=1,w()},S=()=>{C.value.resetFields(),u()},N=s(),q=async()=>{try{await A.exportConfirm(),y.value=!0;const t=await(i=o,Y.download({url:"/infra/api-access-log/export-excel",params:i}));me.excel(t,"API \u8BBF\u95EE\u65E5\u5FD7.xls")}catch{}finally{y.value=!1}var i};return X(()=>{w()}),(i,t)=>{const m=J,n=ee,D=le,F=ae,K=re,h=te,f=oe,z=pe,k=ce,p=ne,I=de,H=ue,O=se,P=Z("hasPermi"),B=ie;return d(),E(M,null,[e(k,null,{default:r(()=>[e(z,{class:"-mb-15px",model:a(o),ref_key:"queryFormRef",ref:C,inline:!0,"label-width":"68px"},{default:r(()=>[e(n,{label:"\u7528\u6237\u7F16\u53F7",prop:"userId"},{default:r(()=>[e(m,{modelValue:a(o).userId,"onUpdate:modelValue":t[0]||(t[0]=l=>a(o).userId=l),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u7F16\u53F7",clearable:"",onKeyup:g(u,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(n,{label:"\u7528\u6237\u7C7B\u578B",prop:"userType"},{default:r(()=>[e(F,{modelValue:a(o).userType,"onUpdate:modelValue":t[1]||(t[1]=l=>a(o).userType=l),placeholder:"\u8BF7\u9009\u62E9\u7528\u6237\u7C7B\u578B",clearable:"",class:"!w-240px"},{default:r(()=>[(d(!0),E(M,null,$(a(j)(a(v).USER_TYPE),l=>(d(),b(D,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(n,{label:"\u5E94\u7528\u540D",prop:"applicationName"},{default:r(()=>[e(m,{modelValue:a(o).applicationName,"onUpdate:modelValue":t[2]||(t[2]=l=>a(o).applicationName=l),placeholder:"\u8BF7\u8F93\u5165\u5E94\u7528\u540D",clearable:"",onKeyup:g(u,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(n,{label:"\u8BF7\u6C42\u65F6\u95F4",prop:"beginTime"},{default:r(()=>[e(K,{modelValue:a(o).beginTime,"onUpdate:modelValue":t[3]||(t[3]=l=>a(o).beginTime=l),"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(n,{label:"\u6267\u884C\u65F6\u957F",prop:"duration"},{default:r(()=>[e(m,{modelValue:a(o).duration,"onUpdate:modelValue":t[4]||(t[4]=l=>a(o).duration=l),placeholder:"\u8BF7\u8F93\u5165\u6267\u884C\u65F6\u957F",clearable:"",onKeyup:g(u,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(n,{label:"\u7ED3\u679C\u7801",prop:"resultCode"},{default:r(()=>[e(m,{modelValue:a(o).resultCode,"onUpdate:modelValue":t[5]||(t[5]=l=>a(o).resultCode=l),placeholder:"\u8BF7\u8F93\u5165\u7ED3\u679C\u7801",clearable:"",onKeyup:g(u,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(n,null,{default:r(()=>[e(f,{onClick:u},{default:r(()=>[e(h,{icon:"ep:search",class:"mr-5px"}),c(" \u641C\u7D22")]),_:1}),e(f,{onClick:S},{default:r(()=>[e(h,{icon:"ep:refresh",class:"mr-5px"}),c(" \u91CD\u7F6E")]),_:1}),x((d(),b(f,{type:"success",plain:"",onClick:q,loading:a(y)},{default:r(()=>[e(h,{icon:"ep:download",class:"mr-5px"}),c(" \u5BFC\u51FA ")]),_:1},8,["loading"])),[[P,["infra:api-access-log:export"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(k,null,{default:r(()=>[x((d(),b(H,{data:a(U)},{default:r(()=>[e(p,{label:"\u65E5\u5FD7\u7F16\u53F7",align:"center",prop:"id",width:"100",fix:"right"}),e(p,{label:"\u7528\u6237\u7F16\u53F7",align:"center",prop:"userId"}),e(p,{label:"\u7528\u6237\u7C7B\u578B",align:"center",prop:"userType"},{default:r(l=>[e(I,{type:a(v).USER_TYPE,value:l.row.userType},null,8,["type","value"])]),_:1}),e(p,{label:"\u5E94\u7528\u540D",align:"center",prop:"applicationName",width:"150"}),e(p,{label:"\u8BF7\u6C42\u65B9\u6CD5",align:"center",prop:"requestMethod",width:"80"}),e(p,{label:"\u8BF7\u6C42\u5730\u5740",align:"center",prop:"requestUrl",width:"500"}),e(p,{label:"\u8BF7\u6C42\u65F6\u95F4",align:"center",prop:"beginTime",width:"180"},{default:r(l=>[G("span",null,V(a(fe)(l.row.beginTime)),1)]),_:1}),e(p,{label:"\u6267\u884C\u65F6\u957F",align:"center",prop:"duration",width:"180"},{default:r(l=>[c(V(l.row.duration)+" ms ",1)]),_:1}),e(p,{label:"\u64CD\u4F5C\u7ED3\u679C",align:"center",prop:"status"},{default:r(l=>[c(V(l.row.resultCode===0?"\u6210\u529F":"\u5931\u8D25("+l.row.resultMsg+")"),1)]),_:1}),e(p,{label:"\u64CD\u4F5C\u6A21\u5757",align:"center",prop:"operateModule",width:"180"}),e(p,{label:"\u64CD\u4F5C\u540D",align:"center",prop:"operateName",width:"180"}),e(p,{label:"\u64CD\u4F5C\u7C7B\u578B",align:"center",prop:"operateType"},{default:r(l=>[e(I,{type:a(v).INFRA_OPERATE_TYPE,value:l.row.operateType},null,8,["type","value"])]),_:1}),e(p,{label:"\u64CD\u4F5C",align:"center",fixed:"right",width:"60"},{default:r(l=>[x((d(),b(f,{link:"",type:"primary",onClick:ye=>{return R=l.row,void N.value.open(R);var R}},{default:r(()=>[c(" \u8BE6\u7EC6 ")]),_:2},1032,["onClick"])),[[P,["infra:api-access-log:query"]]])]),_:1})]),_:1},8,["data"])),[[B,a(_)]]),e(O,{total:a(T),page:a(o).pageNo,"onUpdate:page":t[6]||(t[6]=l=>a(o).pageNo=l),limit:a(o).pageSize,"onUpdate:limit":t[7]||(t[7]=l=>a(o).pageSize=l),onPagination:w},null,8,["total","page","limit"])]),_:1}),e(ge,{ref_key:"detailRef",ref:N},null,512)],64)}}});export{be as default};