Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
import{d as F,r as $,a as h,o as z,c as S,b as e,w as l,e as r,f as V,g as _,h as p,u as n,i as P,t as D,F as A,j as R,k as G,l as H,p as J,m as K,E as O,n as Q,q as W,_ as X}from"./index-44410976.js";import{u as Y,g as Z,m as ee,s as le}from"./projectStore-c78596b9.js";const te=f=>(J("data-v-899bf6e0"),f=f(),K(),f),ae={class:"divBox"},oe=te(()=>P("div",{style:{"font-size":"26px","font-weight":"600",color:"#747bff"}},"项目管理",-1)),re={slot:"footer",class:"dialog-footer"},ne=F({__name:"project",setup(f){let b=Y();const s=$({pageParam:{dialogTitle:"",dialogVisible:!1},rules:{name:[{required:!0,message:"请输入名称",trigger:["blur"]}],projectName:[{required:!0,message:"请输入项目名称",trigger:["blur"]}],projectPath:[{required:!0,message:"请输入项目路径",trigger:["blur"]}],packageName:[{required:!0,message:"请输入项目包名",trigger:["blur"]}],isSpringCloud:[{required:!0,message:"请选择是否需要微服务",trigger:["blur"]}]},isSpringCloudList:[{value:1,label:"是"},{value:2,label:"否"}]}),k=h();let o=h({});const v=()=>{o.value={}},x=()=>{s.pageParam.dialogVisible=!1,v()},C=u=>{s.pageParam.dialogTitle="新增项目",u&&(Z({id:u}).then(i=>{o.value=i}),s.pageParam.dialogTitle="修改项目"),s.pageParam.dialogVisible=!0},N=async u=>{u&&await u.validate((a,i)=>{a&&(o.value.projectId?ee(o.value).then(m=>{s.pageParam.dialogVisible=!1,v(),b.getProjectListStore()}):le(o.value).then(m=>{s.pageParam.dialogVisible=!1,v(),b.getProjectListStore()}))})},I=G(),w=u=>{I.push({name:"projectItem",query:{projectId:u}})},L=u=>{O.confirm("是否确认生成后端架构代码?",{confirmButtonText:"确 认",cancelButtonText:"取 消"}).then(()=>{let a={projectId:u};const i=Q.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});W(a).then(m=>{i.close()})}).catch(()=>{})};return z(async()=>{b.getProjectListStore()}),(u,a)=>{const i=r("el-button"),m=r("el-row"),d=r("el-table-column"),B=r("el-table"),j=r("el-input"),c=r("el-form-item"),g=r("el-col"),q=r("el-option"),M=r("el-select"),T=r("el-form"),U=r("el-dialog"),E=r("el-card");return V(),S("div",ae,[e(E,{class:"box-card",style:{width:"100%"}},{default:l(()=>[oe,e(m,null,{default:l(()=>[e(i,{type:"primary",onClick:a[0]||(a[0]=_(t=>C(null),["stop"]))},{default:l(()=>[p("新 增")]),_:1})]),_:1}),e(B,{data:n(b).projectList,stripe:"",style:{width:"100%"}},{default:l(()=>[e(d,{prop:"name",label:"名称",align:"center"}),e(d,{prop:"projectName",label:"项目名称",align:"center"}),e(d,{prop:"packageName",label:"项目包名",align:"center"}),e(d,{prop:"projectPath",label:"项目路径",align:"center"}),e(d,{prop:"isSpringCloud",label:"是否需要微服务",align:"center"},{default:l(({row:t})=>[P("span",null,D(t.isSpringCloud==1?"是":"否"),1)]),_:1}),e(d,{label:"操作",align:"center"},{default:l(({row:t})=>[e(i,{size:"mini",type:"text",onClick:_(y=>C(t.projectId),["stop"])},{default:l(()=>[p("修改")]),_:2},1032,["onClick"]),e(i,{size:"mini",type:"text",onClick:_(y=>w(t.projectId),["stop"])},{default:l(()=>[p("设置项目")]),_:2},1032,["onClick"]),e(i,{size:"mini",type:"text",onClick:_(y=>L(t.projectId),["stop"])},{default:l(()=>[p("生成后端构架")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),e(U,{title:s.pageParam.dialogTitle,modelValue:s.pageParam.dialogVisible,"onUpdate:modelValue":a[7]||(a[7]=t=>s.pageParam.dialogVisible=t),"before-close":x},{default:l(()=>[e(T,{rules:s.rules,model:n(o),ref_key:"ruleFormRef",ref:k,"label-width":"160px"},{default:l(()=>[e(m,null,{default:l(()=>[e(g,null,{default:l(()=>[e(c,{label:"名称:",prop:"name"},{default:l(()=>[e(j,{modelValue:n(o).name,"onUpdate:modelValue":a[1]||(a[1]=t=>n(o).name=t),modelModifiers:{trim:!0},maxlength:20,placeholder:"请输入名称"},null,8,["modelValue"])]),_:1})]),_:1}),e(g,null,{default:l(()=>[e(c,{label:"项目名称:",prop:"projectName"},{default:l(()=>[e(j,{modelValue:n(o).projectName,"onUpdate:modelValue":a[2]||(a[2]=t=>n(o).projectName=t),modelModifiers:{trim:!0},maxlength:20,placeholder:"请输入项目名称"},null,8,["modelValue"])]),_:1})]),_:1}),e(g,null,{default:l(()=>[e(c,{label:"项目路径:",prop:"projectPath"},{default:l(()=>[e(j,{modelValue:n(o).projectPath,"onUpdate:modelValue":a[3]||(a[3]=t=>n(o).projectPath=t),modelModifiers:{trim:!0},maxlength:20,placeholder:"请输入项目路径"},null,8,["modelValue"])]),_:1})]),_:1}),e(g,null,{default:l(()=>[e(c,{label:"项目包名:",prop:"packageName"},{default:l(()=>[e(j,{modelValue:n(o).packageName,"onUpdate:modelValue":a[4]||(a[4]=t=>n(o).packageName=t),modelModifiers:{trim:!0},maxlength:20,placeholder:"请输入项目包名"},null,8,["modelValue"])]),_:1})]),_:1}),e(g,null,{default:l(()=>[e(c,{label:"是否需要微服务:",prop:"isSpringCloud"},{default:l(()=>[e(M,{modelValue:n(o).isSpringCloud,"onUpdate:modelValue":a[5]||(a[5]=t=>n(o).isSpringCloud=t),clearable:"",placeholder:"请选择是否需要微服务"},{default:l(()=>[(V(!0),S(A,null,R(s.isSpringCloudList,t=>(V(),H(q,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["rules","model"]),P("span",re,[e(i,{onClick:x},{default:l(()=>[p("取 消")]),_:1}),e(i,{type:"primary",onClick:a[6]||(a[6]=_(t=>N(k.value),["stop"]))},{default:l(()=>[p("确 定")]),_:1})])]),_:1},8,["title","modelValue"])]),_:1})])}}});const ue=X(ne,[["__scopeId","data-v-899bf6e0"]]);export{ue as default};