import{_ as w,g as V,d as N}from"./SettingRecordDialog.vue_vue_type_script_setup_true_lang.acac652a.js";import{u as R}from"./useAgent.c0cb1751.js";import{d as T,b as f,r as b,c as _,e as E,f as z,g as n,h as e,i as d,u as o,k as I,q as L,A as U,F as $,m as v,y as h,N as q,E as M,_ as j}from"./index.0308b213.js";import"./list.5526c7ef.js";const H={class:"data"},S={class:"operation-btn",style:{"margin-bottom":"10px"}},G=v("\u6DFB\u52A0\u8BBE\u7F6E"),J={class:"table"},K={class:"table-operation-btn"},O={class:"top"},P=v("\u4FEE\u6539"),Q=v("\u5220\u9664"),W={class:"bottom"},X={class:"pagination"},Y=T({setup(Z){let u=f({page:1,limit:10,agentid:0}),p=f({limit:"",page:"",pages:1,total:0,list:[]});const m=()=>{V(u).then(l=>{p.list=l.list,p.total=l.count})};m();const{getAgentList:F,getAgentTitle:ee}=R();F();let i=b(!1),r=b(!1),c=b(0);const y=l=>{c.value=l,r.value=!0,h(()=>{i.value=!0})},B=()=>{r.value=!1,c.value=0},x=()=>{c.value=0,r.value=!0,h(()=>{i.value=!0})},C=l=>{q.confirm("\u786E\u5B9A\u5220\u9664\u5417\uFF1F","\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(()=>{N(l).then(a=>{M.success("\u5220\u9664\u6210\u529F"),m()})})};return(l,a)=>{const g=_("el-button"),s=_("el-table-column"),k=_("el-table"),A=_("el-pagination");return E(),z($,null,[n("div",H,[n("div",S,[e(g,{class:"btn",type:"primary",onClick:x},{default:d(()=>[G]),_:1})]),n("div",J,[e(k,{data:o(p).list},{default:d(()=>[e(s,{type:"selection",width:"55"}),e(s,{label:"id",prop:"id"}),e(s,{label:"\u6839\u636E\u7C7B\u578B",prop:"type"}),e(s,{label:"\u5339\u914Did",prop:"match_ids"}),e(s,{label:"\u661F\u671F\u51E0",prop:"week"}),e(s,{label:"\u6267\u884C\u65F6\u95F4",prop:"execute_time"}),e(s,{label:"\u8425\u4E1A\u65F6\u95F4",prop:"business_hours"}),e(s,{label:"\u64CD\u4F5C"},{default:d(t=>[n("div",K,[n("div",O,[e(g,{type:"primary",onClick:D=>y(t.row.id)},{default:d(()=>[P]),_:2},1032,["onClick"]),e(g,{type:"danger",onClick:D=>C(t.row.id)},{default:d(()=>[Q]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])])]),n("div",W,[n("div",X,[e(A,{"current-page":o(u).page,"onUpdate:current-page":a[0]||(a[0]=t=>o(u).page=t),"page-size":o(u).limit,"onUpdate:page-size":a[1]||(a[1]=t=>o(u).limit=t),"page-limit":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:o(p).total},null,8,["current-page","page-size","total"])])]),o(r)?(E(),I(w,{key:0,modelValue:o(i),"onUpdate:modelValue":a[2]||(a[2]=t=>L(i)?i.value=t:i=t),EditId:o(c),onHideEdit:B,onRefresh:a[3]||(a[3]=t=>m())},null,8,["modelValue","EditId"])):U("",!0)],64)}}});const le=j(Y,[["__scopeId","data-v-31c5a30b"]]);export{le as default};
