import{aV as N,d as Z,Q as $,r as c,A as j,b as J,a1 as ee,o as s,c as I,k as e,B as t,a as l,a2 as F,F as R,i as z,a3 as G,N as x,g as n,O as m,P as _,h as L,a7 as ae,S as le,$ as re,R as te,T as oe,U as pe,V as se,W as ie,X as ue,Y as ne,Z as de}from"./index-BP6bNRoi.js";import{_ as ce}from"./index.vue_vue_type_script_setup_true_lang-sJUY8qtC.js";import{_ as me}from"./DictTag.vue_vue_type_script_lang-DwXPHgid.js";import{_ as fe}from"./ContentWrap.vue_vue_type_script_setup_true_lang-CR_2gECF.js";import{d as _e}from"./formatTime-DwR9f7DP.js";import{d as ye}from"./download-e0EdwhTv.js";import{_ as ge}from"./ApiErrorLogDetail.vue_vue_type_script_setup_true_lang-BMCsNwOK.js";import{I as y}from"./constants-CuOBQ73z.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 we=Z({name:"InfraApiErrorLog",__name:"index",setup(be){const S=$(),h=c(!0),V=c(0),U=c([]),o=j({pageNo:1,pageSize:10,userId:null,userType:null,applicationName:null,requestUrl:null,processStatus:null,exceptionTime:[]}),C=c(),T=c(!1),g=async()=>{h.value=!0;try{const r=await(i=o,N.get({url:"/infra/api-error-log/page",params:i}));U.value=r.list,V.value=r.total}finally{h.value=!1}var i},w=()=>{o.pageNo=1,g()},M=()=>{C.value.resetFields(),w()},E=c(),O=async(i,r)=>{try{const f=r===y.DONE?"\u5DF2\u5904\u7406":"\u5DF2\u5FFD\u7565";await S.confirm("\u786E\u8BA4\u6807\u8BB0\u4E3A"+f+"?"),await((u,b)=>N.put({url:"/infra/api-error-log/update-status?id="+u+"&processStatus="+b}))(i,r),await S.success(f),await g()}catch{}},H=async()=>{try{await S.exportConfirm(),T.value=!0;const r=await(i=o,N.download({url:"/infra/api-error-log/export-excel",params:i}));ye.excel(r,"\u5F02\u5E38\u65E5\u5FD7.xls")}catch{}finally{T.value=!1}var i};return J(()=>{g()}),(i,r)=>{const f=ae,u=le,b=re,A=te,K=oe,k=pe,d=se,B=ie,P=fe,p=ue,q=me,Q=ne,W=ce,v=ee("hasPermi"),X=de;return s(),I(R,null,[e(P,null,{default:t(()=>[e(B,{class:"-mb-15px",model:l(o),ref_key:"queryFormRef",ref:C,inline:!0,"label-width":"68px"},{default:t(()=>[e(u,{label:"\u7528\u6237\u7F16\u53F7",prop:"userId"},{default:t(()=>[e(f,{modelValue:l(o).userId,"onUpdate:modelValue":r[0]||(r[0]=a=>l(o).userId=a),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u7F16\u53F7",clearable:"",onKeyup:F(w,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u7528\u6237\u7C7B\u578B",prop:"userType"},{default:t(()=>[e(A,{modelValue:l(o).userType,"onUpdate:modelValue":r[1]||(r[1]=a=>l(o).userType=a),placeholder:"\u8BF7\u9009\u62E9\u7528\u6237\u7C7B\u578B",clearable:"",class:"!w-240px"},{default:t(()=>[(s(!0),I(R,null,z(l(G)(l(x).USER_TYPE),a=>(s(),n(b,{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:t(()=>[e(f,{modelValue:l(o).applicationName,"onUpdate:modelValue":r[2]||(r[2]=a=>l(o).applicationName=a),placeholder:"\u8BF7\u8F93\u5165\u5E94\u7528\u540D",clearable:"",onKeyup:F(w,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u5F02\u5E38\u65F6\u95F4",prop:"exceptionTime"},{default:t(()=>[e(K,{modelValue:l(o).exceptionTime,"onUpdate:modelValue":r[3]||(r[3]=a=>l(o).exceptionTime=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:"\u5904\u7406\u72B6\u6001",prop:"processStatus"},{default:t(()=>[e(A,{modelValue:l(o).processStatus,"onUpdate:modelValue":r[4]||(r[4]=a=>l(o).processStatus=a),placeholder:"\u8BF7\u9009\u62E9\u5904\u7406\u72B6\u6001",clearable:"",class:"!w-240px"},{default:t(()=>[(s(!0),I(R,null,z(l(G)(l(x).INFRA_API_ERROR_LOG_PROCESS_STATUS),a=>(s(),n(b,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(u,null,{default:t(()=>[e(d,{onClick:w},{default:t(()=>[e(k,{icon:"ep:search",class:"mr-5px"}),m(" \u641C\u7D22")]),_:1}),e(d,{onClick:M},{default:t(()=>[e(k,{icon:"ep:refresh",class:"mr-5px"}),m(" \u91CD\u7F6E")]),_:1}),_((s(),n(d,{type:"success",plain:"",onClick:H,loading:l(T)},{default:t(()=>[e(k,{icon:"ep:download",class:"mr-5px"}),m(" \u5BFC\u51FA ")]),_:1},8,["loading"])),[[v,["infra:api-error-log:export"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(P,null,{default:t(()=>[_((s(),n(Q,{data:l(U)},{default:t(()=>[e(p,{label:"\u65E5\u5FD7\u7F16\u53F7",align:"center",prop:"id"}),e(p,{label:"\u7528\u6237\u7F16\u53F7",align:"center",prop:"userId"}),e(p,{label:"\u7528\u6237\u7C7B\u578B",align:"center",prop:"userType"},{default:t(a=>[e(q,{type:l(x).USER_TYPE,value:a.row.userType},null,8,["type","value"])]),_:1}),e(p,{label:"\u5E94\u7528\u540D",align:"center",prop:"applicationName",width:"200"}),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:"180"}),e(p,{label:"\u5F02\u5E38\u53D1\u751F\u65F6\u95F4",align:"center",prop:"exceptionTime",width:"180",formatter:l(_e)},null,8,["formatter"]),e(p,{label:"\u5F02\u5E38\u540D",align:"center",prop:"exceptionName",width:"180"}),e(p,{label:"\u5904\u7406\u72B6\u6001",align:"center",prop:"processStatus"},{default:t(a=>[e(q,{type:l(x).INFRA_API_ERROR_LOG_PROCESS_STATUS,value:a.row.processStatus},null,8,["type","value"])]),_:1}),e(p,{label:"\u64CD\u4F5C",align:"center",width:"200"},{default:t(a=>[_((s(),n(d,{link:"",type:"primary",onClick:Y=>{return D=a.row,void E.value.open(D);var D}},{default:t(()=>[m(" \u8BE6\u7EC6 ")]),_:2},1032,["onClick"])),[[v,["infra:api-error-log:query"]]]),a.row.processStatus===l(y).INIT?_((s(),n(d,{key:0,link:"",type:"primary",onClick:Y=>O(a.row.id,l(y).DONE)},{default:t(()=>[m(" \u5DF2\u5904\u7406 ")]),_:2},1032,["onClick"])),[[v,["infra:api-error-log:update-status"]]]):L("",!0),a.row.processStatus===l(y).INIT?_((s(),n(d,{key:1,link:"",type:"primary",onClick:Y=>O(a.row.id,l(y).IGNORE)},{default:t(()=>[m(" \u5DF2\u5FFD\u7565 ")]),_:2},1032,["onClick"])),[[v,["infra:api-error-log:update-status"]]]):L("",!0)]),_:1})]),_:1},8,["data"])),[[X,l(h)]]),e(W,{total:l(V),page:l(o).pageNo,"onUpdate:page":r[5]||(r[5]=a=>l(o).pageNo=a),limit:l(o).pageSize,"onUpdate:limit":r[6]||(r[6]=a=>l(o).pageSize=a),onPagination:g},null,8,["total","page","limit"])]),_:1}),e(ge,{ref_key:"detailRef",ref:E},null,512)],64)}}});export{we as default};
|