index-8TZuH9X-.js 3.1 KB

1
  1. import{d as w,a2 as f,av as h,K as u,e as o,f as a,u as i,y,C as g,j as t,L as r,m as l}from"./vue-A59npLRR.js";import{T as k}from"./index-K8IR974I.js";import{d as v,b as I,T as x}from"./baTable-MdxYOkAk.js";import T from"./popupForm-kvouH6ST.js";import{a as q,a1 as z}from"./index-EwE51S_X.js";import"./index-XALue448.js";import"./validate-_EUdkMt3.js";import"./index-r6iTpmP6.js";import"./echarts-cxb9vJr1.js";const C={class:"default-main ba-table-box"},E={key:0},B={key:1},N={key:2},P={key:3},F={key:4},K={key:5},L={key:6},$=w({name:"borrow/borrowUseing",__name:"index",setup(A){const{t:e}=f(),b=q(),c=v(["edit","delete"]);c[1].display=p=>p.id!=b.id;const d=new I(new z("/admin/borrow.BorrowUseing/"),{filter:{limit:20,order:"id,asc"},column:[{type:"selection",align:"center",operator:!1},{label:e("Id"),prop:"id",align:"center",operator:"=",operatorPlaceholder:e("Id"),width:70},{label:e("borrow.borrowuseing.username"),prop:"username",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("borrow.borrowuseing.mobile"),prop:"mobile",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("borrow.borrowuseing.expected end time"),prop:"expected_end_time",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("borrow.borrowuseing.remarks"),prop:"remarks",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("borrow.borrowuseing.status"),prop:"status",align:"center",render:"slot",slotName:"status",operator:"eq"},{label:e("Create time"),prop:"create_time",align:"center",render:"datetime",sortable:"custom",operator:"RANGE",width:160},{label:e("Operate"),align:"center",width:"100",render:"buttons",buttons:c,operator:!1}],dblClickNotEditColumn:[void 0,"status"]},{defaultItems:{status:"1"}});return h("baTable",d),d.mount(),d.getIndex(),(p,V)=>{const m=u("el-alert"),s=u("el-tag"),_=u("el-table-column");return o(),a("div",C,[i(d).table.remark?(o(),y(m,{key:0,class:"ba-table-alert",title:i(d).table.remark,type:"info","show-icon":""},null,8,["title"])):g("",!0),t(k,{buttons:["refresh","add","edit","delete","comSearch","quickSearch","columnDisplay"],"quick-search-placeholder":i(e)("Quick search placeholder",{fields:i(e)("borrow.borrowuseing.username")+"/"+i(e)("borrow.borrowuseing.mobile")})},null,8,["quick-search-placeholder"]),t(x,null,{status:r(()=>[t(_,{prop:"status",label:i(e)("borrow.borrowuseing.status"),render:"tag",width:"180"},{default:r(n=>[n.row.status==="0"?(o(),a("div",E,[t(s,{type:"danger"},{default:r(()=>[l("待审批")]),_:1})])):n.row.status==="1"?(o(),a("div",B,[t(s,{type:"info"},{default:r(()=>[l("已驳回")]),_:1})])):n.row.status==="2"?(o(),a("div",N,[t(s,{type:"warning"},{default:r(()=>[l("待使用")]),_:1})])):n.row.status==="3"?(o(),a("div",P,[t(s,{type:"success"},{default:r(()=>[l("使用中")]),_:1})])):n.row.status==="4"?(o(),a("div",F,[t(s,{type:"success"},{default:r(()=>[l("已归还")]),_:1})])):n.row.status==="5"?(o(),a("div",K,[t(s,{type:"danger"},{default:r(()=>[l("已逾期")]),_:1})])):(o(),a("div",L,[t(s,{type:"danger"},{default:r(()=>[l("未知状态")]),_:1})]))]),_:1},8,["label"])]),_:1}),t(T)])}}});export{$ as default};