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