import{az as C,d as K,b as w,r as y,p as B,c as s,e as F,f as V,g as p,h as t,i as o,u as a,F as D,j as M,k as Q,m as i,t as _,a1 as R,q as $,E as A,_ as G}from"./index.0308b213.js";import{u as H}from"./useAgent.c0cb1751.js";import{_ as J}from"./WithDrawSetting.vue_vue_type_script_setup_true_lang.c7c7e179.js";import{A as X}from"./index.1d26a072.js";import"./list.5526c7ef.js";import"./useInstance.233fbdde.js";import"./withdraw.289b0b14.js";import"./install.524ae6f2.js";const Y=c=>C.request({url:"addon/drawSetting.web.draw_setting/list",method:"POST",params:c}),Z=c=>C.request({url:"addon/drawSetting.web.draw_setting/cancel",method:"POST",params:c}),ee=c=>C.post("addon/drawSetting.web.draw_setting/getAreas",c),te={class:"filter-form"},le=i("\u7B5B\u9009"),ae={class:"data"},ne={class:"operation-container"},oe={class:"operation-btn"},ue=i("\u6279\u91CF\u8BBE\u7F6E\u63D0\u73B0\u65F6\u95F4"),se=i("\u6279\u91CF\u53D6\u6D88"),ie={class:"table"},re={class:"bottom"},de={class:"pagination"},pe=K({setup(c){const l=w({keyword:"",agentid:"",areaid:"",page:1,limit:20}),g=w({list:[],count:0});let d=y([]),x=y("");const f=()=>{Y(l).then(u=>{g.list=u.list,g.count=u.count})};f();const{getAgentList:k,getAgentTitle:q}=H();k();let m=y(!1);const z=()=>{if(d.value.length===0){A({message:"\u8BF7\u9009\u62E9\u9700\u8981\u64CD\u4F5C\u7684\u6570\u636E",type:"error"});return}m.value=!0},L=()=>{d.value=[],f()},U=()=>{if(d.value.length===0){A({message:"\u8BF7\u9009\u62E9\u9700\u8981\u64CD\u4F5C\u7684\u6570\u636E",type:"error"});return}x.value=String(d.value),Z({ids:String(d.value)}).then(u=>{console.log(u)})},b=()=>{l.page=1,f()},P=u=>{d.value=u.map(n=>String(n.id))};let h=w({list:[]});const E=()=>{ee({agentid:Number(l.agentid)}).then(u=>{h.list=u,console.log(h.list)})};return E(),B(()=>l.agentid,()=>{l.agentid>0&&E()},{immediate:!0}),B(()=>[l.page,l.limit],()=>{f()}),(u,n)=>{const N=s("el-option"),T=s("el-select"),I=s("el-input"),S=s("el-form-item"),v=s("el-button"),O=s("el-form"),r=s("el-table-column"),W=s("el-table"),j=s("el-pagination");return F(),V(D,null,[p("div",te,[t(O,{model:a(l),"label-width":"80px"},{default:o(()=>[t(S,{class:"tn-el-form-item",label:"\u5176\u4ED6"},{default:o(()=>[t(a(X),{modelValue:a(l).agentid,"onUpdate:modelValue":n[0]||(n[0]=e=>a(l).agentid=e),onChange:b},null,8,["modelValue"]),t(T,{modelValue:a(l).areaid,"onUpdate:modelValue":n[1]||(n[1]=e=>a(l).areaid=e),placeholder:"\u8BF7\u9009\u62E9\u5546\u5708",filterable:"",clearable:"",style:{width:"auto","margin-left":"10px"}},{default:o(()=>[(F(!0),V(D,null,M(a(h).list,(e,ce)=>(F(),Q(N,{value:e.id,label:e.title},{default:o(()=>[i(_(e.title),1)]),_:2},1032,["value","label"]))),256))]),_:1},8,["modelValue"]),t(I,{modelValue:a(l).keyword,"onUpdate:modelValue":n[2]||(n[2]=e=>a(l).keyword=e),placeholder:"\u95E8\u5E97\u540D\u79F0/\u95E8\u5E97id",onKeyup:n[3]||(n[3]=R(e=>b(),["enter"])),style:{width:"auto","margin-left":"10px"}},null,8,["modelValue"])]),_:1}),t(S,null,{default:o(()=>[t(v,{type:"primary",onClick:b},{default:o(()=>[le]),_:1})]),_:1})]),_:1},8,["model"])]),p("div",ae,[p("div",ne,[p("div",oe,[t(v,{class:"btn tn-button tn-button--blue--light",type:"primary",onClick:z},{default:o(()=>[ue]),_:1}),t(v,{class:"btn tn-button tn-button--blue--light",type:"primary",onClick:U},{default:o(()=>[se]),_:1})])]),p("div",ie,[t(W,{data:a(g).list,onSelectionChange:P},{default:o(()=>[t(r,{type:"selection",width:"55"}),t(r,{label:"id",prop:"id"}),t(r,{label:"\u6240\u5C5E\u57CE\u5E02"},{default:o(({row:e})=>[i(_(a(q)(e.agentid)),1)]),_:1}),t(r,{label:"\u6240\u5C5E\u5546\u5708",prop:"areaid"}),t(r,{label:"\u5E97\u94FA\u540D\u79F0"},{default:o(({row:e})=>[i(_(e.title),1)]),_:1}),t(r,{label:"\u63D0\u73B0\u5468\u671F"},{default:o(({row:e})=>[i(_(e.day),1)]),_:1}),t(r,{label:"\u63D0\u73B0\u65F6\u95F4"},{default:o(({row:e})=>[i(_(e.hour),1)]),_:1}),t(r,{label:"\u63D0\u73B0\u65B9\u5F0F"},{default:o(({row:e})=>[i(_(e.method),1)]),_:1})]),_:1},8,["data"])])]),p("div",re,[p("div",de,[t(j,{currentPage:a(l).page,"onUpdate:currentPage":n[4]||(n[4]=e=>a(l).page=e),"page-size":a(l).limit,"onUpdate:page-size":n[5]||(n[5]=e=>a(l).limit=e),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:a(g).count},null,8,["currentPage","page-size","total"])])]),t(J,{modelValue:a(m),"onUpdate:modelValue":n[6]||(n[6]=e=>$(m)?m.value=e:m=e),ids:a(d),onOnClose:L},null,8,["modelValue","ids"])],64)}}});const ye=G(pe,[["__scopeId","data-v-2f518710"]]);export{ye as default};
