var D=(C,f,o)=>new Promise((w,b)=>{var g=c=>{try{n(o.next(c))}catch(_){b(_)}},x=c=>{try{n(o.throw(c))}catch(_){b(_)}},n=c=>c.done?w(c.value):Promise.resolve(c.value).then(g,x);n((o=o.apply(C,f)).next())});import{f as I,g as K}from"./index-2a45336b.js";import{u as M}from"./usePagination-7442a465.js";import R from"./PageHeader-3787e5ce.js";import{a as T,b as l,o as p,k as z,e,w as t,u as i,ae as $,c as V,K as s,i as B,b2 as q,E as k,G as u,b3 as H,b4 as J,F as N,D as Q}from"./ant-design-vue-710243d9.js";import"./tinymce-3184e0f1.js";import"./echarts-ca5d9323.js";import"./cropper-47c8e461.js";import"./lodash-es-7cb071db.js";import"./qrcode-bec2257a.js";import"./jschardet-bd496279.js";const X={class:"mt-8-2 display-flex align-items-center"},Y={class:"mr-8-1"},Z=s("span",{class:"color-secondary mr-4-1"},"发布在",-1),ee={class:"color-secondary ml-8-3"},me=Object.assign({name:"listSearchArticles"},{__name:"index",setup(C){const{listData:f,paginationState:o,loading:w,showLoading:b,hideLoading:g,resetPagination:x,searchFormData:n}=M(),c=T([{key:"category",label:"所属类目",options:[{label:"全部",value:0},{label:"类目1",value:1},{label:"类目2",value:2},{label:"类目3",value:3},{label:"类目4",value:4},{label:"类目5",value:5},{label:"类目6",value:6},{label:"类目7",value:7},{label:"类目8",value:8}]},{key:"owner",label:"owner"},{key:"other",label:"活跃用户"}]);o.onChange=(m,r)=>{o.current=m,o.pageSize=r,_()},n.value={owner:[1,2]},_();function _(){return D(this,null,function*(){try{b();const{pageSize:m,current:r}=o,{code:d,data:S}=yield I.common.getPageList({pageSize:m,current:r}).catch(()=>{throw new Error});if(g(),K("http.code.success")===d){const{records:v,pagination:h}=S;f.value=v,o.total=h.total}}catch(m){g()}})}function O(){x(),_()}return(m,r)=>{const d=l("a-select"),S=l("a-space"),v=l("x-filter-item"),h=l("a-col"),P=l("a-form-item"),E=l("a-row"),F=l("x-filter"),L=l("a-card"),W=l("a-tag"),U=l("a-list-item-meta"),j=l("a-avatar"),A=l("a-list-item"),G=l("a-list");return p(),z(N,null,[e(R),e(L,{class:"mb-8-2"},{default:t(()=>[e(F,{modelValue:i(n),"onUpdate:modelValue":r[2]||(r[2]=a=>$(n)?n.value=a:null),"data-source":c.value,"label-width":100,onChange:O},{default:t(({record:a})=>[a.key==="owner"?(p(),V(v,{key:0,label:a.label},{default:t(()=>[e(S,{size:16},{default:t(()=>[e(d,{value:i(n).owner,"onUpdate:value":r[0]||(r[0]=y=>i(n).owner=y),mode:"multiple",style:{minWidth:"100px"},options:[{label:"我自己",value:0},{label:"张三",value:1},{label:"李四",value:2},{label:"王五",value:3}]},null,8,["value"]),s("a",{onClick:r[1]||(r[1]=()=>i(n).owner=[0])},"只看自己的")]),_:1})]),_:2},1032,["label"])):B("",!0),a.key==="other"?(p(),V(v,{key:1,label:a.label},{default:t(()=>[e(E,{gutter:40},{default:t(()=>[e(h,null,{default:t(()=>[e(d,{placeholder:"不限",style:{minWidth:"100px"}})]),_:1}),e(h,null,{default:t(()=>[e(P,{label:"好评度",class:"mb-0"},{default:t(()=>[e(d,{placeholder:"不限",style:{minWidth:"100px"}})]),_:1})]),_:1})]),_:1})]),_:2},1032,["label"])):B("",!0)]),_:1},8,["modelValue","data-source"])]),_:1}),e(L,null,{default:t(()=>[e(G,{"row-key":"id","item-layout":"vertical","data-source":i(f),pagination:i(o),loading:i(w)},{renderItem:t(({item:a})=>[e(A,{key:"item.title"},{actions:t(()=>[s("span",null,[e(i(q)),k(" "+u(a.count1),1)]),s("span",null,[e(i(H)),k(" "+u(a.count2),1)]),s("span",null,[e(i(J)),k(" "+u(a.count3),1)])]),default:t(()=>[e(U,null,{title:t(()=>[s("a",null,u(a.title),1)]),description:t(()=>[(p(!0),z(N,null,Q(a.tags,y=>(p(),V(W,{key:y.id},{default:t(()=>[k(u(y.name),1)]),_:2},1024))),128))]),_:2},1024),s("div",null,u(a.paragraph),1),s("div",X,[e(j,{class:"mr-8-1",src:a.avatar,size:20},null,8,["src"]),s("a",Y,u(a.name),1),Z,s("a",null,u(a.link),1),s("span",ee,u(a.datetime),1)])]),_:2},1024)]),_:1},8,["data-source","pagination","loading"])]),_:1})],64)}}});export{me as default};
