import{l as s,a4 as e,$ as t,a2 as a,x as r,M as i,ai as o}from"./utils-lib.js?v=20260328163632";import{c5 as n,c6 as p}from"./site.js?v=20260328163632";import{B as u}from"./index91.js?v=20260328163632";import{u as d}from"./store4.js?v=20260328163632";import{u as l,p as m,q as c}from"./index.vue_vue_type_script_setup_true_lang9.js?v=20260328163632";import{k as _,i as j,r as x,o as y,U as b,l as f,Y as g,V as v,_ as h,a3 as k,O as w}from"./base-lib.js?v=20260328163632";import"./naive-ui.js?v=20260328163632";import"./__commonjsHelpers__.js?v=20260328163632";import"./env-lib.js?v=20260328163632";import"./index84.js?v=20260328163632";import"./useMethod4.js?v=20260328163632";import"./index.vue_vue_type_script_setup_true_lang10.js?v=20260328163632";import"./index158.js?v=20260328163632";import"./ace.js?v=20260328163632";import"./index88.js?v=20260328163632";import"./index118.js?v=20260328163632";import"./logs.js?v=20260328163632";const q=_({__name:"index",setup(o,{expose:_}){const q=j("popupClose",(()=>{})),{siteInfo:I,isRefreshList:T}=d();l();const A=x(!1),B=async e=>(await r({loading:s("正在部署证书域名，请稍后..."),request:n({domain:m.value.name,path:e.certFile,password:e.password,...e.orderId?{orderId:e.orderId}:{},...e.sslType?{sslType:e.sslType}:{}}),success:t=>{t.msg.includes("password")?(i.error(s("证书密码错误")),c((s=>B({...e,password:s})))):(t.status&&(T.value=!0,q()),i.request(t))}})).status,C=x({columns:[{title:s("证书域名"),key:"subject",render:s=>s.subject.split("<br>")},{title:s("到期时间"),key:"notAfter"},{title:s("品牌"),key:"issuer"},e([{title:s("部署"),onClick:s=>{B(s)}}])],data:[]}),[L,M]=t(C),R=async()=>{r({loading:A,request:p({siteid:I.value.id}),data:Array,success:s=>{C.value.data=s||[]}})};return y(R),_({init:R}),(s,e)=>{const t=b("bt-loading");return f((v(),h(g(a),null,{"header-right":k((()=>[w(g(u),{onRefresh:R})])),content:k((()=>[w(g(L),{"max-height":400})])),_:1})),[[t,g(A)]])}}}),I=_({__name:"index",setup(e){const{BtTabs:t}=o({type:"card",options:[{tab:s("证书列表"),name:"certList",render:q}]});return(s,e)=>(v(),h(g(t),{class:"p-20px no-bg"}))}});export{I as default};
