File: /www/server/panel/BTPanel/static/js/index86.js
import{e as E,_ as m,M as x,cW as q,c as M,dc as G,da as H,i as U,cU as J}from"./utils-lib.js?v=1777008528";import{_ as $}from"./index118.js?v=1777008528";import{r as k,g as z,c as K,aI as W,e as a,x as w,w as Q,o as X,n as Y,j as Z,C as ee,v as c,p as o,q as g}from"./base-lib.js?v=1777008528";import{w as te,o as se,e as ae,F as oe,J as ne,E as re,g as ie}from"./index3.js?v=1777008528";import{u as le,f as ce,c as ue,d as S,g as pe,s as _e,h as me,a as C,i as de,j as fe,q as ge,k as ve}from"./useController13.js?v=1777008528";import{u as he,S as v}from"./useStore2.js?v=1777008528";import{i as be}from"./useController8.js?v=1777008528";import{u as ye}from"./index151.js?v=1777008528";import"./index.vue_vue_type_style_index_0_scoped_cdc7f4d3_lang.js?v=1777008528";import{getNetVersion as we,getPluginInfo as Se}from"./site.js?v=1777008528";const{isRefreshList:Ce,siteInfo:d}=he(),{editGeneralProject:je,addGeneralProject:Ee,setSiteInfo:xe}=v(),j=()=>{d.value=null,E({title:"添加.Net项目",area:72,component:()=>m(()=>import("./index193.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),showFooter:!0})},_=(e,n="")=>{xe(e,n),E({title:".Net项目管理["+e.name+"] -- 添加时间["+e.addtime+"]",area:[84,72],component:()=>m(()=>import("./index407.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)})},Ge=e=>{},ke=k([]),Be=z(()=>!!d.value),u=k({project_path:"",project_name:"",port:"",project_cmd:"",run_user:"www",project_ps:"",release_firewall:!1,dotnet_version:"",is_power_on:!1,bind_extranet:!1}),He=async(e,n,i)=>{try{await i.value.validate();const p={data:JSON.stringify({...e.value,is_power_on:e.value.is_power_on?1:0})},l=await(d.value?je:Ee)(p);return x.msg({dangerouslyUseHTMLString:!0,message:l.msg,type:l.status?"success":"error",duration:l.status?2e3:0,showClose:!l.status,customClass:"!max-w-[66rem]"}),Ce.value=!0,l.status}catch(p){return!1}},Ue=()=>{te({type:"all",path:u.value.project_path,change:e=>{u.value.project_path=e}})},Ne=async(e=!1)=>{try{const n=await we();if(ke.value=n.data.map(i=>({label:i,value:i})),e)return x.success("Net版本,刷新成功");u.value.dotnet_version=n.data[0]}catch(n){}},Je=async()=>{if(await Ne(),Be.value){const{project_config:e,ps:n}=d.value;Object.assign(u.value,{...e,project_ps:q(n),bind_extranet:e.bind_extranet===1,is_power_on:e.is_power_on===1,port:e.port})}},$e=()=>{Object.assign(u.value,{project_path:"",project_name:"",port:"",project_cmd:"",run_user:"www",project_ps:"",release_firewall:!1,dotnet_version:"",is_power_on:!1,bind_extranet:!1})},Pe=async()=>{try{const{data:e}=await Se({sName:"dotnet"});await se({name:"dotnet",softData:e})}catch(e){}},Te=K({__name:"index",setup(e){const{mainHeight:n,enterpriseRec:i}=M(),{getSiteList:p,setSiteInfo:h}=v(),{activeType:l,isRefreshList:b,siteInfo:y}=W(v()),{BtOperation:B}=G({options:[{type:"button",label:"添加项目",active:!0,onClick:j},{type:"button",label:".Net环境管理",onClick:Pe},{type:"button",label:"网站统计总览",onClick:()=>C("all")}]}),N=ye({key:"type_id",name:"Net分类",options:()=>[{label:"全部分类",value:"all"}],event:pe,ignore:["0"],field:"type_name"}),P=J([de(),fe({classList:ve}),{label:"删除项目",value:"delete",event:ge}]),{BtTable:T,BtPage:A,BtRefresh:O,BtSearch:V,BtColumn:L,BtBatch:D,BtTableCategory:I,refresh:R,config:F}=H({request:t=>{const{type_id:s,...r}=t;return p({...r,type_id:U(s)||s==="all"?"":s,table:"sites"})},columns:[ae(),le({onClick:t=>{_(t)}}),ce({onClick:(t,s)=>{if(s==="setting"){_(t,"state");return}const r=t.run?"stop":"start";_e(t,s==="restart"?s:r)}}),oe(),...i.value?[ne({storageKey:"/site/net_day_metric",onClick:C})]:[],re({table:"sites",width:200}),ue({onClick:t=>{be(()=>_(t,"ssl"))}}),ie([{title:"设置",onClick:t=>{_(t)}},{title:"删除",onClick:t=>{me(t)}}])],extension:[N,P],empty:()=>a("span",null,[w("您的列表为空,您可以"),a("span",{class:"bt-link",onClick:j},[w("添加一个项目")])])});return Q(b,async t=>{var s;if(t){if(await R(),(s=y.value)!=null&&s.name){const r=F.data.find(f=>f.name===y.value.name);r&&h(r)}b.value=!1}}),X(()=>{Y(()=>{m(()=>import("./index193.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),m(()=>import("./index407.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)})}),(t,s)=>{const r=$;return Z(),ee(r,null,{"header-left":c(()=>[a(o(B)),g("div",{class:"flex items-center ml-1rem",onClick:s[0]||(s[0]=(...f)=>o(S)&&o(S)(...f))},[...s[1]||(s[1]=[g("i",{class:"svgtofont-desired text-medium"},null,-1),g("span",{class:"bt-link"},"需求反馈",-1)])])]),"header-right":c(()=>[a(o(I),{class:"!w-[200px] mr-[10px]"}),a(o(V),{class:"mr-[10px]",placeholder:"请输入项目名称或备注"}),a(o(O),{class:"mr-[10px]"}),a(o(L))]),content:c(()=>[a(o(T))]),"footer-left":c(()=>[a(o(D))]),"footer-right":c(()=>[a(o(A))]),_:1})}}}),ze=Object.freeze(Object.defineProperty({__proto__:null,default:Te},Symbol.toStringTag,{value:"Module"}));export{$e as $,Ge as a,He as b,Je as c,Pe as d,ze as e,Ne as g,Be as i,u as n,Ue as o,ke as v};
function __vite__mapDeps(indexes) {
if (!__vite__mapDeps.viteFileDeps) {
__vite__mapDeps.viteFileDeps = []
}
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}