import{g as S}from"./list.4b7efdc5.js";import{g as A}from"./redpacket.da925412.js";import{d as U,a6 as w,r as y,b as h,p as b,c as i,e as N,k as R,i as u,g as r,h as a,u as s,H as q,q as L,m as f,_ as j}from"./index.0308b213.js";const H={class:"filter-form"},I=f("\u641C\u7D22"),O=f("\u786E\u5B9A"),Q={class:"table"},T=["src"],G=f("\u9009\u62E9"),J={class:"pagination"},K=U({props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue","onClose","onSelect"],setup(v,{emit:_}){const V=v,{OpPlatform:k}=w();let d=y(!1);const l=h({agentid:"",keyword:"",page:1,limit:10}),n=h({list:[],count:0}),m=()=>{k.value==="shangpu"?S(l).then(e=>{n.count=e.count,n.list=e.list}):A(l).then(e=>{n.count=e.count,n.list=e.list}),n.list.map(e=>{e.selected=!1})};b(()=>V.modelValue,e=>{d.value=e,e&&m()}),b(()=>[l.page,l.limit],()=>{m()});const x=()=>{m()};let c=y([]);const B=e=>{e.selected=!e.selected,e.selected?c.value.push(e):c.value=c.value.filter(o=>o.id!==e.id)},D=()=>{_("onSelect",c.value),C()},C=()=>{_("update:modelValue",!1),_("onClose")};return(e,o)=>{const F=i("el-input"),g=i("el-button"),p=i("el-table-column"),P=i("el-table"),z=i("el-pagination"),E=i("el-dialog");return N(),R(E,{modelValue:s(d),"onUpdate:modelValue":o[3]||(o[3]=t=>L(d)?d.value=t:d=t),title:"\u9009\u62E9\u95E8\u5E97\u5206\u7C7B",width:"50%","destroy-on-close":"","append-to-body":!0,onClose:C},{default:u(()=>[r("div",H,[a(F,{modelValue:s(l).keyword,"onUpdate:modelValue":o[0]||(o[0]=t=>s(l).keyword=t),placeholder:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0\u8FDB\u884C\u641C\u7D22"},null,8,["modelValue"]),a(g,{type:"primary",onClick:x},{default:u(()=>[I]),_:1}),a(g,{type:"primary",onClick:D},{default:u(()=>[O]),_:1})]),r("div",Q,[a(P,{data:s(n).list,height:"400px"},{default:u(()=>[a(p,{label:"\u56FE\u6807",width:"100px"},{default:u(({row:t})=>[r("img",{class:"thumb",src:t.thumb_cn},null,8,T)]),_:1}),a(p,{label:"\u5206\u7C7Bid",prop:"id"}),a(p,{label:"\u540D\u79F0",prop:"title"}),a(p,{fixed:"right",label:"\u64CD\u4F5C",width:"90px"},{default:u(({row:t})=>[a(g,{onClick:M=>B(t),class:q(t.selected?"activie":"")},{default:u(()=>[G]),_:2},1032,["onClick","class"])]),_:1})]),_:1},8,["data"])]),r("div",J,[a(z,{currentPage:s(l).page,"onUpdate:currentPage":o[1]||(o[1]=t=>s(l).page=t),"page-size":s(l).limit,"onUpdate:page-size":o[2]||(o[2]=t=>s(l).limit=t),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:s(n).count},null,8,["currentPage","page-size","total"])])]),_:1},8,["modelValue"])}}});const Z=j(K,[["__scopeId","data-v-69c44464"]]);export{Z as default};
