text: var r;import e from"./DetailModal.f41d2177.js";import{_ as o}from"./TableImg.f24934a9.js";import{f as t}from"./BasicForm.4b5e3079.js";import{u as i}from"./useTable.7ec4da22.js";import{b as s}from"./useModal.b121dc3d.js";import{av as a,d as n,aY as l}from"./index.734d8392.js";import{getColumns as c}from"./data.db0db955.js";import{k as d,r as m,D as f,J as p,am as u,K as b,o as j,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.9d9efc92.js";import"./Description.vue_vue&type=script&lang.22cf1d34.js";/* empty css              */import"./useDescription.c9f3ed5b.js";/* empty css              *//* empty css              */import"./useForm.c00e8219.js";/* empty css              *//* empty css              *//* empty css              */import"./uuid.c53863e7.js";import"./useWindowSizeFn.0534066c.js";import"./onMountedOrActivated.b73559bc.js";/* empty css              */import"./useSortable.f6024f8f.js";import"./useExpose.0886c4eb.js";/* empty css              *//* empty css              *//* empty css              */import"./CountdownInput.b71977b9.js";/* empty css              *//* empty css              */import"./download.48c86db0.js";import"./StrengthMeter.14956067.js";(r||(r={})).Error="/error";var C=d({name:"ErrorHandler",components:{DetailModal:e,BasicTable:o,TableAction:t},setup(){const e=m(),o=m([]),{t:t}=n(),d=l(),[b,{setTableData:j}]=i({title:t("sys.errorLog.tableTitle"),columns:c(),actionColumn:{width:80,title:"Action",dataIndex:"action",slots:{customRender:"action"}}}),[g,{openModal:x}]=s();return f((()=>d.getErrorLogInfoList),(r=>{p((()=>{j(u(r))}))}),{immediate:!0}),{register:b,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 a.get({url:r.Error})},new Promise(((r,i)=>{var s=r=>{try{n(t.next(r))}catch(e){i(e)}},a=r=>{try{n(t.throw(r))}catch(e){i(e)}},n=e=>e.done?r(e.value):Promise.resolve(e.value).then(s,a);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,s){const a=b("DetailModal"),n=b("a-button"),l=b("TableAction"),c=b("BasicTable");return j(),g("div",L,[(j(!0),g(x,null,v(r.imgList,(r=>y((j(),g("img",{key:r,src:r},null,8,["src"])),[[E,!1]]))),128)),h(a,{info:r.rowInfo,onRegister:r.registerModal},null,8,["info","onRegister"]),h(c,{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;
  