import{E as L,g as M,d as O}from"./EditDialog.573427dd.js";import{A as j}from"./index.1d26a072.js";import{d as R,a6 as $,b as E,r as u,p as G,c,at as H,e as f,f as y,g as i,h as t,i as n,u as e,k,A as D,w as J,q as K,F as Q,m as v,y as C,N as W,E as X,_ as Y}from"./index.0308b213.js";import"./useInstance.233fbdde.js";import"./index.6dd89ec0.js";import"./install.524ae6f2.js";import"./useAgent.c0cb1751.js";import"./list.5526c7ef.js";const Z={class:"filter-form"},ee=v("\u67E5\u8BE2"),te={class:"data"},ae={class:"operation-container"},oe={class:"operation-btn"},le=v("\u6DFB\u52A0"),se={class:"table"},ne={class:"table-operation-btn"},ie={class:"top"},ue=v("\u7F16\u8F91"),de=v("\u5220\u9664"),ce={class:"bottom"},re={class:"pagination"},_e=R({setup(pe){const{OpPlatform:B}=$(),o=E({page:1,limit:10,agentid:"",areaid:"",sid:"",keywords:"",account_id:""}),h=u(!1);E({store:[]});const _=E({list:[],count:0});let A=u([]);const r=()=>{h.value=!0,M(o).then(s=>{_.list=s.list,_.count=s.count,h.value=!1})};r(),u(!1),u(!1),G(()=>[o.page,o.limit],()=>{r()});const F=()=>{r()};let d=u(!1),p=u(!1),m=u(0);const V=()=>{m.value=0,p.value=!0,C(()=>{d.value=!0})},w=s=>{m.value=s,p.value=!0,C(()=>{d.value=!0})},z=()=>{m.value=0,C(()=>{p.value=!1}),r()},N=s=>{W.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u6570\u636E\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{O({id:s}).then(()=>{X({message:"\u5220\u9664\u6210\u529F",type:"success"}),r()})}).catch(()=>{})},P=s=>{A.value=s.map(l=>l.id)};return(s,l)=>{const x=c("el-form-item"),g=c("el-button"),T=c("el-form"),b=c("el-table-column"),U=c("el-table"),I=c("el-pagination"),S=H("loading");return f(),y(Q,null,[i("div",Z,[t(T,{model:e(o),"label-width":"90px"},{default:n(()=>[e(B)==="shangpu"?(f(),k(x,{key:0,class:"tn-el-form-item",label:"\u4EE3\u7406\u533A\u57DF"},{default:n(()=>[t(e(j),{modelValue:e(o).agentid,"onUpdate:modelValue":l[0]||(l[0]=a=>e(o).agentid=a)},null,8,["modelValue"])]),_:1})):D("",!0),t(x,null,{default:n(()=>[t(g,{class:"tn-el-form-item--item tn-button tn-button--blue",onClick:F},{default:n(()=>[ee]),_:1})]),_:1})]),_:1},8,["model"])]),i("div",te,[i("div",ae,[i("div",oe,[t(g,{class:"btn",type:"primary",onClick:V},{default:n(()=>[le]),_:1})])]),J((f(),y("div",se,[t(U,{data:e(_).list,onSelectionChange:P},{default:n(()=>[t(b,{align:"center",type:"selection"}),t(b,{label:"\u4EE3\u7406",prop:"agent_title"}),t(b,{fixed:"right",label:"\u64CD\u4F5C",width:"290px"},{default:n(({row:a})=>[i("div",ne,[i("div",ie,[t(g,{size:"small",type:"primary",onClick:q=>w(a.id)},{default:n(()=>[ue]),_:2},1032,["onClick"]),t(g,{size:"small",type:"danger",onClick:q=>N(a.id)},{default:n(()=>[de]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])])),[[S,h.value]])]),i("div",ce,[i("div",re,[t(I,{currentPage:e(o).page,"onUpdate:currentPage":l[1]||(l[1]=a=>e(o).page=a),"page-size":e(o).limit,"onUpdate:page-size":l[2]||(l[2]=a=>e(o).limit=a),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:e(_).count},null,8,["currentPage","page-size","total"])])]),e(p)?(f(),k(L,{key:0,modelValue:e(d),"onUpdate:modelValue":l[3]||(l[3]=a=>K(d)?d.value=a:d=a),id:e(m),onOnClose:z},null,8,["modelValue","id"])):D("",!0)],64)}}});const xe=Y(_e,[["__scopeId","data-v-291a2b31"]]);export{xe as default};
