import{r as s,A as E,B as F,c as n,C as J,d as u,e as w,D as v,E as C,i as t,f as e,h as r,G as V,I as M,l as O,F as Q,J as T,m as b,v as A}from"./index-DQMN5y1g.js";import{p as G,m as $}from"./message-DXvGgNDO.js";const z={class:"app-container"},H=M({name:"Post"}),te=Object.assign(H,{setup(W){const{proxy:k}=A(),y=s([]),h=s([]);s(!1);const c=s(!0),x=s(!0),m=s(0);s("");const N=E({form:{},queryParams:{page:1,limit:10,name:"",phoneNumber:"",openId:""}}),{queryParams:a,form:X,rules:Y}=F(N);G().then(i=>{y.value=[{value:"",label:"请选择"},...i.map(l=>(l=JSON.parse(l),{value:l.id,label:l.name,id:l.id}))]});function d(){c.value=!0,$(a.value).then(i=>{h.value=i.data.data,m.value=i.count,c.value=!1})}function _(){a.value.page=1,a.value.limit=10,d()}function S(){a.value={},_()}function j(){k.$router.push("/message/send")}return d(),(i,l)=>{const B=n("el-input"),f=n("el-form-item"),I=n("el-option"),L=n("el-select"),g=n("el-button"),P=n("el-form"),U=n("el-col"),q=n("el-row"),p=n("el-table-column"),D=n("el-table"),K=n("pagination"),R=J("loading");return u(),w("div",z,[v(e(P,{model:t(a),ref:"queryRef",inline:!0},{default:r(()=>[e(f,{label:"消息标题",prop:"title"},{default:r(()=>[e(B,{modelValue:t(a).title,"onUpdate:modelValue":l[0]||(l[0]=o=>t(a).title=o),placeholder:"请输入标题",clearable:"",style:{width:"200px"},onKeyup:O(_,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(f,{label:"招聘项目",prop:"projectId"},{default:r(()=>[e(L,{modelValue:t(a).pro_id,"onUpdate:modelValue":l[1]||(l[1]=o=>t(a).pro_id=o),placeholder:"请选择",style:{width:"240px"}},{default:r(()=>[(u(!0),w(Q,null,T(t(y),o=>(u(),V(I,{key:o.value,label:o.label,value:o.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(f,null,{default:r(()=>[e(g,{type:"primary",icon:"Search",onClick:_},{default:r(()=>[b("搜索")]),_:1}),e(g,{icon:"Refresh",onClick:S},{default:r(()=>[b("重置")]),_:1})]),_:1})]),_:1},8,["model"]),[[C,t(x)]]),e(q,{gutter:10,class:"mb8"},{default:r(()=>[e(U,{span:1.5},{default:r(()=>[e(g,{type:"primary",plain:"",onClick:j,icon:"Message"},{default:r(()=>[b("发送消息")]),_:1})]),_:1})]),_:1}),v((u(),V(D,{data:t(h)},{default:r(()=>[e(p,{label:"消息标题",align:"left",prop:"title"}),e(p,{label:"发送人",align:"center",prop:"userName"}),e(p,{label:"发送时间",align:"center",prop:"createTime"}),e(p,{label:"招聘项目",align:"center",prop:"proName"}),e(p,{label:"内容",align:"left",prop:"content"})]),_:1},8,["data"])),[[R,t(c)]]),v(e(K,{total:t(m),page:t(a).page,"onUpdate:page":l[2]||(l[2]=o=>t(a).page=o),limit:t(a).limit,"onUpdate:limit":l[3]||(l[3]=o=>t(a).limit=o),onPagination:d},null,8,["total","page","limit"]),[[C,t(m)>0]])])}}});export{te as default};
