import{d as $,a6 as j,b as A,r as i,p as G,c as d,e as f,f as R,g as u,h as a,i as s,u as e,a1 as H,k as v,A as b,t as J,q as B,F as Q,m as y,y as C,N as W,E as V,_ as X}from"./index.0308b213.js";import{_ as Y,g as Z,d as ee}from"./EditDialog.vue_vue_type_script_setup_true_lang.36c6d75d.js";import te from"./importDialog.6c20897b.js";import{e as le,f as ae}from"./index.6effa892.js";import{A as oe}from"./index.1d26a072.js";import"./useInstance.233fbdde.js";import"./install.524ae6f2.js";import"./useAgent.c0cb1751.js";import"./list.5526c7ef.js";const ne={class:"filter-form"},se=y("\u67E5\u8BE2"),ue={class:"data"},ie={class:"operation-container"},de={class:"operation-btn"},re=y("\u6DFB\u52A0"),pe=y("\u6279\u91CF\u5BFC\u5165"),ce={class:"table"},me={class:"table-operation-btn"},_e={class:"top"},fe=y("\u7F16\u8F91"),ge=y("\u5220\u9664"),he={class:"bottom"},ve={class:"pagination"},be=$({setup(Ce){const{OpPlatform:g}=j(),o=A({keyword:"",page:1,limit:10}),r=A({list:[],count:0});let w=i([]);const p=()=>{g.value==="shangpu"?Z(o).then(n=>{r.list=n.list,r.count=n.count}):le(o).then(n=>{r.list=n.list,r.count=n.count})};p();const I=n=>{w.value=n.map(l=>String(l.id))};i(!1),i(!1),G(()=>[o.page,o.limit],()=>{p()});const x=()=>{p()};let c=i(!1),F=i(!1),k=i(0);const z=()=>{k.value=0,F.value=!0,C(()=>{c.value=!0})},U=n=>{k.value=n,F.value=!0,C(()=>{c.value=!0})},N=()=>{k.value=0,C(()=>{F.value=!1}),p()},P=n=>{W.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u6570\u636E\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{g.value=="shangpu"?ee({id:n}).then(()=>{V({message:"\u5220\u9664\u6210\u529F",type:"success"}),p()}):ae({id:n}).then(()=>{V({message:"\u5220\u9664\u6210\u529F",type:"success"}),p()})}).catch(()=>{})};let D=i(!1),m=i(!1);const S=()=>{D.value=!0,C(()=>{m.value=!0})},L=()=>{D.value=!1,C(()=>{m.value=!1})};return(n,l)=>{const T=d("el-input"),E=d("el-form-item"),h=d("el-button"),O=d("el-form"),_=d("el-table-column"),q=d("el-table"),K=d("el-pagination");return f(),R(Q,null,[u("div",ne,[a(O,{model:e(o),"label-width":"90px"},{default:s(()=>[a(E,{class:"tn-el-form-item",label:"\u641C\u7D22"},{default:s(()=>[a(T,{modelValue:e(o).keyword,"onUpdate:modelValue":l[0]||(l[0]=t=>e(o).keyword=t),placeholder:"\u8BF7\u8F93\u5165\u65F6\u95F4\u8FDB\u884C\u641C\u7D22",onKeyup:l[1]||(l[1]=H(t=>x(),["enter"]))},null,8,["modelValue"])]),_:1}),e(g)==="shangpu"?(f(),v(E,{key:0,class:"tn-el-form-item",label:"\u4EE3\u7406\u533A\u57DF"},{default:s(()=>[a(e(oe),{modelValue:e(o).agentid,"onUpdate:modelValue":l[2]||(l[2]=t=>e(o).agentid=t)},null,8,["modelValue"])]),_:1})):b("",!0),a(E,null,{default:s(()=>[a(h,{class:"tn-el-form-item--item tn-button tn-button--blue",onClick:x},{default:s(()=>[se]),_:1})]),_:1})]),_:1},8,["model"])]),u("div",ue,[u("div",ie,[u("div",de,[a(h,{class:"btn",type:"primary",onClick:z},{default:s(()=>[re]),_:1}),e(g)=="agent"?(f(),v(h,{key:0,class:"btn",type:"primary",onClick:S},{default:s(()=>[pe]),_:1})):b("",!0)])]),u("div",ce,[a(q,{data:e(r).list,onSelectionChange:I},{default:s(()=>[a(_,{label:"ID",prop:"id"}),e(g)==="shangpu"?(f(),v(_,{key:0,label:"\u6240\u5C5E\u4EE3\u7406",width:"120px"},{default:s(({row:t})=>[u("span",null,J(t.agent_title),1)]),_:1})):b("",!0),a(_,{label:"\u9884\u8BA1\u9001\u8FBE\u65F6\u95F4",prop:"send_time"}),a(_,{label:"\u622A\u5355\u65F6\u95F4",prop:"cut_time"}),a(_,{label:"\u6E29\u99A8\u63D0\u793A",prop:"remark"}),a(_,{fixed:"right",label:"\u64CD\u4F5C",width:"290px"},{default:s(({row:t})=>[u("div",me,[u("div",_e,[a(h,{size:"small",type:"primary",onClick:M=>U(t.id)},{default:s(()=>[fe]),_:2},1032,["onClick"]),a(h,{size:"small",type:"danger",onClick:M=>P(t.id)},{default:s(()=>[ge]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])])]),u("div",he,[u("div",ve,[a(K,{currentPage:e(o).page,"onUpdate:currentPage":l[3]||(l[3]=t=>e(o).page=t),"page-size":e(o).limit,"onUpdate:page-size":l[4]||(l[4]=t=>e(o).limit=t),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:e(r).count},null,8,["currentPage","page-size","total"])])]),e(F)?(f(),v(Y,{key:0,modelValue:e(c),"onUpdate:modelValue":l[5]||(l[5]=t=>B(c)?c.value=t:c=t),id:e(k),onOnClose:N},null,8,["modelValue","id"])):b("",!0),e(D)?(f(),v(te,{key:1,modelValue:e(m),"onUpdate:modelValue":l[6]||(l[6]=t=>B(m)?m.value=t:m=t),onOnClose:L},null,8,["modelValue"])):b("",!0)],64)}}});const we=X(be,[["__scopeId","data-v-3daaa118"]]);export{we as default};
