import x from"./CardBox-d49ae056-1785478469326v=1.0.0.js";import{g as k}from"./workbench-ed922c90-1785478469326v=1.0.0.js";import{f as w}from"./index-e26c4070-1785478469326v=1.0.0.js";import{x as C,r as R,h as b,y as a,z as u,A as i,P as c,a4 as p,H as l,I as D,K as y,u as S,L as T,Q as r,al as A}from"./vendor-46662d77-1785478469326v=1.0.0.js";import{_ as B}from"./index-5a47c360-1785478469326v=1.0.0.js";import"./eleVendor-bc05bc4d-1785478469326v=1.0.0.js";const F={class:"data-overview-container"},H={class:"data-content"},O=C({__name:"DataOverview",props:{searForm:{default:{}}},setup(h){const o=h,v=R([{title:"\u4F53\u80B2\u6559\u5B66",value:0,unit:"\u8BFE\u65F6",target:5e3,status:"success",percentage:98,key:"teachingHour",statusKey:"teachingHourStandard",rateKey:"teachingHourRate",targetKey:"teachingHourTarget",desc:"\u4F53\u80B2\u6559\u5B66\u603B\u8BFE\u65F6"},{title:"\u7FA4\u4F53\u6D3B\u52A8",value:0,unit:"\u4E07\u4EBA\u6B21",target:10,status:"success",percentage:98,key:"eventNum",statusKey:"eventNumStandard",rateKey:"eventNumRate",targetKey:"eventNumTarget",desc:"\u8D5B\u4E8B\u53C2\u4E0E\u4EBA\u6570"},{title:"\u4F53\u6D4B\u6570\u636E",value:0,unit:"%",target:98,status:"success",percentage:98,key:"healthRate",statusKey:"healthRateStandard",rateKey:"healthRateRate",targetKey:"healthRateTarget",desc:"\u4F53\u6D4B\u53CA\u683C\u7387"},{title:"\u8BFE\u5916\u4F53\u80B2\u953B\u70BC",value:0,unit:"\u6B21",target:30,status:"error",percentage:98,key:"exerciseAvgNum",statusKey:"exerciseAvgStandard",rateKey:"exerciseAvgRate",targetKey:"exerciseNumTarget",desc:"\u8BFE\u5916\u953B\u70BC\u4EBA\u5747\u6B21\u6570"},{title:"\u573A\u9986\u4F7F\u7528",value:0,unit:"\u6B21",target:5e3,status:"success",percentage:98,key:"venueNum",statusKey:"venueNumStandard",rateKey:"venueNumRate",targetKey:"venueNumTarget",desc:"\u573A\u9986\u4F7F\u7528\u6B21\u6570"}]),_=async()=>{let e=await k(o.searForm);e.code===0&&(e.data,v.value.forEach(t=>{t.value=e.data[t.key]||0,t.percentage=e.data[t.rateKey]||0,t.status=e.data[t.statusKey]==1?"success":"error",t.target=e.data[t.targetKey]||0,t.unit==="\u4E07\u4EBA\u6B21"&&(t.value<1e4?t.unit="\u4EBA\u6B21":t.value=t.value/1e4)}))},n=e=>r("div",{class:"left"},[e]),d=(e,t,s)=>r("div",{class:"right"},[r("div",{class:"right-value"},[e]),r("div",{class:`right-value-unit ${s||"unUnit"}`},[t])]),f=e=>{let t=e>=100?"success":"error";return r("div",{class:"right"},[r("div",{class:"right-progress"},[r(A("el-progress"),{percentage:e,color:t==="success"?"#67C23A":"#F56C6C"},null)])])},K=e=>{const t={success:"\u5DF2\u8FBE\u6807",error:"\u672A\u8FBE\u6807"};return[{label:n(e.desc),value:d(w(e.value.toString()),e.unit)},e.target&&{label:n("\u76EE\u6807"+e.target+e.unit),value:d("",t[e.status],e.status)},e.target&&{label:n("\u8FBE\u6807\u7387"),value:f(e.percentage)}]};return b(()=>o.searForm,()=>{_()},{deep:!0}),(e,t)=>(a(),u(c,null,[i("div",F,[(a(!0),u(c,null,p(S(v),(s,m)=>(a(),l(x,{size:"small",title:s.title,key:m},{default:D(()=>[i("div",H,[(a(!0),u(c,null,p(K(s),(g,N)=>(a(),u("div",{key:N,class:"data-item"},[(a(),l(y(g.label))),(a(),l(y(g.value)))]))),128))])]),_:2},1032,["title"]))),128))]),T(` <div class="right-progress">\r
		<el-progress :percentage="50" />\r
	</div> `)],2112))}});const M=B(O,[["__scopeId","data-v-7abe9264"]]);export{M as default};
