import{o as n,g as c,b as o,w as a,u as s,c as f,h as _,F as h,i as p,f as m,a as l,t as d}from"./app-DA7OTM4Q.js";import{i as k,c as y}from"./app-BT68AfZ-.js";import{_ as b}from"./app-CmBuubL0.js";import{_ as C}from"./app-D21nXKzm.js";import{_ as r}from"./app-Dapk2SAF.js";import{L as g}from"./app-CjSxNKvA.js";import{_ as v}from"./app-BWsCS5pa.js";import{_ as x}from"./app-j31z0Ghb.js";import{_ as A}from"./app-C6hnOMuv.js";import"./app-scFtFqL8.js";import"./app-DREBJ-ou.js";import"./app-CWBL8eTX.js";import"./app-CnGe5nlE.js";import"./app-OC5wWJiS.js";import"./app-BX4pd6U-.js";import"./app-Bhreb6Cm.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-45ZaIHUI.js";import"./app-KNE_24OY.js";import"./app-SLkqftrw.js";import"./app-BxVwOz69.js";import"./app-WOreqTiW.js";import"./app-up4gT9D9.js";import"./app-D29bbm9n.js";import"./app-B_5dka6q.js";import"./app-CQwVTjAx.js";import"./app-Zes_jb7S.js";function $(){const{utils:i}=k(this);this.createAccount=function(){i.popup(".createPopup",{callback:function(){i.success("保存成功",function(){i.reload()})}})},this.updateAccount=function(e){i.popup(".updatePopup?accountId="+e,{callback:function(){i.success("保存成功",function(){i.reload()})}})},this.deleteAccount=function(e){i.confirm("确定要删除此账号吗？",function(){this.$post(".delete").params({accountId:e}).refresh()})}}const B={key:1},K=["onClick"],w=l("i",{class:"icon expand small"},null,-1),N={key:0},V={key:0},z={key:1,class:"disabled"},E={key:0},F={key:1,class:"disabled"},I=["onClick"],L=["onClick"],Ct={__name:"index",setup(i){const e=y(new $);return(M,P)=>(n(),c(h,null,[o(b),o(x,null,{default:a(()=>[o(A,{onClick:p(s(e).createAccount,["prevent"]),"action-create":""},{default:a(()=>[m("创建账号")]),_:1},8,["onClick"])]),_:1}),s(e).accounts.length==0?(n(),f(v,{key:0},{default:a(()=>[m("暂时还没有服务商账号。")]),_:1})):_("",!0),s(e).accounts.length>0?(n(),c("div",B,[o(g,{items:s(e).accounts},{default:a(()=>[o(r,{header:"名称",class:"name-column",frozen:""},{body:a(({data:t})=>[l("a",{href:"",onClick:p(u=>s(e).updateAccount(t.id),["prevent"])},[m(d(t.name)+" ",1),w],8,K)]),_:1}),o(r,{header:"服务商",class:"name-column"},{body:a(({data:t})=>[t.provider!=null?(n(),c("span",N,d(t.provider.name),1)):_("",!0)]),_:1}),o(r,{header:"EAB Kid",class:"description-column"},{body:a(({data:t})=>[t.eabKid.length>0?(n(),c("span",V,d(t.eabKid),1)):(n(),c("span",z,"-"))]),_:1}),o(r,{header:"EBA HMAC Key",class:"description-column"},{body:a(({data:t})=>[t.eabKey.length>0?(n(),c("span",E,d(t.eabKey),1)):(n(),c("span",F,"-"))]),_:1}),o(r,{header:"操作",class:"two op",frozen:"","align-frozen":"right"},{body:a(({data:t})=>[l("a",{href:"",onClick:p(u=>s(e).updateAccount(t.id),["prevent"])},"修改",8,I),m("   "),l("a",{href:"",onClick:p(u=>s(e).deleteAccount(t.id),["prevent"])},"删除",8,L)]),_:1})]),_:1},8,["items"])])):_("",!0),o(C,{data:s(e).page},null,8,["data"])],64))}};export{Ct as default};
