← Back
Editing: index73.js
import{l as e,L as t,M as a,fg as s,u as o,aM as r,a6 as n,p as i,a8 as l}from"./utils-lib.js?v=1765440387";import{_ as c}from"./index93.js?v=1765440387";import{r as p,g as _,c as u,s as m,e as d,B as f,w as v,p as j,n as b,q as g,M as w,A as y,x as h,y as x}from"./base-lib.js?v=1765440387";import{a as C,d as k,g as B,u as L}from"./column.js?v=1765440387";import{b as O,g as S,d as T,f as E,h as I,s as P,i as N,u as R,a as A,l as D,j as M}from"./useController6.js?v=1765440387";import{u as V,S as q}from"./useStore3.js?v=1765440387";import{u as G}from"./index131.js?v=1765440387";import{f as z,l as F}from"./validator.js?v=1765440387";import"./index.vue_vue_type_style_index_0_scoped_b3c4124c_lang.js?v=1765440387";import{Y as H,Z as J}from"./site.js?v=1765440387";const{isRefreshList:U,siteInfo:Y}=V(),{editGeneralProject:Z,addGeneralProject:$,setSiteInfo:K}=q(),Q=()=>{Y.value=null,e({title:"添加.Net项目",area:72,component:()=>t(()=>import("./index362.js?v=1765440387"),__vite__mapDeps([]),import.meta.url),showFooter:!0})},W=(a,s="")=>{K(a,s),e({title:".Net项目管理["+a.name+"] -- 添加时间["+a.addtime+"]",area:[84,72],component:()=>t(()=>import("./index363.js?v=1765440387"),__vite__mapDeps([]),import.meta.url)})},X=e=>{},ee=p([]),te=_(()=>!!Y.value),ae=p({project_path:"",project_name:"",port:"",project_cmd:"",run_user:"www",project_ps:"",release_firewall:!1,dotnet_version:"",is_power_on:!1,bind_extranet:!1}),se=async(e,t,s)=>{try{await s.value.validate();const t={data:JSON.stringify({...e.value,is_power_on:e.value.is_power_on?1:0})},o=Y.value?Z:$,r=await o(t);return a.msg({dangerouslyUseHTMLString:!0,message:r.msg,type:r.status?"success":"error",duration:r.status?2e3:0,showClose:!r.status,customClass:"!max-w-[66rem]"}),U.value=!0,r.status}catch(o){return!1}},oe=()=>{z({type:"all",path:ae.value.project_path,change:e=>{ae.value.project_path=e}})},re=async(e=!1)=>{try{const t=await H();if(ee.value=t.data.map(e=>({label:e,value:e})),e)return a.success("Net版本,刷新成功");ae.value.dotnet_version=t.data[0]}catch(t){}},ne=async()=>{if(await re(),te.value){const{project_config:e,ps:t}=Y.value;Object.assign(ae.value,{...e,project_ps:s(t),bind_extranet:1===e.bind_extranet,is_power_on:1===e.is_power_on,port:e.port})}},ie=()=>{Object.assign(ae.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})},le=async()=>{try{const{data:e}=await J({sName:"dotnet"});await F({name:"dotnet",softData:e})}catch(e){}},ce=u({__name:"index",setup(e){o();const{getSiteList:a,setSiteInfo:s}=q(),{activeType:p,isRefreshList:_,siteInfo:u}=m(q()),{BtOperation:V}=r({options:[{type:"button",label:"添加项目",active:!0,onClick:Q},{type:"button",label:".Net环境管理",onClick:le}]}),z=G({key:"type_id",name:"Net分类",options:()=>[{label:"全部分类",value:"all"}],event:I,ignore:["0"],field:"type_name"}),F=l([R(),A({classList:M}),{label:"删除项目",value:"delete",event:D}]),{BtTable:H,BtPage:J,BtRefresh:U,BtSearch:Y,BtColumn:Z,BtBatch:$,BtTableCategory:K,refresh:X,config:ee}=n({request:e=>{const{type_id:t,...s}=e;return a({...s,type_id:i(t)||"all"===t?"":t,table:"sites"})},columns:[C(),O({onClick:e=>{W(e)}}),S({onClick:(e,t)=>{if("setting"===t)return void W(e,"state");const a=e.run?"stop":"start";P(e,"restart"===t?t:a)}}),k(),B({table:"sites",width:200}),T({onClick:e=>{W(e,"ssl")}}),L([{title:"设置",onClick:e=>{W(e)}},{title:"删除",onClick:e=>{N(e)}}])],extension:[z,F],empty:()=>d("span",null,[f("您的列表为空,您可以"),d("span",{class:"bt-link",onClick:Q},[f("添加一个项目")])])});return v(_,async e=>{var t;if(e){if(await X(),null==(t=u.value)?void 0:t.name){const e=ee.data.find(e=>e.name===u.value.name);e&&s(e)}_.value=!1}}),j(()=>{b(()=>{t(()=>import("./index362.js?v=1765440387"),__vite__mapDeps([]),import.meta.url),t(()=>import("./index363.js?v=1765440387"),__vite__mapDeps([]),import.meta.url)})}),(e,t)=>{const a=c;return g(),w(a,null,{"header-left":y(()=>[d(h(V)),x("div",{class:"flex items-center ml-1rem",onClick:t[0]||(t[0]=(...e)=>h(E)&&h(E)(...e))},[...t[1]||(t[1]=[x("i",{class:"svgtofont-desired text-[1.6rem]"},null,-1),x("span",{class:"bt-link"},"需求反馈",-1)])])]),"header-right":y(()=>[d(h(K),{class:"!w-[200px] mr-[10px]"}),d(h(Y),{class:"mr-[10px]",placeholder:"请输入项目名称或备注"}),d(h(U),{class:"mr-[10px]"}),d(h(Z))]),content:y(()=>[d(h(H))]),"footer-left":y(()=>[d(h($))]),"footer-right":y(()=>[d(h(J))]),_:1})}}}),pe=Object.freeze(Object.defineProperty({__proto__:null,default:ce},Symbol.toStringTag,{value:"Module"}));export{ie as $,se as a,ne as b,te as c,le as d,pe as e,re as g,X as i,ae as n,oe as o,ee as v}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { __vite__mapDeps.viteFileDeps = [] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) }
Save File
Cancel