DeviceBorrowCountChart.Dl2H4qKO.js 895 B

1
  1. import{u as i}from"./useDeviceRanking.D4_0hOYy.js";import{a as m,r as t,f as b,q as v,ao as s,c as w,o as f,b as n,T as e,L as C,S as D}from"./vue.fY72QXCX.js";import"./index.Ck1HWQ_Q.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};