import{b as y,c as F}from"./setting.ffe79858.js";import{d as w,b as g,p as D,c as o,e as V,f as B,g as s,h as t,i,u as n,F as C,m as A,E as z,_ as k}from"./index.0308b213.js";const S={class:"filter-form"},U=A("\u67E5\u8BE2"),N={class:"data"},P={class:"table"},I={class:"switch"},L={class:"pagination"},M=w({setup(j){const a=g({page:1,limit:10,title:""}),u=g({list:[],count:0}),p=()=>{y(a).then(c=>{u.count=c.count,u.list=c.agents.map((e,r)=>({id:e.id,title:e.title,special_delivery:e.special_delivery}))})},f=(c,e)=>{F(e).then(()=>{z.success("\u4FEE\u6539\u72B6\u6001\u6210\u529F")})};return p(),D(()=>[a.page,a.limit],()=>{p()}),(c,e)=>{const r=o("el-input"),m=o("el-form-item"),v=o("el-button"),b=o("el-form"),_=o("el-table-column"),E=o("el-switch"),h=o("el-table"),x=o("el-pagination");return V(),B(C,null,[s("div",S,[t(b,{"label-width":"80px"},{default:i(()=>[t(m,{class:"tn-el-form-item",label:"\u4EE3\u7406\u540D\u79F0"},{default:i(()=>[t(r,{modelValue:n(a).title,"onUpdate:modelValue":e[0]||(e[0]=l=>n(a).title=l),style:{width:"500px"},placeholder:"\u8BF7\u8F93\u5165\u4EE3\u7406\u540D\u79F0\u8FDB\u884C\u641C\u7D22"},null,8,["modelValue"])]),_:1}),t(m,{width:"100"},{default:i(()=>[t(v,{type:"primary",onClick:e[1]||(e[1]=l=>p())},{default:i(()=>[U]),_:1})]),_:1})]),_:1})]),s("div",N,[s("div",P,[t(h,{data:n(u).list},{default:i(()=>[t(_,{label:"\u4EE3\u7406ID",prop:"id"}),t(_,{label:"\u4EE3\u7406\u533A\u57DF",prop:"title"}),t(_,{label:"\u7279\u6B8A\u914D\u9001\u72B6\u6001"},{default:i(l=>[s("div",I,[t(E,{modelValue:l.row.special_delivery,"onUpdate:modelValue":d=>l.row.special_delivery=d,size:"large",width:60,"inline-prompt":"","active-text":"\u5F00\u542F","inactive-text":"\u5173\u95ED","active-value":1,"inactive-value":0,onClick:d=>f(d,l.row.id)},null,8,["modelValue","onUpdate:modelValue","onClick"])])]),_:1})]),_:1},8,["data"])])]),s("div",L,[t(x,{currentPage:n(a).page,"onUpdate:currentPage":e[2]||(e[2]=l=>n(a).page=l),"page-size":n(a).limit,"onUpdate:page-size":e[3]||(e[3]=l=>n(a).limit=l),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:n(u).count},null,8,["currentPage","page-size","total"])])],64)}}});const $=k(M,[["__scopeId","data-v-0ecff66b"]]);export{$ as default};
