import{n as a,Q as t,P as e,bJ as s,M as o,p as r}from"./utils-lib.js?v=1761009159";import{modifyJavaProject as n,addJavaProject as i,getTomcat as m,fixProject as c,batchStatus as l,batchDelSite as p}from"./site.js?v=1761009159";import{g as u}from"./base-lib.js?v=1761009159";import{c as _}from"./column.js?v=1761009159";import{i as d,o as v,h as j}from"./validator.js?v=1761009159";import{u as f,S as w}from"./useStore4.js?v=1761009159";const{siteInfo:y,activeType:E,isRefreshList:b}=f(),{setSiteInfo:g}=w(),J=u(()=>!!y.value),O=()=>{y.value=null,a({title:"添加Java项目",area:[68],compData:{isEdit:!1},component:()=>t(()=>import("./index359.js?v=1761009159"),__vite__mapDeps([]),import.meta.url),showFooter:!0})},A=()=>{a({title:"Java漏洞扫描",area:[80,60],component:()=>t(()=>import("./index361.js?v=1761009159"),__vite__mapDeps([]),import.meta.url)})},h=()=>{a({title:"项目组管理",area:60,component:()=>t(()=>import("./index362.js?v=1761009159"),__vite__mapDeps([]),import.meta.url),showFooter:!1})},x=(e,s="")=>{g(e,s),a({title:"Java项目管理["+e.name+"] -- 添加时间["+e.addtime+"]",area:[84,72],component:()=>t(()=>import("./index360.js?v=1761009159"),__vite__mapDeps([]),import.meta.url)})},D=async(a,t)=>{const s={data:JSON.stringify(a)},o=await e({loading:"正在提交，请稍后...",request:J.value?n(s):i(s),message:!0});return o.status&&(b.value=!0),o.status},I=(e="jdkSettings")=>{a({isAsync:!0,title:"JAVA环境管理",area:[110,54],component:()=>t(()=>import("./index363.js?v=1761009159").then(a=>a.k),__vite__mapDeps([]),import.meta.url),compData:{name:e}})},S=async(a,t,e,s,o,r)=>{const{label:n,value:i}=s,{enable:m,exclude:c}=r,u=new Map([["start","批量启动选中项目后，项目将正常访问"],["stop","批量停用选中的项目后，项目将会停止运行"],["restart","批量重启选中的项目后，项目将会重新启动"],["delete","批量删除选中的项目后，项目将无法恢复"]]);await a({title:"批量".concat(n),content:"".concat(u.get(i),"，是否继续操作？"),column:[{label:"项目名称",prop:"name"},_()],onConfirm:async()=>{const a=await(async()=>{const a=new Map([["start",l],["stop",l],["restart",l],["delete",p]]).get(i);switch(i){case"start":case"stop":case"restart":if(a){const t=e.value.map(a=>({project_name:a.name})),s=j(!1,c,m,{params:{site_list:JSON.stringify(t),status:i,project_type:E.value.toUpperCase()}});return await a(s,E.value)}case"delete":if(a){const t=j(e.value,c,m,{params:{project_type:E.value.toUpperCase()}});return await a(t)}}})();b.value=!0,o&&o();let{data:t}=d(a.data);t=t.map(a=>({...a,name:a.name||a.project_name})),v(t,{title:"".concat(n,"网站")})}})},T=async a=>{try{const t=await m();if(!s(t.data)||Object.values(t.data).some(a=>a.status)){await r({title:"修复项目",content:"您正在修复Java项目-[ "+a.name+" ]，是否继续吗？"});let t=o.load("正在修复中,请稍后...");const e=await c({data:JSON.stringify({project_name:a.name})});t.close(),o.request(e),b.value=!0}else o.error("当前tomcat版本未安装，请安装后重试！"),I("newTomCat")}catch(t){}};export{A as a,I as b,h as c,x as d,D as e,J as i,O as o,T as r,S as u};
function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = []
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
