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-DA7OTM4Q.js";import{i as C,c as b}from"./app-BT68AfZ-.js";import{_ as $}from"./app-CHDDk_lH.js";import{L as y}from"./app-CjSxNKvA.js";import{_ as u}from"./app-Dapk2SAF.js";import{N}from"./app-scFtFqL8.js";import{N as l}from"./app-BX4pd6U-.js";import"./app-z_TsLOhk.js";import"./app-C5ROEzFd.js";import"./app-Bnbo6OlJ.js";import"./app-Dxa5h-uG.js";import"./app-AbPAjGV5.js";import"./app-BqY8p2gl.js";import"./app-C-GI59rl.js";import"./app-DSiZNBrr.js";import"./app-BotiHebp.js";import"./app-DUjqI3OV.js";import"./app-CnGe5nlE.js";import"./app-45ZaIHUI.js";import"./app-KNE_24OY.js";import"./app-SLkqftrw.js";import"./app-BxVwOz69.js";import"./app-WOreqTiW.js";import"./app-DREBJ-ou.js";import"./app-CWBL8eTX.js";import"./app-OC5wWJiS.js";import"./app-Bhreb6Cm.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};
