All Downloads are FREE. Search and download functionalities are using the official Maven repository.

view.assets.projectItem-d86fe620.js Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
import{d as A,r as T,a as j,o as $,c as B,b as e,w as t,s as L,e as n,f as R,g as c,h as d,u as i,i as x,k as z}from"./index-44410976.js";import{u as D,a as F,b as E,c as G}from"./projectStore-c78596b9.js";const H={class:"divBox"},J=x("div",{style:{"font-size":"26px","font-weight":"600",color:"#747bff"}},"项目项管理",-1),K={slot:"footer",class:"dialog-footer"},X=A({__name:"projectItem",setup(O){let f=D();const s=T({pageParam:{dialogTitle:"",dialogVisible:!1},rules:{frontProjectName:[{required:!0,message:"请输入前端项目名称",trigger:["blur"]}],mysqlUrl:[{required:!0,message:"请输入数据库url",trigger:["blur"]}],mysqlAccount:[{required:!0,message:"请输入数据库账号",trigger:["blur"]}],mysqlPassword:[{required:!0,message:"请输入数据库密码",trigger:["blur"]}]}}),V=z(),y=j(),q=j();let o=j({});const P=()=>{o.value={}},w=r=>{V.push({name:"menuSet",query:{projectItemId:r}})},v=()=>{s.pageParam.dialogVisible=!1,P()},I=r=>{s.pageParam.dialogTitle="新增项目项",r&&(F({id:r}).then(m=>{o.value=m}),s.pageParam.dialogTitle="修改项目项"),s.pageParam.dialogVisible=!0},k=async r=>{r&&await r.validate((l,m)=>{if(l){let p={id:y.value};o.value.projectId=y.value,o.value.projectItemId?E(o.value).then(u=>{s.pageParam.dialogVisible=!1,P(),f.getProjectItemListStore(p)}):G(o.value).then(u=>{s.pageParam.dialogVisible=!1,P(),f.getProjectItemListStore(p)})}})},C=()=>{V.push({name:"project"})};return $(async()=>{const r=L();y.value=r.query.projectId;let l={id:r.query.projectId};f.getProjectItemListStore(l)}),(r,l)=>{const m=n("el-button"),p=n("el-row"),u=n("el-table-column"),U=n("el-table"),g=n("el-input"),_=n("el-form-item"),b=n("el-col"),N=n("el-form"),h=n("el-dialog"),M=n("el-card");return R(),B("div",H,[e(M,{class:"box-card",style:{width:"1200px"}},{default:t(()=>[J,e(p,null,{default:t(()=>[e(m,{type:"primary",onClick:l[0]||(l[0]=c(a=>I(),["stop"]))},{default:t(()=>[d("新 增")]),_:1}),e(m,{type:"primary",onClick:l[1]||(l[1]=c(a=>C(),["stop"]))},{default:t(()=>[d("返回上一页")]),_:1})]),_:1}),e(U,{data:i(f).projectItemList,stripe:"",style:{width:"100%"}},{default:t(()=>[e(u,{prop:"projectName",label:"项目名称",align:"center"}),e(u,{prop:"frontProjectName",label:"前端项目名称",align:"center"}),e(u,{prop:"mysqlUrl",label:"数据库url",align:"center"}),e(u,{prop:"mysqlAccount",label:"数据库账号",align:"center"}),e(u,{prop:"mysqlPassword",label:"数据库密码",align:"center"}),e(u,{label:"操作",align:"center"},{default:t(({row:a})=>[e(m,{size:"mini",type:"text",onClick:c(S=>I(a.projectItemId),["stop"])},{default:t(()=>[d("修改")]),_:2},1032,["onClick"]),e(m,{size:"mini",type:"text",onClick:c(S=>w(a.projectItemId),["stop"])},{default:t(()=>[d("设置菜单")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),e(h,{title:s.pageParam.dialogTitle,modelValue:s.pageParam.dialogVisible,"onUpdate:modelValue":l[7]||(l[7]=a=>s.pageParam.dialogVisible=a),"before-close":v},{default:t(()=>[e(N,{rules:s.rules,model:i(o),ref_key:"ruleFormRef",ref:q,"label-width":"160px"},{default:t(()=>[e(p,null,{default:t(()=>[e(b,null,{default:t(()=>[e(_,{label:"前端项目名称:",prop:"frontProjectName"},{default:t(()=>[e(g,{modelValue:i(o).frontProjectName,"onUpdate:modelValue":l[2]||(l[2]=a=>i(o).frontProjectName=a),modelModifiers:{trim:!0},maxlength:20,placeholder:"请输入前端项目名称"},null,8,["modelValue"])]),_:1})]),_:1}),e(b,null,{default:t(()=>[e(_,{label:"数据库url:",prop:"mysqlUrl"},{default:t(()=>[e(g,{modelValue:i(o).mysqlUrl,"onUpdate:modelValue":l[3]||(l[3]=a=>i(o).mysqlUrl=a),modelModifiers:{trim:!0},maxlength:50,placeholder:"请输入数据库url"},null,8,["modelValue"])]),_:1})]),_:1}),e(b,null,{default:t(()=>[e(_,{label:"数据库账号:",prop:"mysqlAccount"},{default:t(()=>[e(g,{modelValue:i(o).mysqlAccount,"onUpdate:modelValue":l[4]||(l[4]=a=>i(o).mysqlAccount=a),modelModifiers:{trim:!0},maxlength:200,placeholder:"请输入数据库账号"},null,8,["modelValue"])]),_:1})]),_:1}),e(b,null,{default:t(()=>[e(_,{label:"数据库密码:",prop:"mysqlPassword"},{default:t(()=>[e(g,{modelValue:i(o).mysqlPassword,"onUpdate:modelValue":l[5]||(l[5]=a=>i(o).mysqlPassword=a),modelModifiers:{trim:!0},maxlength:50,placeholder:"请输入数据库密码"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["rules","model"]),x("span",K,[e(m,{onClick:v},{default:t(()=>[d("取 消")]),_:1}),e(m,{type:"primary",onClick:l[6]||(l[6]=c(a=>k(q.value),["stop"]))},{default:t(()=>[d("确 定")]),_:1})])]),_:1},8,["title","modelValue"])]),_:1})])}}});export{X as default};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy