index-eIpI2qwp.js 3.3 KB

1
  1. import{d as m,a2 as _,av as y,K as i,e as r,f as a,u as p,y as w,C as f,j as o,L as t,m as s}from"./vue-A59npLRR.js";import{T as h}from"./index-K8IR974I.js";import{d as g,b as k,T as v}from"./baTable-MdxYOkAk.js";import z from"./popupForm-phf2joDU.js";import{a as I,a1 as q}from"./index-EwE51S_X.js";import"./index-XALue448.js";import"./validate-_EUdkMt3.js";import"./index-r6iTpmP6.js";import"./echarts-cxb9vJr1.js";const x={class:"default-main ba-table-box"},E={key:0},T={key:1},C={key:2},P={key:3},F={key:4},K={key:5},L={key:6},J=m({name:"borrow/borrowApply",__name:"index",setup(N){const{t:e}=_();I();const c=g(["edit","delete"]);console.log(c,"true");const d=new k(new q("/admin/borrow.borrowApply/"),{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.borrowapply.username"),prop:"username",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("borrow.borrowapply.mobile"),prop:"mobile",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("borrow.borrowapply.expected end time"),prop:"expected_end_time",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("borrow.borrowapply.borrow reason"),prop:"borrow_reason",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("borrow.borrowapply.annotation"),prop:"annotation",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("borrow.borrowapply.remarks"),prop:"remarks",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("borrow.borrowapply.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 y("baTable",d),d.mount(),d.getIndex(),(A,B)=>{const u=i("el-alert"),l=i("el-tag"),b=i("el-table-column");return r(),a("div",x,[p(d).table.remark?(r(),w(u,{key:0,class:"ba-table-alert",title:p(d).table.remark,type:"info","show-icon":""},null,8,["title"])):f("",!0),o(h,{buttons:["refresh","add","edit","delete"],"quick-search-placeholder":p(e)("Quick search placeholder",{fields:p(e)("borrow.borrowapply.username")+"/"+p(e)("borrow.borrowapply.mobile")})},null,8,["quick-search-placeholder"]),o(v,null,{status:t(()=>[o(b,{prop:"status",label:p(e)("borrow.borrowapply.status"),render:"tag",width:"180"},{default:t(n=>[n.row.status==="0"?(r(),a("div",E,[o(l,{type:"danger"},{default:t(()=>[s("待审批")]),_:1})])):n.row.status==="1"?(r(),a("div",T,[o(l,{type:"info"},{default:t(()=>[s("已驳回")]),_:1})])):n.row.status==="2"?(r(),a("div",C,[o(l,{type:"warning"},{default:t(()=>[s("待使用")]),_:1})])):n.row.status==="3"?(r(),a("div",P,[o(l,{type:"success"},{default:t(()=>[s("使用中")]),_:1})])):n.row.status==="4"?(r(),a("div",F,[o(l,{type:"success"},{default:t(()=>[s("已归还")]),_:1})])):n.row.status==="5"?(r(),a("div",K,[o(l,{type:"danger"},{default:t(()=>[s("已逾期")]),_:1})])):(r(),a("div",L,[o(l,{type:"danger"},{default:t(()=>[s("未知状态")]),_:1})]))]),_:1},8,["label"])]),_:1}),o(z)])}}});export{J as default};