1 |
- import{ai as b,ae as m,aj as f,ak as h}from"./index.B5OtSypO.js";import{a as i,f as k,aH as C,aj as g,c as l,o as n,b as a,R as w,a9 as y,S as D,F,K as S,J as x,O as B,Q as r}from"./vue.YrNK8sx4.js";import{_ as j}from"./_plugin-vue_export-helper.DlAUqK2U.js";const E={class:"status-cards"},z={class:"pending-items"},A=["onClick"],L={class:"icon-wrapper"},N={class:"item-content"},O={class:"number","data-target":"37"},R={class:"label"},V=i({name:"StatusCards"}),q=i({...V,props:{statusData:{type:Object,required:!0}},setup(u){const s=u,d=k(()=>[{label:"待审批",value:s.statusData.pending_approval,icon:b,color:"#409EFF"},{label:"已借出",value:s.statusData.pending_return,icon:m,color:"#E6A23C"},{label:"待维修",value:s.statusData.pending_maintenance,icon:f,color:"#67C23A"},{label:"已逾期",value:s.statusData.pending_overdue,icon:h,color:"#F56C6C"}]),t=C();function _(o){switch(console.log("点击状态卡片:",o.label),o.label){case"待审批":t.push("/borrow/approval");break;case"已借出":t.push("/borrow/list?status=5");break;case"待维修":t.push("/devicemaintenance");break;case"已逾期":t.push("/borrow/list?status=8");break;default:console.warn("未知状态:",o.label)}}return(o,c)=>{const p=g("el-icon");return n(),l("div",E,[c[0]||(c[0]=a("div",{class:"info-title"}," 待处理 ",-1)),a("div",z,[(n(!0),l(w,null,y(d.value,(e,v)=>(n(),l("div",{class:"pending-item",key:v,onClick:H=>_(e)},[a("div",L,[D(p,{size:40,class:"card-icon",style:F({color:e.color})},{default:S(()=>[(n(),x(B(e.icon)))]),_:2},1032,["style"])]),a("div",N,[a("span",O,r(e.value),1),a("span",R,r(e.label),1)])],8,A))),128))])])}}}),Q=j(q,[["__scopeId","data-v-c52e850f"]]);export{Q as default};
|