import{A as T}from"./index.1d26a072.js";import{d as U,a6 as L,b as x,r as B,p as $,c,e as f,f as I,g as i,h as e,i as o,u as t,k as b,A as h,a2 as M,F as j,m as v,y,N as q,E as F,_ as O}from"./index.0308b213.js";import{_ as Q,d as G,a as H,g as J,b as K}from"./AddBusiness.vue_vue_type_script_setup_true_lang.dc390e0b.js";import"./install.524ae6f2.js";import"./useAgent.c0cb1751.js";import"./list.5526c7ef.js";const R={class:"filter-form"},W=v("\u7B5B\u9009"),X={class:"data"},Y={class:"operation-btn",style:{"margin-bottom":"10px"}},Z=v("\u6DFB\u52A0\u5546\u4E1A\u533A"),ee={class:"table"},te={class:""},se={class:"top"},ae=v("\u7F16\u8F91"),ne=v("\u5220\u9664"),oe={class:"pagination"},le=U({setup(ue){const{OpPlatform:p}=L(),s=x({agentid:"",page:1,limit:10}),A=B(0),r=B(!1),m=B(!1),_=x({count:0,list:[]}),k=()=>{m.value=!0,y(()=>{r.value=!0})},D=()=>{A.value=0,r.value=!1,y(()=>{m.value=!1}),u()},V=l=>{A.value=l,m.value=!0,y(()=>{r.value=!0})},E=()=>{u()},w=()=>p.value=="agent"?J(s):K(s),u=()=>{w().then(l=>{_.count=l.count,_.list=l.list})};$(()=>[s.page,s.limit,s.agentid],()=>{u()}),u();const z=l=>{q.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u5546\u4E1A\u533A\u5417?\u5220\u9664\u81EA\u52A8\u89E3\u7ED1!","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{p.value=="agent"?G(l).then(a=>{F({message:a.msg,type:"success"}),u()}):H(l).then(a=>{F({message:a.msg,type:"success"}),u()})}).catch(()=>{u()})};return(l,a)=>{const C=c("el-form-item"),g=c("el-button"),d=c("el-table-column"),N=c("el-table"),P=c("el-pagination");return f(),I(j,null,[i("div",R,[e(t(M),{model:t(s),"label-width":"80px"},{default:o(()=>[t(p)=="shangpu"?(f(),b(C,{key:0,class:"tn-el-form-item",label:"\u4EE3\u7406\u533A\u57DF"},{default:o(()=>[e(t(T),{modelValue:t(s).agentid,"onUpdate:modelValue":a[0]||(a[0]=n=>t(s).agentid=n),onChange:E},null,8,["modelValue"])]),_:1})):h("",!0),e(C,null,{default:o(()=>[e(g,{type:"primary",onClick:E},{default:o(()=>[W]),_:1})]),_:1})]),_:1},8,["model"])]),i("div",X,[i("div",Y,[e(g,{class:"btn",type:"primary",onClick:k},{default:o(()=>[Z]),_:1})]),i("div",ee,[e(N,{data:t(_).list},{default:o(()=>[e(d,{fixed:"",label:"\u5546\u4E1A\u533A\u540D\u79F0",prop:"title",align:"center"}),e(d,{fixed:"",label:"\u6392\u5E8F",prop:"displayorder",align:"center"}),t(p)==="shangpu"?(f(),b(d,{key:0,label:"\u6240\u5C5E\u57CE\u5E02",prop:"agentid_title",align:"center"})):h("",!0),e(d,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createtime_cn",align:"center"}),e(d,{label:"\u64CD\u4F5C",width:"auto"},{default:o(n=>[i("div",te,[i("div",se,[e(g,{size:"medium",type:"primary",onClick:S=>V(n.row.id)},{default:o(()=>[ae]),_:2},1032,["onClick"]),e(g,{size:"medium",type:"danger",onClick:S=>z(n.row.id)},{default:o(()=>[ne]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])])]),i("div",oe,[e(P,{currentPage:t(s).page,"onUpdate:currentPage":a[1]||(a[1]=n=>t(s).page=n),"page-size":t(s).limit,"onUpdate:page-size":a[2]||(a[2]=n=>t(s).limit=n),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:t(_).count},null,8,["currentPage","page-size","total"])]),m.value?(f(),b(Q,{key:0,modelValue:r.value,"onUpdate:modelValue":a[3]||(a[3]=n=>r.value=n),id:A.value,onClose:D},null,8,["modelValue","id"])):h("",!0)],64)}}});const _e=O(le,[["__scopeId","data-v-8651d888"]]);export{_e as default};
