import{d as h}from"./api.1f097846.js";import{u as c}from"./columns.24ea4a2e.js";import{e as d}from"./emitter.bff31cdd.js";import{d as y,B as r,r as b,Z as x,w as B,j as C,A as w,ai as u,aq as T,o as _,M as L,O as p,P as k,c as P,U as R,aa as S,a8 as j,a as q,T as z,u as I,ac as M,ad as N}from"./vue.adf17aba.js";import{_ as O}from"./_plugin-vue_export-helper.c27b6911.js";import"./index.ad3efb29.js";import"./elementPlus.4833989a.js";import"./echarts.72dc8373.js";const U={class:"outer-container"},V=y({__name:"DataTable",setup(A){const f=r("profile"),s=r("dateRange"),n=r("tableData");d.on("DateTendency-changeStatDim",()=>{e.value=!0});const e=b(!1),a=x({height:"auto",border:!1,round:!0,showFooter:!0,columnConfig:{resizable:!0},toolbarConfig:{custom:!0},columns:[],data:[]});async function m(){e.value=!0;const l={profileId:f.value.profile_id,startDate:s.value[0],endDate:s.value[1]};try{const t=await h(l);a.columns=c,a.data=t.data}catch(t){console.log("error:",t)}finally{e.value=!1}}return B(n,()=>{a.data=n.value,e.value=!1}),C(()=>{m()}),w(()=>{d.all.clear()}),(l,t)=>{const v=u("vxe-grid"),g=u("el-card"),D=T("loading");return _(),L(g,{"body-style":"padding-top: 0;",style:{"margin-top":"10px"}},{default:p(()=>[k((_(),P("div",U,[R(v,M(N(a)),S({_:2},[j(I(c),o=>({name:`${o.field}_default`,fn:p(({row:i})=>[q("div",null,z(i[o.field]?i[o.field]:"-"),1)])}))]),1040)])),[[D,e.value]])]),_:1})}}});const Q=O(V,[["__scopeId","data-v-79245801"]]);export{Q as default};
