index-R-uoIlCW.js 3.3 KB

1
  1. import{d as v,b as k,T as x}from"./baTable-MdxYOkAk.js";import{a1 as B,a as A,ak as T,N as I,al as C,_ as N}from"./index-EwE51S_X.js";import{T as R}from"./index-K8IR974I.js";import{d as M,a as S,av as V,o as D,K as u,e as l,f as r,j as e,L as a,t as _,m as i,G as E,i as p}from"./vue-A59npLRR.js";import"./echarts-cxb9vJr1.js";import"./index-XALue448.js";const G={class:"default-main"},j={class:"ml6",style:{"font-weight":"bold"}},z={class:"ml6",style:{"font-weight":"bold"}},F={class:"ml6",style:{"font-weight":"bold"}},H={key:0},K={key:1},L={key:2},O={key:3},P={key:4},$={key:5},q=M({name:"notification/index",__name:"index",setup(J){let c=v(["edit"]);c=[{render:"tipButton",name:"info",title:"查看",text:"查看",type:"primary",icon:"fa fa-search-plus",class:"table-row-info ",disabledTip:!1,click:o=>{w(o[s.table.pk])}}].concat(c);const f=S(),s=new k(new B("/admin/notification.Index/"),{pk:"id",column:[{type:"selection",align:"center",operator:!1},{label:"ID",prop:"id",show:!1,operator:!1},{label:"状态",render:"slot",slotName:"read_status_slot"},{label:"接收时间",prop:"create_time",align:"center",render:"datetime",operator:"RANGE",width:180,timeFormat:"yyyy-mm-dd hh:MM:ss"},{label:"操作",align:"center",width:120,render:"buttons",buttons:c,operator:!1}]}),b=A(),g=o=>{o.read_status!=1&&(o.read_status=1,T(o.id),I().then(m=>{b.Bellvalue=m.data.value}))},h=()=>{C().then(()=>{s.getIndex()})},w=o=>{s.form.extend.info={},s.form.operate="Info",s.form.loading=!0};return V("baTable",s),D(()=>{s.table.ref=f.value,s.mount(),s.getIndex()}),(o,m)=>{const y=u("el-popconfirm"),n=u("el-tag"),d=u("el-table-column");return l(),r("div",G,[e(R,{buttons:["refresh","comSearch"]},{default:a(()=>[e(y,{title:"确认将所有通知标为已读吗?",onConfirm:h})]),_:1}),e(x,{onRowClick:g},{read_status_slot:a(()=>[e(d,{prop:"read_status",label:"内容",width:"380",align:"center"},{default:a(t=>[e(n,{type:t.row.read_status=="1"?"info":""},{default:a(()=>[i(_(t.row.read_status=="1"?"已读":"未读"),1)]),_:2},1032,["type"]),p("span",{class:E(["ml6",t.row.read_status=="1"?"":"strong"])},_(t.row.msg.borrow_purpose_id),3)]),_:1}),e(d,{prop:"read_status",label:"申请人",width:"150",align:"center"},{default:a(t=>[p("span",j,_(t.row.msg.Sponsors),1)]),_:1}),e(d,{prop:"read_status",label:"处理人",style:{width:"50px"},width:"150",align:"center"},{default:a(t=>[p("span",z,_(t.row.msg.Processing_personnel),1)]),_:1}),e(d,{prop:"read_status",label:"申请时间",align:"center"},{default:a(t=>[p("span",F,_(t.row.msg.Application_time),1)]),_:1}),e(d,{prop:"read_status",label:"状态",render:"tag",width:"150",align:"center"},{default:a(t=>[t.row.msg.Application_status==="0"?(l(),r("div",H,[e(n,{type:"danger"},{default:a(()=>[i("待审批")]),_:1})])):t.row.msg.Application_status==="1"?(l(),r("div",K,[e(n,{type:"info"},{default:a(()=>[i("已驳回")]),_:1})])):t.row.msg.Application_status==="2"?(l(),r("div",L,[e(n,{type:"success"},{default:a(()=>[i("待使用")]),_:1})])):t.row.msg.Application_status==="3"?(l(),r("div",O,[e(n,{type:"success"},{default:a(()=>[i("使用中")]),_:1})])):t.row.msg.Application_status==="4"?(l(),r("div",P,[e(n,{type:"info"},{default:a(()=>[i("已归还")]),_:1})])):(l(),r("div",$,[e(n,{type:"danger"},{default:a(()=>[i("已逾期")]),_:1})]))]),_:1})]),_:1})])}}}),et=N(q,[["__scopeId","data-v-eb735f86"]]);export{et as default};