import{u as i}from"./useDeviceRanking.D5vjP1_k.js";import{a as m,r as t,f as b,q as v,aj as s,c as w,o as f,b as n,S as e,K as C,R as D}from"./vue.YrNK8sx4.js";import"./index.BKEMpsLA.js";const g=m({__name:"DeviceBorrowCountChart",setup(h){t(null),t("");const{borrowCountData:c,fetchRanking:u}=i(),l=t([]),p=async()=>{await u(),l.value=c.value},d=b(()=>[...l.value].sort((r,o)=>o.borrow_count-r.borrow_count));return v(p),(r,o)=>{const a=s("el-table-column"),_=s("el-table");return f(),w(D,null,[o[0]||(o[0]=n("div",null,[n("h2",null,"Top20单台设备累计借用次数排名")],-1)),n("div",null,[e(_,{data:d.value,style:{width:"100%"}},{default:C(()=>[e(a,{label:"排名",type:"index",width:"60"}),e(a,{prop:"device_name",label:"设备名称"}),e(a,{prop:"device_code",label:"设备编号"}),e(a,{prop:"borrow_count",label:"借用次数"})]),_:1},8,["data"])])],64)}}});export{g as default};
