import{_ as q,g as I,a as M,d as O,b as S,u as $,c as j}from"./EditCategoryDialog.vue_vue_type_script_setup_true_lang.82de650d.js";import{A as L}from"./index.1d26a072.js";import{d as R,a6 as G,b as A,r as y,p as J,c as s,e as B,f as K,g as d,h as e,i as u,u as l,k as F,A as x,q as Q,F as W,m as h,N as X,E as v,y as E,_ as Y}from"./index.0308b213.js";import"./index.dfdc0704.js";import"./index.vue_vue_type_style_index_0_scoped_f00ed21d_lang.2c48f49b.js";import"./vuedraggable.umd.405b1bec.js";import"./index.35b8c9ab.js";import"./index.9e8820cd.js";import"./sort_out.2008c10d.js";import"./install.524ae6f2.js";import"./useAgent.c0cb1751.js";import"./list.5526c7ef.js";const Z={class:"filter-form"},ee=h("\u7B5B\u9009"),te={class:"data"},ae={class:"table"},oe={class:"operation-container"},le={class:"operation-btn"},ne=h("\u6DFB\u52A0\u5206\u7C7B"),ue=h("\u7F16\u8F91"),se=h("\u5220\u9664"),ie={class:"pagination"},re=R({setup(de){const{OpPlatform:m}=G(),o=A({page:1,limit:10,agentid:""}),c=A({list:[],count:0}),i=()=>{m.value=="agent"?I(o).then(a=>{c.list=a.list,c.count=a.count}):M(o).then(a=>{c.list=a.list,c.count=a.count})};i();const w=a=>{X.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u8BE5\u5206\u7C7B\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{m.value=="agent"?O(a).then(()=>{v.success("\u5220\u9664\u5206\u7C7B\u6210\u529F")}):S(a).then(()=>{v.success("\u5220\u9664\u5206\u7C7B\u6210\u529F")}),i()})},V=(a,n)=>{m.value==="agent"?$(a,n).then(()=>{v.success("\u4FEE\u6539\u5206\u7C7B\u6210\u529F"),i()}):j(a,n).then(()=>{v.success("\u4FEE\u6539\u5206\u7C7B\u6210\u529F"),i()})};let p=y(!1),g=y(!1),f=y(0);const k=()=>{f.value=0,g.value=!0,E(()=>{p.value=!0})},D=a=>{f.value=a,g.value=!0,E(()=>{p.value=!0})},H=()=>{f.value=0,E(()=>{g.value=!1}),i()};return J(()=>[o.page,o.limit,o.agentid,o.server_status,o.areaid],()=>{i()},{deep:!0}),(a,n)=>{const b=s("el-form-item"),C=s("el-button"),z=s("el-form"),r=s("el-table-column"),U=s("el-image"),N=s("el-switch"),P=s("el-table"),T=s("el-pagination");return B(),K(W,null,[d("div",Z,[e(z,{"label-width":"90px"},{default:u(()=>[l(m)==="shangpu"?(B(),F(b,{key:0,label:"\u4EE3\u7406\u533A\u57DF"},{default:u(()=>[e(l(L),{modelValue:l(o).agentid,"onUpdate:modelValue":n[0]||(n[0]=t=>l(o).agentid=t)},null,8,["modelValue"])]),_:1})):x("",!0),e(b,null,{default:u(()=>[e(C,{type:"primary",onClick:i},{default:u(()=>[ee]),_:1})]),_:1})]),_:1})]),d("div",te,[d("div",ae,[d("div",oe,[d("div",le,[e(C,{class:"btn",type:"primary",onClick:k},{default:u(()=>[ne]),_:1})])]),e(P,{data:l(c).list},{default:u(()=>[e(r,{prop:"agent_title",align:"center",label:"\u4EE3\u7406\u540D\u79F0"}),e(r,{prop:"title",align:"center",label:"\u5206\u7C7B\u540D\u79F0"}),e(r,{prop:"cover",align:"center",label:"\u5206\u7C7B\u56FE\u7247"},{default:u(t=>[e(U,{style:{width:"80px",height:"80px"},src:t.row.cover},null,8,["src"])]),_:1}),e(r,null,{default:u(t=>[d("div",null,[e(N,{modelValue:t.row.status,"onUpdate:modelValue":_=>t.row.status=_,size:"large",width:60,"inline-prompt":"","active-text":"\u663E\u793A","inactive-text":"\u9690\u85CF","active-color":"#00C5A1","active-value":1,"inactive-value":0,onChange:_=>V(t.row.id,_)},null,8,["modelValue","onUpdate:modelValue","onChange"])])]),_:1}),e(r,{prop:"displayorder",align:"center",label:"\u6392\u5E8F"}),e(r,{prop:"fee_rate",align:"center",label:"\u62BD\u6210\u6BD4\u4F8B"}),e(r,{align:"center",label:"\u4FEE\u6539/\u5220\u9664"},{default:u(t=>[e(C,{type:"primary",onClick:_=>D(t.row.id)},{default:u(()=>[ue]),_:2},1032,["onClick"]),e(C,{type:"danger",onClick:_=>w(t.row.id)},{default:u(()=>[se]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])])]),d("div",ie,[e(T,{currentPage:l(o).page,"onUpdate:currentPage":n[1]||(n[1]=t=>l(o).page=t),"page-size":l(o).limit,"onUpdate:page-size":n[2]||(n[2]=t=>l(o).limit=t),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:l(c).count},null,8,["currentPage","page-size","total"])]),l(g)?(B(),F(q,{key:0,modelValue:l(p),"onUpdate:modelValue":n[3]||(n[3]=t=>Q(p)?p.value=t:p=t),id:l(f),onOnClose:H},null,8,["modelValue","id"])):x("",!0)],64)}}});const be=Y(re,[["__scopeId","data-v-962b2c2a"]]);export{be as default};
