import{d as h}from"./api.0a0b7a7e.js";import{u as c}from"./columns.24ea4a2e.js";import{e as d}from"./emitter.d780df30.js";import{d as y,q as r,r as b,Q as x,w as C,j as w,p as B,a9 as u,af as L,o as _,E as T,G as p,H as k,c as R,M as S,a2 as j,a0 as q,a as z,L as E,u as I,a3 as M,a4 as N}from"./vue.6daa721c.js";import{_ as P}from"./_plugin-vue_export-helper.c27b6911.js";import"./index.ae7ce77b.js";import"./elementPlus.346c766a.js";import"./echarts.72dc8373.js";const V={class:"outer-container"},F=y({__name:"DataTable",setup(G){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 C(n,()=>{a.data=n.value,e.value=!1}),w(()=>{m()}),B(()=>{d.all.clear()}),(l,t)=>{const v=u("vxe-grid"),g=u("el-card"),D=L("loading");return _(),T(g,{"body-style":"padding-top: 0;",style:{"margin-top":"10px"}},{default:p(()=>[k((_(),R("div",V,[S(v,M(N(a)),j({_:2},[q(I(c),o=>({name:`${o.field}_default`,fn:p(({row:i})=>[z("div",null,E(i[o.field]?i[o.field]:"-"),1)])}))]),1040)])),[[D,e.value]])]),_:1})}}});const W=P(F,[["__scopeId","data-v-79245801"]]);export{W as default};
