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