import{d as $,p as _,k as t,i as r,v as p,o as L,aD as H,a as m,z as c,m as n,K as b,e as a,L as I,a1 as P,t as f}from"./index-deffec86.js";import{I as K}from"./IndexPagePro-904e4e7b.js";import{_ as j}from"./index.vue_vue_type_script_setup_true_name_SearchForm_lang-692eb4fd.js";import{u as q}from"./useTable-823c55eb.js";import{u as y}from"./useHandleData-9c720574.js";import{g as G,d as J,c as O}from"./operatManage-420d1c91.js";const ae=$({__name:"demo",setup(Q){const C=_(!0),h=_([{prop:"username",label:"\u7528\u6237\u59D3\u540D",search:{el:"input",tooltip:"\u6211\u662F\u641C\u7D22\u63D0\u793A"}},{prop:"gender",label:"\u6027\u522B",enum:[{label:"\u7537",value:1}],search:{el:"select"}},{prop:"age",label:"\u5E74\u9F84",search:{render:({searchParam:l})=>t("div",{class:"flx-center"},[t(r("el-input"),{modelValue:l.minAge,modelModifiers:{trim:!0},"onUpdate:modelValue":e=>l.minAge=e,placeholder:"\u6700\u5C0F\u5E74\u9F84"},null),t("span",{class:"mr10 ml10"},[p("-")]),t(r("el-input"),{modelValue:l.maxAge,modelModifiers:{trim:!0},"onUpdate:modelValue":e=>l.maxAge=e,placeholder:"\u6700\u5927\u5E74\u9F84"},null)])}},{prop:"createTime",label:"\u521B\u5EFA\u65F6\u95F4",search:{el:"date-picker",span:1,props:{type:"datetimerange",valueFormat:"YYYY-MM-DD"},defaultValue:["2022-11-12 11:35:00","2022-12-12 11:35:00"]}}]);let k={11:"\u6700\u65B0\u70ED\u70B9",12:"\u6BD4\u8D5B\u8D44\u8BAF"};const v=l=>(l.list.map(e=>{var o;e.publish_str="\u53D1\u5E03",e.status==1&&(e.publish_str="\u505C\u7528"),e.status==4&&(e.publish_str="\u53D1\u5E03"),e.type_str=(o=k[e.type])!=null?o:"--"}),l),{tableData:z,pageable:i,searchParam:w,handleSizeChange:x,handleCurrentChange:D,getTableList:u,search:S,reset:V,renderEmpty:M,loading:F}=q(G,v);L(()=>{u()});const N=l=>{},A=async l=>{let e="\u5220\u9664\u5F53\u524D\u516C\u544A";await y(J,{notice_id:l.notice_id},e),u()},B=async l=>{let e="\u66F4\u65B0\u5F53\u524D\u516C\u544A\u72B6\u6001",o=l.status==4?1:4;await y(O,{notice_id:l.notice_id,status:o},e),u()};return(l,e)=>{const o=r("el-table-column"),E=r("el-tag"),d=r("el-button"),T=r("el-table"),U=r("el-pagination"),Y=H("loading");return m(),c(K,null,{treeCard:n(()=>e[2]||(e[2]=[])),searchForm:n(()=>[b(t(j,{"search-param":a(w),columns:a(h),search:a(S),reset:a(V)},null,8,["search-param","columns","search","reset"]),[[I,a(C)]])]),tableHeader:n(()=>e[3]||(e[3]=[])),toolButton:n(()=>e[4]||(e[4]=[])),pagination:n(()=>[t(U,{"current-page":a(i).page,"onUpdate:currentPage":e[0]||(e[0]=s=>a(i).page=s),"page-size":a(i).size,"onUpdate:pageSize":e[1]||(e[1]=s=>a(i).size=s),"page-sizes":[10,20,50,100],background:"",layout:"total, sizes, prev, pager, next",total:a(i).count,onSizeChange:a(x),onCurrentChange:a(D)},null,8,["current-page","page-size","total","onSizeChange","onCurrentChange"])]),default:n(()=>[b((m(),c(T,{data:a(z),size:"small",border:"",style:{width:"100%"}},{empty:n(()=>[(m(),c(P(a(M))))]),default:n(()=>[t(o,{label:"\u5E8F\u53F7",type:"index"}),t(o,{label:"\u6807\u9898",prop:"name"}),t(o,{label:"\u6240\u5C5E\u8D5B\u4F1A",prop:"community_id"}),t(o,{label:"\u7C7B\u578B",prop:"type_str"}),t(o,{label:"\u53D1\u5E03\u72B6\u6001"},{default:n(s=>[t(E,{type:s.row.status==1?"success":"danger","disable-transitions":""},{default:n(()=>[p(f(s.row.status_str),1)]),_:2},1032,["type"])]),_:1}),t(o,{label:"\u64CD\u4F5C\u4EBA",prop:"operator"}),t(o,{label:"\u64CD\u4F5C\u65F6\u95F4",prop:"u_time"}),t(o,{label:"\u64CD\u4F5C",align:"center",fixed:"right"},{default:n(s=>[t(d,{link:"",type:"primary",size:"small",onClick:g=>B(s.row)},{default:n(()=>[p(f(s.row.publish_str),1)]),_:2},1032,["onClick"]),t(d,{link:"",type:"primary",size:"small",onClick:g=>N(s.row)},{default:n(()=>e[5]||(e[5]=[p(" \u7F16\u8F91 ")])),_:2},1032,["onClick"]),t(d,{link:"",type:"danger",size:"small",onClick:g=>A(s.row)},{default:n(()=>e[6]||(e[6]=[p(" \u5220\u9664 ")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])),[[Y,a(F)]])]),_:1})}}});export{ae as default};
