import{az as F,d as N,a6 as T,b,r as E,p as U,c as i,e as h,f as O,g as d,h as t,i as o,u as e,k as x,A as y,q as I,F as M,m as f,N as S,E as $,y as B,_ as j}from"./index.0308b213.js";import{A as L}from"./index.1d26a072.js";import{_ as R}from"./EditConfigDialog.vue_vue_type_script_setup_true_lang.8b00ca32.js";import"./install.524ae6f2.js";import"./useAgent.c0cb1751.js";import"./list.5526c7ef.js";const G=c=>F.request({url:"addon/hand2.hand_config/list",params:c}),J=c=>F.request({url:"addon/hand2.hand_config/delete",method:"POST",data:{id:c}}),K={class:"filter-form"},Q=f("\u7B5B\u9009"),W={class:"data"},X={class:"table"},Y={class:"operation-container"},Z={class:"operation-btn"},ee=f("\u6DFB\u52A0\u8BBE\u7F6E"),te=f("\u7F16\u8F91"),ae=f("\u5220\u9664"),ne={class:"pagination"},oe=N({setup(c){const{OpPlatform:k}=T(),n=b({page:1,limit:10,agentid:""}),_=b({list:[],count:0}),r=()=>{G(n).then(s=>{_.list=s.list,_.count=s.count})};r();const A=s=>{S.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u8BE5\u8BBE\u7F6E\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{J(s).then(()=>{$.success("\u5220\u9664\u8BBE\u7F6E\u6210\u529F")}),r()})};let u=E(!1),p=E(!1),m=E(0);const D=()=>{m.value=0,p.value=!0,B(()=>{u.value=!0})},V=s=>{m.value=s,p.value=!0,B(()=>{u.value=!0})},w=()=>{m.value=0,B(()=>{p.value=!1}),r()};return U(()=>[n.page,n.limit,n.agentid],()=>{r()},{deep:!0}),(s,l)=>{const C=i("el-form-item"),g=i("el-button"),z=i("el-form"),v=i("el-table-column"),H=i("el-table"),P=i("el-pagination");return h(),O(M,null,[d("div",K,[t(z,{"label-width":"90px"},{default:o(()=>[e(k)==="shangpu"?(h(),x(C,{key:0,label:"\u4EE3\u7406\u533A\u57DF"},{default:o(()=>[t(e(L),{modelValue:e(n).agentid,"onUpdate:modelValue":l[0]||(l[0]=a=>e(n).agentid=a)},null,8,["modelValue"])]),_:1})):y("",!0),t(C,null,{default:o(()=>[t(g,{type:"primary",onClick:r},{default:o(()=>[Q]),_:1})]),_:1})]),_:1})]),d("div",W,[d("div",X,[d("div",Y,[d("div",Z,[t(g,{class:"btn",type:"primary",onClick:D},{default:o(()=>[ee]),_:1})])]),t(H,{data:e(_).list},{default:o(()=>[t(v,{prop:"agent_title",align:"center",label:"\u4EE3\u7406\u540D\u79F0"}),t(v,{prop:"name",align:"center",label:"\u540D\u79F0"}),t(v,{align:"center",label:"\u4FEE\u6539/\u5220\u9664"},{default:o(a=>[t(g,{type:"primary",onClick:q=>V(a.row.id)},{default:o(()=>[te]),_:2},1032,["onClick"]),t(g,{type:"danger",onClick:q=>A(a.row.id)},{default:o(()=>[ae]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])])]),d("div",ne,[t(P,{currentPage:e(n).page,"onUpdate:currentPage":l[1]||(l[1]=a=>e(n).page=a),"page-size":e(n).limit,"onUpdate:page-size":l[2]||(l[2]=a=>e(n).limit=a),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:e(_).count},null,8,["currentPage","page-size","total"])]),e(p)?(h(),x(R,{key:0,modelValue:e(u),"onUpdate:modelValue":l[3]||(l[3]=a=>I(u)?u.value=a:u=a),id:e(m),onOnClose:w},null,8,["modelValue","id"])):y("",!0)],64)}}});const ce=j(oe,[["__scopeId","data-v-13dfeb26"]]);export{ce as default};
