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-SC54XQDl.js";import{i as C,c as b}from"./app-Ba7ZqSpq.js";import{_ as $}from"./app-BY_oRVaR.js";import{L as y}from"./app-Crd12MWL.js";import{_ as u}from"./app-CWnUJ4gg.js";import{N}from"./app-CL60OiIv.js";import{N as l}from"./app-B2C_dtYI.js";import"./app-DHsI_tns.js";import"./app-BZGObKCm.js";import"./app-BPIIxVwk.js";import"./app-PPG0ZS4d.js";import"./app-DgoEZtNT.js";import"./app-Ch8j4za4.js";import"./app-Dw0jKdCD.js";import"./app-DnXuoh8P.js";import"./app-CCkWSX4Q.js";import"./app-C8HFiBxn.js";import"./app-BjSCO7rC.js";import"./app-g-bJrEAS.js";import"./app-DZaelcLs.js";import"./app-D_RBJHM6.js";import"./app-CmrRgGIA.js";import"./app-DyP4Nide.js";import"./app-D9TrJBlL.js";import"./app-_Ovp2dOH.js";import"./app-Dhl-Bw0H.js";import"./app-COidJXl1.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};
