var e;import{_ as a}from"./index.vue_vue_type_script_setup_true_lang4.js?v=20260328163632";import{aa as s,l as t,ao as o,aD as l,aB as r,a4 as i,$ as n,ac as u,aq as d,A as m,a7 as c,z as p,x as v,M as f,a3 as h,q as _,a1 as g,a2 as k}from"./utils-lib.js?v=20260328163632";import{B as x}from"./index91.js?v=20260328163632";import{B as j}from"./index98.js?v=20260328163632";import{u as y}from"./index92.js?v=20260328163632";import{u as b,b as w,k as C,f as R,e as L}from"./useMethod4.js?v=20260328163632";import{u as O}from"./store4.js?v=20260328163632";import{k as B,A as H}from"./site.js?v=20260328163632";import{r as M,O as T,k as q,w as z,o as I,J as S,V,W as E,a3 as A,Y as K,F as U,N as D,X as W,Z as F}from"./base-lib.js?v=20260328163632";import{au as P}from"./naive-ui.js?v=20260328163632";import"./index97.js?v=20260328163632";import"./__commonjsHelpers__.js?v=20260328163632";import"./env-lib.js?v=20260328163632";const{siteInfo:J,pluginInfo:N,isRefreshList:X,setSiteInfo:Y}=O(),Z=M([]),$=e=>e.id,G=M(""),Q=M(""),ee=(e,a="")=>{Y(e,a),m({title:t("HTML项目管理[{0}] -- 添加时间[{1}]",[e.name,e.addtime]),area:[840,720],component:()=>c((()=>import("./index179.js?v=20260328163632")),[],import.meta.url)})},ae=M({columns:[s(),{title:t("项目名称"),key:"name",isCustom:!1,...o(),render:e=>T("span",{class:"bt-link",onClick:()=>ee(e)},[e.name])},l({key:"path",minWidth:140}),...b(),r({table:"sites",minWidth:110,width:"auto",request:L}),w({onClick:e=>{ee(e,"ssl")}}),i([{onClick:e=>ee(e),title:t("设置")},{onClick:async e=>{await p({title:t("删除HTML项目【{0}】",[e.name]),content:t("风险操作，此操作不可逆，删除【{0}】项目后您将无法管理该项目，是否继续操作？",[e.name])}),v({loading:t("正在删除HTML项目，请稍后..."),request:B({siteid:e.id}),success:e=>{f.msg({customClass:"bt-message-error-html",isHtml:!0,message:e.data.msg,type:e.data.status?"success":"error",duration:e.data.status?3e3:0,showClose:!e.data.status}),me()}})},title:t("删除")}])],data:[]}),se=M({page:1,pageSize:20,itemCount:0,pageSlot:5}),[te,oe]=n(ae),[le]=h(se),{BtBatch:re}=u({tableRef:oe,checkedRowKeys:Z,options:[{label:t("删除项目"),value:"delete",event:C}]}),{BtColumn:ie}=d({tableRef:oe,column:ae.value.columns}),{BtOperation:ne}=y({options:[{active:!0,label:t("添加HTML项目"),onClick:()=>{J.value=null,m({title:t("添加HTML项目"),area:"auto",component:()=>c((()=>import("./index178.js?v=20260328163632")),[],import.meta.url),showFooter:!0})}},...R(),{type:"custom",hide:-1===(null==(e=N.value)?void 0:e.status_code),render:()=>T(j,{isRequest:!1,pluginInfo:N.value},null)}]}),ue=e=>{ae.value.columns.forEach((a=>{void 0!==a.sortOrder&&(e&&a.key===e.columnKey?a.sortOrder=e.order:a.sortOrder=!1)}));const{order:a,columnKey:s}=e;Q.value=a?"".concat(s," ").concat("descend"===a?"desc":"asc"):"",me()},de=()=>{se.value.page=1,me()},me=(e={search_type:"html",search:G.value,p:se.value.page,limit:se.value.pageSize,order:Q.value})=>{v({request:H(e),success:e=>{var a;const{data:s,page:t}=e.data;if(ae.value.data=s||[],se.value.itemCount=(null==t?void 0:t.total)||0,(null==(a=J.value)?void 0:a.id)&&(null==s?void 0:s.length)){const e=null==s?void 0:s.find((e=>e.id===J.value.id));e&&(J.value=e)}}})},ce=()=>{pe(),me()},pe=()=>{G.value="",ae.value.data=[],Z.value=[],Object.assign(se.value,{page:1,itemCount:0})},ve={class:"text-14px text-[var(--text-color-2)]"},fe=q({__name:"index",setup(e){const{isRefreshList:s}=O();return z((()=>s.value),(e=>{e&&(me(),s.value=!1)})),I(ce),S(pe),(e,s)=>{const o=P;return V(),E(U,null,[T(a),T(K(k),null,{"header-left":A((()=>[T(K(ne),{class:"!gap-10px"})])),"header-right":A((()=>[T(o,{class:"!gap-10px"},{default:A((()=>[T(K(_),{modelValue:K(G),"onUpdate:modelValue":s[0]||(s[0]=e=>D(G)?G.value=e:null),placeholder:K(t)("请输入项目名称或备注"),class:"!w-[220px]",onSearch:K(de)},null,8,["modelValue","placeholder","onSearch"]),T(K(x),{onRefresh:K(me)},null,8,["onRefresh"]),T(K(ie))])),_:1})])),content:A((()=>[T(K(te),{"checked-row-keys":K(Z),"onUpdate:checkedRowKeys":s[1]||(s[1]=e=>D(Z)?Z.value=e:null),"row-key":K($),"onUpdate:sorter":K(ue)},null,8,["checked-row-keys","row-key","onUpdate:sorter"])])),"footer-left":A((()=>[T(K(re))])),"footer-right":A((()=>[T(K(le),{"show-size-picker":"","page-sizes":K(g)([10,20,50,100]),onRefresh:K(me)},{suffix:A((()=>[W("span",ve,F(K(t)("共 {0} 条",[K(se).itemCount])),1)])),_:1},8,["page-sizes","onRefresh"])])),_:1})],64)}}});export{fe as default};
