import{az as m,d as b,b as _,p as f,c,e as w,f as x,g as p,h as n,i as g,u,F,E as z,_ as A}from"./index.0308b213.js";const C=s=>m({url:"adminapi/tuangouquan.plugin/list",params:s}),V=s=>m({url:"adminapi/tuangouquan.plugin/status",method:"POST",data:{id:s}}),B={class:"data"},D={class:"table"},k={class:"switch"},y={class:"pagination"},P=b({setup(s){const e=_({page:1,limit:10}),o=_({list:[],count:0}),d=()=>{C(e).then(l=>{o.count=l.count,o.list=l.agents.map((t,i)=>({id:t.id,title:t.title,tuangouquan_status:t.tuangouquan_status}))})},v=(l,t)=>{V(t).then(()=>{z.success("\u4FEE\u6539\u72B6\u6001\u6210\u529F")})};return d(),f(()=>[e.page,e.limit],()=>{d()}),(l,t)=>{const i=c("el-table-column"),h=c("el-switch"),E=c("el-table"),q=c("el-pagination");return w(),x(F,null,[p("div",B,[p("div",D,[n(E,{data:u(o).list},{default:g(()=>[n(i,{label:"\u4EE3\u7406ID",prop:"id"}),n(i,{label:"\u4EE3\u7406\u533A\u57DF",prop:"title"}),n(i,{label:"\u4EE3\u91D1\u5238\u72B6\u6001"},{default:g(a=>[p("div",k,[n(h,{modelValue:a.row.tuangouquan_status,"onUpdate:modelValue":r=>a.row.tuangouquan_status=r,size:"large",width:60,"inline-prompt":"","active-text":"\u5F00\u542F","inactive-text":"\u5173\u95ED","active-value":1,"inactive-value":0,onClick:r=>v(r,a.row.id)},null,8,["modelValue","onUpdate:modelValue","onClick"])])]),_:1})]),_:1},8,["data"])])]),p("div",y,[n(q,{currentPage:u(e).page,"onUpdate:currentPage":t[0]||(t[0]=a=>u(e).page=a),"page-size":u(e).limit,"onUpdate:page-size":t[1]||(t[1]=a=>u(e).limit=a),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:u(o).count},null,8,["currentPage","page-size","total"])])],64)}}});const U=A(P,[["__scopeId","data-v-3c81dcec"]]);export{U as default};
