import{az as v,d as w,a6 as P,aX as z,b as f,r as A,p as T,c as d,e as N,f as I,g as h,h as a,i as g,u,F as V,m as x,N as b,E as i,_ as q}from"./index.0308b213.js";import{a as y,b as G}from"./qrcodetab.4b65a5d1.js";const M=r=>v({url:"adminapi/merchant.kongma/catlist",params:r}),C=r=>v({url:"adminapi/merchant.kongma/catdel",method:"POST",data:r}),O={style:{"background-color":"white",padding:"20px"}},S=x("\u6279\u91CF\u5220\u9664"),U=x("\u5220\u9664"),j={class:"pagination"},X=w({setup(r){const{OpPlatform:m}=P();z.get("uniacid");const n=f({page:1,limit:10}),s=f({list:[],count:0}),F=e=>{b.confirm("\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F","\u5220\u9664",{confirmButtonText:"\u786E\u8BA4",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(()=>{m.value==="agent"?y({ids:e}).then(t=>{t&&i({message:t.msg,type:"success"}),o()}):C({ids:e}).then(t=>{t&&i({message:t.msg,type:"success"}),o()})}).catch(()=>{})},p=A(),B=e=>{p.value=e.map(t=>t.id)},D=()=>{if(p.value.length<=0){i({message:"\u8BF7\u9009\u62E9\u8981\u5220\u9664\u7684\u6570\u636E",type:"error"});return}b.confirm("\u786E\u5B9A\u8981\u6279\u91CF\u5220\u9664\u5417\uFF1F","\u5220\u9664",{confirmButtonText:"\u786E\u8BA4",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(()=>{m.value==="agent"?y({ids:p.value}).then(e=>{e&&i({message:e.msg,type:"success"}),o()}):C({ids:p.value}).then(e=>{e&&i({message:e.msg,type:"success"}),o()})}).catch(()=>{})},o=()=>{m.value==="agent"?G(n).then(e=>{s.list=e.list,s.count=e.count}):M(n).then(e=>{s.list=e.list,s.count=e.count})};return o(),T(()=>n,()=>{o()},{deep:!0}),(e,t)=>{const _=d("el-button"),l=d("el-table-column"),E=d("el-table"),k=d("el-pagination");return N(),I(V,null,[h("div",O,[a(_,{class:"btn",type:"danger",onClick:D,style:{"margin-bottom":"10px"}},{default:g(()=>[S]),_:1}),a(E,{data:u(s).list,onSelectionChange:B},{default:g(()=>[a(l,{type:"selection",width:"55"}),a(l,{label:"ID",prop:"id"}),a(l,{label:"\u540D\u79F0",prop:"title"}),a(l,{label:"\u95E8\u5E97\u540D\u79F0",prop:"store_title"}),a(l,{label:"\u64CD\u4F5C",width:"120px"},{default:g(c=>[a(_,{type:"danger",onClick:$=>F(c.row.id)},{default:g(()=>[U]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),h("div",j,[a(k,{currentPage:u(n).page,"onUpdate:currentPage":t[0]||(t[0]=c=>u(n).page=c),"page-size":u(n).limit,"onUpdate:page-size":t[1]||(t[1]=c=>u(n).limit=c),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:u(s).count},null,8,["currentPage","page-size","total"])])],64)}}});const K=q(X,[["__scopeId","data-v-db5945fb"]]);export{K as default};
