import{o as p,g as d,a as i,f as m,t as g,j as x,b as o,w as r,u as a,c as k,h,F as v,i as c}from"./app-DnroACXc.js";import{i as C,c as b}from"./app-DckefXYL.js";import{_ as $}from"./app-NIO7GT0c.js";import{L as y}from"./app-DM6WPmnv.js";import{_ as u}from"./app-KcnMuQGX.js";import{N}from"./app-C9iVkiu5.js";import{N as l}from"./app-CUPmXIij.js";import"./app-uFawAv7F.js";import"./app-BJhJ7lM8.js";import"./app-Dd07dUxy.js";import"./app-CYYQ_Zep.js";import"./app-Dpl5YSiv.js";import"./app-CF8nmC-F.js";import"./app-NVAx7Sc3.js";import"./app-CF0qXH5Q.js";import"./app-xECxwo4T.js";import"./app-BtWF1kMA.js";import"./app-B0NrURRk.js";import"./app-CGj1gg44.js";import"./app-B4bUdtyo.js";import"./app-BeuOvIof.js";import"./app-DSjO_8RR.js";import"./app-CZGZgDLc.js";import"./app-DrIi-dNq.js";import"./app-zueB50zj.js";import"./app-Co2SIBzr.js";import"./app-Cu6FD8m8.js";const G={style:{"text-align":"center","margin-top":"5em"}},w=i("div",{style:{"font-size":"2em","margin-bottom":"1em"}},[i("i",{class:"pi pi-exclamation-triangle !text-4xl text-gray-400"})],-1),B={class:"comment"},R={__name:"NotFoundBox",props:["message"],setup(e){return(t,n)=>(p(),d("div",G,[w,i("p",B,[m(g(e.message)+" ",1),x(t.$slots,"default")])]))}};function T(){const{utils:e,Tea:t}=C(this);this.createGroup=function(){e.popup("/ns/domains/groups/createPopup",{callback:function(){e.successRefresh("保存成功")}})},this.updateGroup=function(n){e.popup("/ns/domains/groups/group/updatePopup?groupId="+n,{callback:function(){e.successRefresh("保存成功")}})},this.deleteGroup=function(n){let _=this;e.confirm("确定要删除此分组吗？",function(){_.$post("/ns/domains/groups/group/delete").params({groupId:n}).success(function(){e.successRefresh("删除成功")})})}}const V={key:1},F=["onClick"],I=i("i",{class:"icon expand small"},null,-1),L=["onClick"],P=["onClick"],pt={__name:"index",setup(e){const t=b(new T);return(n,_)=>(p(),d(v,null,[o(N,null,{tabs:r(()=>[o(l,{href:"/ns/domains/groups",active:!0,name:"分组列表"}),o(l,{separator:""}),o(l,{static:"",onClick:c(a(t).createGroup,["prevent"]),name:"创建分组","action-create":""},null,8,["onClick"])]),_:1}),a(t).groups.length==0?(p(),k(R,{key:0},{default:r(()=>[m("暂时还没有分组。")]),_:1})):h("",!0),a(t).groups.length>0?(p(),d("div",V,[o(y,{items:a(t).groups},{default:r(()=>[o(u,{header:"分组名称",class:"name-column"},{body:r(({data:s})=>[i("a",{href:"",onClick:c(f=>a(t).updateGroup(s.id),["prevent"])},[m(g(s.name)+" ",1),I],8,F)]),_:1}),o(u,{header:"状态",class:"fixed-status-column"},{body:r(({data:s})=>[o($,{"v-is-on":s.isOn},null,8,["v-is-on"])]),_:1}),o(u,{header:"操作",class:"two op"},{body:r(({data:s})=>[i("a",{href:"",onClick:c(f=>a(t).updateGroup(s.id),["prevent"])},"修改",8,L),m("   "),i("a",{href:"",onClick:c(f=>a(t).deleteGroup(s.id),["prevent"])},"删除",8,P)]),_:1})]),_:1},8,["items"])])):h("",!0)],64))}};export{pt as default};
