import{_ as q,g as I,d as L,c as M,s as O}from"./EditSlideDialog.vue_vue_type_script_setup_true_lang.21053ca6.js";import{d as $,a6 as j,b as F,r as E,p as R,c as u,e as B,f as G,g as m,h as t,i as a,u as i,k as H,q as J,A as K,F as Q,m as f,N as W,E as b,y,_ as X}from"./index.0308b213.js";import"./useInstance.233fbdde.js";import"./index.de7bcb5e.js";import"./install.524ae6f2.js";import"./index.1d26a072.js";import"./useAgent.c0cb1751.js";import"./list.5526c7ef.js";import"./index.e2f68f5b.js";import"./index.dfdc0704.js";import"./index.vue_vue_type_style_index_0_scoped_f00ed21d_lang.2c48f49b.js";import"./vuedraggable.umd.405b1bec.js";import"./index.35b8c9ab.js";import"./index.9e8820cd.js";import"./sort_out.2008c10d.js";const Y={class:"filter-form"},Z=f("\u7B5B\u9009"),ee={class:"data"},te={class:"table"},ae={class:"operation-container"},le={class:"operation-btn"},oe=f("\u6DFB\u52A0\u5E7B\u706F\u7247"),se=f("\u63D0\u4EA4\u4FEE\u6539"),ne=f("\u7F16\u8F91"),ue=f("\u5220\u9664"),ie={class:"pagination"},de=$({setup(re){const{OpPlatform:V}=j(),d=F({page:1,limit:10}),_=F({lists:[],count:0}),r=()=>{V.value=="agent"||I(d).then(l=>{_.lists=l.lists,_.count=l.count})};r();const x=l=>{W.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u8BE5\u5E7B\u706F\u7247\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{V.value=="agent"||L({id:l}).then(()=>{b.success("\u5220\u9664\u5E7B\u706F\u7247\u6210\u529F"),r()})})};let p=E(!1),v=E(!1),h=E(0);const k=()=>{h.value=0,v.value=!0,y(()=>{p.value=!0})},S=l=>{h.value=l,v.value=!0,y(()=>{p.value=!0})},A=()=>{h.value=0,y(()=>{v.value=!1}),r()},D=(l,o)=>{M({id:o,status:l}).then(s=>{b({message:s.msg,type:"success"}),r()})},U=()=>{let l=[],o=[],s=[];_.lists.forEach((c,w)=>{l.push(c.id),o.push(c.advname),s.push(c.displayorder)}),O({ids:l,titles:o,displayorders:s}).then(c=>{b({message:c.msg,type:"success"}),r()})};return R(()=>[d.page,d.limit],()=>{r()},{deep:!0}),(l,o)=>{const s=u("el-button"),c=u("el-form-item"),w=u("el-form"),z=u("el-avatar"),g=u("el-table-column"),C=u("el-input"),N=u("el-switch"),P=u("el-table"),T=u("el-pagination");return B(),G(Q,null,[m("div",Y,[t(w,null,{default:a(()=>[t(c,null,{default:a(()=>[t(s,{type:"primary",onClick:r},{default:a(()=>[Z]),_:1})]),_:1})]),_:1})]),m("div",ee,[m("div",te,[m("div",ae,[m("div",le,[t(s,{class:"btn",type:"primary",onClick:k},{default:a(()=>[oe]),_:1}),t(s,{class:"btn",type:"warning",onClick:U},{default:a(()=>[se]),_:1})])]),t(P,{data:i(_).lists},{default:a(()=>[t(g,{label:"\u5546\u54C1\u7F29\u7565\u56FE","min-width":"60"},{default:a(({row:e})=>[t(z,{size:50,src:e.thumb},null,8,["src"])]),_:1}),t(g,{align:"center",label:"\u6392\u5E8F"},{default:a(e=>[t(C,{modelValue:e.row.displayorder,"onUpdate:modelValue":n=>e.row.displayorder=n},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t(g,{align:"center",label:"\u6807\u9898"},{default:a(e=>[t(C,{modelValue:e.row.advname,"onUpdate:modelValue":n=>e.row.advname=n},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t(g,{label:"\u662F\u5426\u542F\u7528"},{default:a(e=>[t(N,{modelValue:e.row.status,"onUpdate:modelValue":n=>e.row.status=n,size:"large",width:60,"inline-prompt":"","active-text":"\u542F\u7528","inactive-text":"\u7981\u7528","active-value":1,"inactive-value":0,onChange:n=>D(n,e.row.id)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1}),t(g,{align:"center",label:"\u4FEE\u6539/\u5220\u9664"},{default:a(e=>[t(s,{type:"primary",onClick:n=>S(e.row.id)},{default:a(()=>[ne]),_:2},1032,["onClick"]),t(s,{type:"danger",onClick:n=>x(e.row.id)},{default:a(()=>[ue]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])])]),m("div",ie,[t(T,{currentPage:i(d).page,"onUpdate:currentPage":o[0]||(o[0]=e=>i(d).page=e),"page-size":i(d).limit,"onUpdate:page-size":o[1]||(o[1]=e=>i(d).limit=e),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:i(_).count},null,8,["currentPage","page-size","total"])]),i(v)?(B(),H(q,{key:0,modelValue:i(p),"onUpdate:modelValue":o[2]||(o[2]=e=>J(p)?p.value=e:p=e),id:i(h),onOnClose:A},null,8,["modelValue","id"])):K("",!0)],64)}}});const Be=X(de,[["__scopeId","data-v-25ad8a10"]]);export{Be as default};
