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 O,z as Q,r as W,a as L,o as X,c as A,b as e,w as l,e as n,f as d,u as o,F as q,j as h,l as g,A as k,h as v,g as z,i as m,B as Y,C as Z,t as ee,p as le,m as te,D as F,G as ae,H as ue,I as ie,J as oe,_ as ne}from"./index-44410976.js";const S=y=>(le("data-v-08e37c7a"),y=y(),te(),y),se={class:"div-box"},re=S(()=>m("span",{class:"tip-title"},"注:只能选择输入框的字段作为收搜条件。",-1)),de=S(()=>m("span",{class:"tip-title"},"注:此设置针对需要sql连表查询所创建的视图进行设置。",-1)),me=S(()=>m("text",{class:"tip-title"}," 注:",-1)),be=S(()=>m("text",{class:"tip-title"},"1、默认生成主键id,add_by,add_time,edit_by,edit_time 字段。",-1)),pe=S(()=>m("text",{class:"tip-title"},"2、如设置类似于状态、类型等字段时,请用以这(类型: 1=是 2=否)格式编写描述。",-1)),_e=S(()=>m("text",{class:"tip-title"},"3、系统默认生成账号表(yes_account)与菜单表(yes_menu),请勿重复设计。",-1)),fe={class:"table-column-div"},ce={class:"table-column-title"},ge={class:"table-column-div"},ve=S(()=>m("span",{class:"table-column-title"},"添加字段",-1)),Se={slot:"footer",class:"dialog-footer"},Ve=O({__name:"menuMain",setup(y){let a=Q();const _=W({pageParam:{openTableSetDialog:!1},tableSetRules:{fieldName:[{required:!0,message:"请输入字段名",trigger:["blur"]}],fieldType:[{required:!0,message:"请选择字段类型",trigger:["blur"]}],fieldLength:[{required:!0,message:"请输入字段长度",trigger:["blur"]}],fieldPoint:[{required:!0,message:"请输入字段小数",trigger:["blur"]}],annotation:[{required:!0,message:"请输入字段描述",trigger:["blur"]}]},attributeRules:{tableName:[{required:!0,message:"请输入内容",trigger:["blur"]}],tableDescription:[{required:!0,message:"请输入表描述",trigger:["blur"]}],isSqlSentence:[{required:!0,message:"请选择是否设计数据表",trigger:["blur"]}],sqlSentence:[{required:!0,message:"请输入sql语句",trigger:["blur"]}]},attributeSelectList:[{value:"add",label:"添加"},{value:"update",label:"修改"},{value:"delete",label:"删除"}],fieldTypeList:["bigint","decimal","int","varchar","datetime","file"]}),N=L(),C=L(),i=L({}),B=()=>{i.value={}},j=async p=>{console.log(a.submitAttributeParam),p&&await p.validate((u,c)=>{var f,s;u&&(a.submitAttributeParam.pageAttribute=(f=a.pageAttributeList)==null?void 0:f.join(),a.submitAttributeParam.searchCondition=(s=a.searchConditionList)==null?void 0:s.join(),a.submitAttributeParam.menuId=F(),a.submitAttributeParam.isSqlSentence==1&&(a.submitAttributeParam.sqlSentence=""),a.submitAttributeParam.id?ae(a.submitAttributeParam).then(r=>{a.getTableAttribute()}):ue(a.submitAttributeParam).then(r=>{a.getTableAttribute()}))})},P=()=>{_.pageParam.openTableSetDialog=!1,B()},D=p=>{if(_.pageParam.openTableSetDialog=!0,i.value.isNull=1,i.value.fieldLength=0,i.value.fieldPoint=0,p.id){let u={id:p.id};Z(u).then(c=>{i.value=c})}},$=async p=>{console.log(i.value),p&&await p.validate((u,c)=>{u&&(i.value.menuId=F(),i.value.id?ie(i.value).then(f=>{a.getTableList(),P()}):oe(i.value).then(f=>{a.getTableList(),P()}))})};return X(async()=>{a.getTableAttribute(),a.getTableList()}),(p,u)=>{const c=n("el-option"),f=n("el-select"),s=n("el-form-item"),r=n("el-col"),V=n("el-input"),T=n("el-radio"),U=n("el-radio-group"),b=n("el-row"),x=n("el-button"),w=n("el-form"),E=n("Edit"),M=n("el-icon"),I=n("el-table-column"),G=n("el-table"),R=n("el-input-number"),H=n("el-dialog"),J=n("el-card");return d(),A("div",se,[e(J,{class:"box-card"},{default:l(()=>[e(w,{rules:_.attributeRules,model:o(a).submitAttributeParam,ref_key:"ruleAttributeFormRef",ref:N},{default:l(()=>[e(b,null,{default:l(()=>[e(r,null,{default:l(()=>[e(s,{label:"搜索条件:",prop:"searchCondition"},{default:l(()=>[e(f,{modelValue:o(a).searchConditionList,"onUpdate:modelValue":u[0]||(u[0]=t=>o(a).searchConditionList=t),multiple:"",placeholder:"请选择搜索条件",style:{width:"240px"}},{default:l(()=>[(d(!0),A(q,null,h(o(a).tableList,t=>(d(),g(c,{key:t.id,label:t.title,value:t.fieldName},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),re]),_:1})]),_:1}),e(r,null,{default:l(()=>[e(s,{label:o(a).submitAttributeParam.isSqlSentence==2?"视图名:":"表名:",prop:"tableName"},{default:l(()=>[e(V,{modelValue:o(a).submitAttributeParam.tableName,"onUpdate:modelValue":u[1]||(u[1]=t=>o(a).submitAttributeParam.tableName=t),modelModifiers:{trim:!0},maxlength:20,placeholder:"请输入表名"},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),o(a).submitAttributeParam.isSqlSentence==1?(d(),g(r,{key:0},{default:l(()=>[e(s,{label:"表描述:",prop:"tableDescription"},{default:l(()=>[e(V,{modelValue:o(a).submitAttributeParam.tableDescription,"onUpdate:modelValue":u[2]||(u[2]=t=>o(a).submitAttributeParam.tableDescription=t),modelModifiers:{trim:!0},maxlength:20,placeholder:"请输入表描述"},null,8,["modelValue"])]),_:1})]),_:1})):k("",!0),e(r,null,{default:l(()=>[e(s,{label:"页面属性:",prop:"pageAttribute"},{default:l(()=>[e(f,{modelValue:o(a).pageAttributeList,"onUpdate:modelValue":u[3]||(u[3]=t=>o(a).pageAttributeList=t),multiple:"",placeholder:"请选择页面属性",style:{width:"240px"}},{default:l(()=>[(d(!0),A(q,null,h(_.attributeSelectList,t=>(d(),g(c,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(r,null,{default:l(()=>[e(s,{label:"是否设计数据表:",prop:"isSqlSentence"},{default:l(()=>[e(U,{modelValue:o(a).submitAttributeParam.isSqlSentence,"onUpdate:modelValue":u[4]||(u[4]=t=>o(a).submitAttributeParam.isSqlSentence=t),class:"ml-4"},{default:l(()=>[e(T,{label:1,size:"large"},{default:l(()=>[v("是")]),_:1}),e(T,{label:2,size:"large"},{default:l(()=>[v("否")]),_:1})]),_:1},8,["modelValue"]),de]),_:1})]),_:1}),o(a).submitAttributeParam.isSqlSentence==2?(d(),g(r,{key:1},{default:l(()=>[e(s,{label:"sql语句:",prop:"sqlSentence"},{default:l(()=>[e(V,{modelValue:o(a).submitAttributeParam.sqlSentence,"onUpdate:modelValue":u[5]||(u[5]=t=>o(a).submitAttributeParam.sqlSentence=t),modelModifiers:{trim:!0},type:"textarea",placeholder:"请输入sql语句"},null,8,["modelValue"])]),_:1})]),_:1})):k("",!0)]),_:1}),e(s,null,{default:l(()=>[e(x,{type:"primary",onClick:u[6]||(u[6]=z(t=>j(N.value),["stop"]))},{default:l(()=>[v("提 交")]),_:1})]),_:1})]),_:1},8,["rules","model"]),e(b,{style:{"margin-top":"24px"}},{default:l(()=>[me]),_:1}),e(b,null,{default:l(()=>[be]),_:1}),e(b,null,{default:l(()=>[pe]),_:1}),e(b,null,{default:l(()=>[_e]),_:1}),o(a).submitAttributeParam.isSqlSentence==1?(d(),g(G,{key:0,style:{width:"100%","margin-top":"16px"}},{default:l(()=>[(d(!0),A(q,null,h(o(a).tableList,(t,K)=>(d(),g(I,{align:"center",key:K},{header:l(()=>[m("div",fe,[m("span",ce,ee(t.title),1),e(M,{size:16,onClick:Ae=>D(t)},{default:l(()=>[e(E)]),_:2},1032,["onClick"])])]),_:2},1024))),128)),e(I,{align:"center"},{header:l(()=>[m("div",ge,[ve,e(M,{size:16,onClick:D},{default:l(()=>[e(o(Y))]),_:1})])]),_:1})]),_:1})):k("",!0),e(H,{title:"设置字段",modelValue:_.pageParam.openTableSetDialog,"onUpdate:modelValue":u[14]||(u[14]=t=>_.pageParam.openTableSetDialog=t),"before-close":P},{default:l(()=>[e(w,{rules:_.tableSetRules,model:i.value,ref_key:"ruleTableSetFormRef",ref:C,"label-width":"160px"},{default:l(()=>[e(b,null,{default:l(()=>[e(r,null,{default:l(()=>[e(s,{label:"字段名:",prop:"fieldName"},{default:l(()=>[e(V,{modelValue:i.value.fieldName,"onUpdate:modelValue":u[7]||(u[7]=t=>i.value.fieldName=t),placeholder:"请输入字段名"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(b,null,{default:l(()=>[e(r,null,{default:l(()=>[e(s,{label:"字段类型:",prop:"fieldType"},{default:l(()=>[e(f,{modelValue:i.value.fieldType,"onUpdate:modelValue":u[8]||(u[8]=t=>i.value.fieldType=t),clearable:"",placeholder:"请选择字段类型"},{default:l(()=>[(d(!0),A(q,null,h(_.fieldTypeList,t=>(d(),g(c,{key:t,label:t,value:t},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(b,null,{default:l(()=>[e(r,null,{default:l(()=>[e(s,{label:"字段长度:",prop:"fieldLength"},{default:l(()=>[e(R,{disabled:i.value.fieldType=="datetime",modelValue:i.value.fieldLength,"onUpdate:modelValue":u[9]||(u[9]=t=>i.value.fieldLength=t),"controls-position":"right",min:0},null,8,["disabled","modelValue"])]),_:1})]),_:1})]),_:1}),e(b,null,{default:l(()=>[e(r,null,{default:l(()=>[e(s,{label:"字段小数点:",prop:"fieldPoint"},{default:l(()=>[e(R,{disabled:i.value.fieldType!="decimal",modelValue:i.value.fieldPoint,"onUpdate:modelValue":u[10]||(u[10]=t=>i.value.fieldPoint=t),"controls-position":"right",min:0},null,8,["disabled","modelValue"])]),_:1})]),_:1})]),_:1}),e(s,{label:"是否为空:",prop:"isNull"},{default:l(()=>[e(U,{modelValue:i.value.isNull,"onUpdate:modelValue":u[11]||(u[11]=t=>i.value.isNull=t),class:"ml-4"},{default:l(()=>[e(T,{label:1,size:"large"},{default:l(()=>[v("是")]),_:1}),e(T,{label:2,size:"large"},{default:l(()=>[v("否")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(b,null,{default:l(()=>[e(r,null,{default:l(()=>[e(s,{label:"注释:",prop:"annotation"},{default:l(()=>[e(V,{modelValue:i.value.annotation,"onUpdate:modelValue":u[12]||(u[12]=t=>i.value.annotation=t),placeholder:"请输入注释",type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["rules","model"]),m("span",Se,[e(x,{onClick:P},{default:l(()=>[v("取 消")]),_:1}),e(x,{type:"primary",onClick:u[13]||(u[13]=z(t=>$(C.value),["stop"]))},{default:l(()=>[v("确 定")]),_:1})])]),_:1},8,["modelValue"])]),_:1})])}}});const Pe=ne(Ve,[["__scopeId","data-v-08e37c7a"]]);export{Pe as default};