import{d as M,a6 as O,b as x,r as E,p as $,c as i,e as k,f as j,g as n,h as a,i as s,u as t,k as b,A as y,a1 as G,m as d,t as P,q as H,F as J,y as C,E as D,N as Q,_ as W}from"./index.0308b213.js";import{E as X,g as Y,d as Z}from"./EditSharePacket.72f84106.js";import{c as ee,e as te}from"./redpacket.da925412.js";import{A as ae}from"./index.1d26a072.js";import{u as le}from"./useAgent.c0cb1751.js";import"./useInstance.233fbdde.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"./SelectCategory.b16d6620.js";import"./list.4b7efdc5.js";import"./install.524ae6f2.js";import"./list.5526c7ef.js";const oe={class:"filter-form"},ue=d("\u67E5\u8BE2"),se={class:"data"},ne={class:"operation-container"},ie={class:"operation-btn"},de=d("\u6DFB\u52A0\u7EA2\u5305"),re=d("\u5220\u9664\u6240\u9009\u7EA2\u5305"),ce={class:"table"},pe={class:"table-operation-btn"},me={class:"top"},_e=d("\u67E5\u770B"),ge=d("\u5220\u9664"),fe={class:"bottom"},he={class:"pagination"},ve=M({setup(Ee){const{OpPlatform:f}=O(),l=x({keyword:"",agentid:"",page:1,limit:10,type:"synthesis"}),r=x({list:[],count:0});let _=E([]);const c=()=>{f.value==="shangpu"?Y(l).then(o=>{r.list=o.list,r.count=o.count}):ee(l).then(o=>{r.list=o.list,r.count=o.count})};c();const V=o=>{_.value=o.map(u=>String(u.id))};$(()=>[l.page,l.limit,l.agentid],()=>{c()});const B=()=>{c()},{getAgentList:w,getAgentTitle:R}=le();w();let p=E(!1),h=E(!1),v=E(0);const S=()=>{v.value=0,h.value=!0,C(()=>{p.value=!0})},z=o=>{v.value=o,h.value=!0,C(()=>{p.value=!0})},N=()=>{v.value=0,C(()=>{h.value=!1}),c()},T=o=>{_.value=[String(o)],F()},F=()=>{if(_.value.length===0){D({message:"\u8BF7\u9009\u62E9\u9700\u8981\u5220\u9664\u7684\u6570\u636E",type:"error"});return}Q.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u6570\u636E\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{f.value==="shangpu"?Z(_.value).then(o=>{D({message:"\u5220\u9664\u7EA2\u5305\u6210\u529F",type:"success"}),c()}):te(_.value).then(o=>{D({message:"\u5220\u9664\u7EA2\u5305\u6210\u529F",type:"success"}),c()})}).catch(()=>{})};return(o,u)=>{const A=i("el-form-item"),U=i("el-input"),g=i("el-button"),I=i("el-form"),m=i("el-table-column"),L=i("el-table"),q=i("el-pagination");return k(),j(J,null,[n("div",oe,[a(I,{model:t(l),"label-width":"90px"},{default:s(()=>[t(f)==="shangpu"?(k(),b(A,{key:0,class:"tn-el-form-item",label:"\u4EE3\u7406\u533A\u57DF"},{default:s(()=>[a(t(ae),{modelValue:t(l).agentid,"onUpdate:modelValue":u[0]||(u[0]=e=>t(l).agentid=e)},null,8,["modelValue"])]),_:1})):y("",!0),a(A,{class:"tn-el-form-item",label:"\u641C\u7D22"},{default:s(()=>[a(U,{modelValue:t(l).keyword,"onUpdate:modelValue":u[1]||(u[1]=e=>t(l).keyword=e),placeholder:"\u8BF7\u8F93\u5165\u8D85\u7EA7\u7EA2\u5305\u6807\u9898\u6216\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22",onKeyup:u[2]||(u[2]=G(e=>B(),["enter"]))},null,8,["modelValue"])]),_:1}),a(A,null,{default:s(()=>[a(g,{class:"tn-el-form-item--item tn-button tn-button--blue",onClick:B},{default:s(()=>[ue]),_:1})]),_:1})]),_:1},8,["model"])]),n("div",se,[n("div",ne,[n("div",ie,[a(g,{class:"btn",type:"primary",onClick:S},{default:s(()=>[de]),_:1}),a(g,{class:"btn",type:"danger",onClick:F},{default:s(()=>[re]),_:1})])]),n("div",ce,[a(L,{data:t(r).list,onSelectionChange:V},{default:s(()=>[a(m,{type:"selection",width:"55"}),a(m,{label:"\u7EA2\u5305ID",prop:"id"}),a(m,{label:"\u7EA2\u5305\u540D\u79F0",prop:"name"}),t(f)==="shangpu"?(k(),b(m,{key:0,label:"\u6240\u5C5E\u57CE\u5E02",width:"100px"},{default:s(({row:e})=>[d(P(t(R)(e.agentid)),1)]),_:1})):y("",!0),a(m,{width:"170px",label:"\u521B\u5EFA\u65F6\u95F4"},{default:s(({row:e})=>[d(P(e.addtime),1)]),_:1}),a(m,{fixed:"right",label:"\u64CD\u4F5C",width:"290px"},{default:s(({row:e})=>[n("div",pe,[n("div",me,[a(g,{size:"small",type:"primary",onClick:K=>z(e.id)},{default:s(()=>[_e]),_:2},1032,["onClick"]),a(g,{size:"small",type:"danger",onClick:K=>T(e.id)},{default:s(()=>[ge]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])])]),n("div",fe,[n("div",he,[a(q,{currentPage:t(l).page,"onUpdate:currentPage":u[3]||(u[3]=e=>t(l).page=e),"page-size":t(l).limit,"onUpdate:page-size":u[4]||(u[4]=e=>t(l).limit=e),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:t(r).count},null,8,["currentPage","page-size","total"])])]),t(h)?(k(),b(X,{key:0,modelValue:t(p),"onUpdate:modelValue":u[5]||(u[5]=e=>H(p)?p.value=e:p=e),id:t(v),onOnClose:N},null,8,["modelValue","id"])):y("",!0)],64)}}});const Te=W(ve,[["__scopeId","data-v-f27cf0d4"]]);export{Te as default};
