text: var r;import e from"./DetailModal.b5814fc9.js";import{_ as o}from"./TableImg.8ccd808f.js";import{f as t}from"./BasicForm.312985a0.js";import{u as i}from"./useTable.84f74a57.js";import{b as a}from"./useModal.9d70781f.js";import{av as s,d as n,aY as l}from"./index.f8d8fadd.js";import{getColumns as d}from"./data.0c0097d3.js";import{k as c,r as m,D as f,J as p,am as u,K as j,o as b,n as g,V as x,ah as v,w as y,v as E,q as h,Q as w,Y as D,s as k}from"./vendor.bc3b2d68.js";import"./Description.vue_vue&type=script&lang.1a91b957.js";/* empty css              */import"./useDescription.844b8d19.js";/* empty css              *//* empty css              */import"./useForm.a3596aad.js";/* empty css              *//* empty css              *//* empty css              */import"./uuid.c53863e7.js";import"./useWindowSizeFn.ade0e88c.js";import"./onMountedOrActivated.06aaefd7.js";/* empty css              */import"./useSortable.88a1af21.js";import"./useExpose.c4c32617.js";/* empty css              *//* empty css              *//* empty css              */import"./CountdownInput.7e403a5b.js";/* empty css              *//* empty css              */import"./download.7c99dac2.js";import"./StrengthMeter.16507ade.js";(r||(r={})).Error="/error";var C=c({name:"ErrorHandler",components:{DetailModal:e,BasicTable:o,TableAction:t},setup(){const e=m(),o=m([]),{t:t}=n(),c=l(),[j,{setTableData:b}]=i({title:t("sys.errorLog.tableTitle"),columns:d(),actionColumn:{width:80,title:"Action",dataIndex:"action",slots:{customRender:"action"}}}),[g,{openModal:x}]=a();return f((()=>c.getErrorLogInfoList),(r=>{p((()=>{b(u(r))}))}),{immediate:!0}),{register:j,registerModal:g,handleDetail:function(r){e.value=r,x(!0)},fireVueError:function(){throw new Error("fire vue error!")},fireResourceError:function(){o.value.push(`${(new Date).getTime()}.png`)},fireAjaxError:function(){return e=this,o=null,t=function*(){yield s.get({url:r.Error})},new Promise(((r,i)=>{var a=r=>{try{n(t.next(r))}catch(e){i(e)}},s=r=>{try{n(t.throw(r))}catch(e){i(e)}},n=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,s);n((t=t.apply(e,o)).next())}));var e,o,t},imgList:o,rowInfo:e,t:t}}});const L={class:"p-4"};C.render=function(r,e,o,t,i,a){const s=j("DetailModal"),n=j("a-button"),l=j("TableAction"),d=j("BasicTable");return b(),g("div",L,[(b(!0),g(x,null,v(r.imgList,(r=>y((b(),g("img",{key:r,src:r},null,8,["src"])),[[E,!1]]))),128)),h(s,{info:r.rowInfo,onRegister:r.registerModal},null,8,["info","onRegister"]),h(d,{onRegister:r.register,class:"error-handle-table"},{toolbar:w((()=>[h(n,{onClick:r.fireVueError,type:"primary"},{default:w((()=>[D(k(r.t("sys.errorLog.fireVueError")),1)])),_:1},8,["onClick"]),h(n,{onClick:r.fireResourceError,type:"primary"},{default:w((()=>[D(k(r.t("sys.errorLog.fireResourceError")),1)])),_:1},8,["onClick"]),h(n,{onClick:r.fireAjaxError,type:"primary"},{default:w((()=>[D(k(r.t("sys.errorLog.fireAjaxError")),1)])),_:1},8,["onClick"])])),action:w((({record:e})=>[h(l,{actions:[{label:r.t("sys.errorLog.tableActionDesc"),onClick:r.handleDetail.bind(null,e)}]},null,8,["actions"])])),_:1},8,["onRegister"])])};export default C;
  