import{u as b,C as f,a as S,L as x,T as y,b as k,P as v,c as C,p as E,d as P,e as R,f as h,A as w,g as B,i as L}from"./record.js";import{br as D,r as l,s as M,bC as c,by as i,bw as p,bv as u,bt as n,F as N,bD as T,bu as A,bE as F,bo as V}from"./_plugin-vue_export-helper.js";import{b as I,_ as O}from"./Grid.js";import"./main.js";import"./get-slot.js";const j={__name:"RecordPie",setup(q){const _=b(),{getMoodRatios:d}=_;f.register(S,x,y,k,v,C,E,P,R,h,w,B);const r=l([]);M(async()=>{r.value=await d()});const m=l({plugins:{datalabels:{color:"black",formatter:function(a,t){let e=t.dataset.data.reduce((o,s)=>o+s,0);return console.log(a,e,a/e),Math.round(a/e*100)+"%"}},legend:{display:!1}}});return(a,t)=>{const e=O,o=I;return n(),c("div",null,[t[0]||(t[0]=i("h1",{class:"page-title"},"工作休息比例报表",-1)),p(o,{"x-gap":12,"y-gap":8,collapsed:!1,cols:"1 s:1 m:2 l:3 xl:4 2xl:5",responsive:"screen"},{default:u(()=>[(n(!0),c(N,null,T(r.value,(s,g)=>(n(),A(e,{key:g,class:"report-card"},{default:u(()=>[i("h2",null,F(s.groupName),1),p(V(L),{data:s.workRestData,options:m.value},null,8,["data","options"])]),_:2},1024))),128))]),_:1})])}}},Q=D(j,[["__scopeId","data-v-2cc4b433"]]);export{Q as default};
